On this page
Control VS Code AI Agents via Phone: Agent Host Protocol
tl;dr
VS Code's Agent Host lets you steer Copilot, Claude, and Codex agent sessions from GitHub Mobile while they keep running on your laptop or cloud sandbox. Local sessions require your host computer to stay awake, while cloud sessions draw from your shared Actions compute entitlement.
The editor is no longer the session owner. VS Code 1.129 moved agent runtimes into a dedicated process that outlives windows, and the October Universe releases turned that process into infrastructure you can reach from GitHub Mobile, github.com, or a browser tab — while the actual work keeps running on your laptop, a remote box, or GitHub’s cloud sandboxes. The shift changes what “away from keyboard” means for agent workflows, but it also introduces new constraints around compute ownership and cost visibility that most teams haven’t priced yet.
What Changed in VS Code 1.129 That Made This Possible?
VS Code 1.129, released July 15, 2026, introduced the dedicated Agent Host process for Copilot, Claude, and Codex agent harnesses. Before this release, agent sessions lived inside the editor window’s extension host — close the window, lose the session. The Agent Host breaks that coupling by running harnesses in a separate process that persists independently of any editor window. Multiple VS Code windows can now connect to the same session simultaneously, and the session continues after you close the folder or window where it started.
The architecture is built on the Agent Host Protocol (AHP), an open, MIT-licensed specification with client libraries available in TypeScript, Rust, Go, Kotlin, and Swift. Microsoft explicitly positions AHP alongside LSP and DAP as standardized infrastructure rather than a proprietary IDE feature. The protocol uses JSON-RPC with an immutable, Redux-like state tree where every mutation carries a monotonic sequence number, so clients that disconnect can reconnect and replay missed actions without losing context.
This architectural shift enables the phone control scenario: you start a session on your development machine, run code agent host --github-environment from your project folder, and the Agent Host keeps that session alive and reachable from GitHub Mobile while you’re away from your desk. The computer and Agent Host must remain running, but you no longer need to keep a VS Code window open.
How Does the Agent Host Protocol Actually Work?
AHP treats agent sessions as durable, portable infrastructure. The host is the authoritative source of truth for session state, sequencing, and reconciliation. Clients — VS Code windows, the Agents window, vscode.dev/agents through a dev tunnel, GitHub Mobile, or custom applications — subscribe to URI-addressed channels for sessions, terminals, and changesets. They apply changes optimistically and reconcile when the server echoes back the ordered action stream.
The practical implication: you can have a session running in the Agents window, open the same session in a second VS Code window to review diffs side by side, then pull it up on your phone to approve a tool call while walking to a meeting. All three clients stay synchronized because they’re reading from the same sequenced state tree. The protocol also supports remote execution over SSH or development tunnels, where the Agent Host runs on a remote machine next to the workspace and you connect from your local editor or phone.
Custom clients can implement AHP today. The spec is published at microsoft.github.io/agent-host-protocol with client libraries in five languages. A community project called Pocket Pilot already demonstrates a zero-server, end-to-end encrypted mobile client that speaks AHP directly to a developer’s machine via a Cloudflare quick tunnel. Whether the broader ecosystem converges on AHP remains an open question — Cursor, OpenCode, Kiro, and other agent-aware tools could adopt it, but adoption is not guaranteed.
Local vs Cloud: Which Session Type Fits Your Workflow?
The October releases give you three execution targets for agent sessions, each with different tradeoffs around compute ownership, persistence, and cost.
| Execution Target | Compute Owner | Persistence | Cost Model | Best For |
|---|---|---|---|---|
| Local Agent Host | Your machine | Requires host awake; quitting VS Code ends session | Hardware you already own | Long-running background tasks on your own codebase, air-gapped environments |
| Remote SSH/Tunnel | Your remote box | Requires remote machine online | Your cloud VM / on-prem hardware | Offloading heavy work to a beefier machine, team-shared dev boxes |
| Copilot Cloud Sandboxes | GitHub infrastructure | No one-hour limit; snapshots resume across surfaces | Consumes shared Actions compute entitlement | Working from phone/tablet, zero-local-compute scenarios, cross-device handoff |
Local Agent Host sessions keep your code and data on your hardware — important for air-gapped or compliance-heavy environments. Local sandboxing for GitHub Copilot is generally available in the CLI, Copilot app, and VS Code sessions using Agent Host at no additional cost, powered by Microsoft eXecution Container (MXC) which translates sandbox policies into native OS controls across Windows, macOS, and Linux. You can limit filesystem access, network egress, and credential access per session.
Cloud sandboxes run on GitHub-managed infrastructure in secure, ephemeral environments that start fast and have no one-hour limit on total running session time. When a sandbox shuts down, it saves a snapshot so you can resume the session later from any surface — VS Code, GitHub Mobile, github.com, the Copilot app, Copilot CLI, or even a Slack or Teams DM. The compute draws from your included Actions entitlement, which is now a shared dollar-based pool covering standard runners, cloud sandboxes, and (on Team and Enterprise Cloud) larger hosted runners.
The cost model shift is subtle but significant. Local sessions cost you hardware uptime. Cloud sessions consume Actions credits that you’d otherwise use for CI/CD. For teams already maxing out their Actions entitlement, spinning up cloud agent sessions creates direct resource contention with build pipelines. Admins can choose which models Fusion may use and can set Fusion as the default at any effort level through Enterprise managed settings, but the billing is per model invoked at standard rates — making total spend opaque until after execution.
What’s the Catch with Phone Control?
GitHub Mobile can start, steer, and monitor GitHub Copilot cloud agent sessions running on GitHub infrastructure, with the same session continuing across phone, VS Code, and github.com. But the local-hosted path has a hard constraint: the host computer must remain awake and powered on with the Agent Host running. Quitting VS Code or shutting down the machine ends local sessions. This isn’t a background daemon that survives reboots — it’s a user-space process tied to your login session.
For cloud sessions, the constraint shifts to Actions entitlement consumption. Every minute a cloud sandbox runs draws from the same pool that funds your CI/CD. GitHub’s documentation notes that if Fusion discards a draft during its multi-model orchestration, “changes that the draft already made in your workspace, such as file edits, aren’t undone automatically” — a reminder that agent actions are not transactional.
There’s also a concurrency limitation: only one application can send messages to a conversation at a time. If you have a session open in VS Code and try to steer it from GitHub Mobile, VS Code will display a notification explaining why it can’t send messages until you close the original session. This single-writer model prevents conflicting inputs but means you can’t truly pair-program with an agent across devices simultaneously.
Security-wise, remote control maintains full privacy — sessions are only visible to you. But the attack surface expands: a compromised phone or stolen session token could steer an agent with full repository access. The 2026 AI Coding Agent Security Audit Checklist covers the trust boundaries and hook-based controls that matter here, especially since most hook-based controls fail open.
How Does This Compare to Other Remote Agent Solutions?
Claude Code and OpenAI Codex both support remote execution via their respective CLIs, but neither has an open protocol equivalent to AHP that lets multiple clients synchronize to the same session state. VS Code 1.141 now lets developers continue local GitHub Copilot and OpenAI Codex conversations started in other applications — new conversations started in the Copilot CLI or standalone GitHub Copilot app automatically appear in the VS Code Agents window after the first request, and Codex chats from the ChatGPT app or Codex CLI can be picked up in VS Code with history intact.
The differentiator is session portability as infrastructure. AHP makes the session a first-class resource with a standardized interface, not a feature of a specific IDE. If you’re building internal tooling — a custom dashboard, a Slack bot that triggers agent runs, a CLI wrapper for your team’s workflow — AHP gives you a documented, MIT-licensed integration point.
What Should You Configure Before Trusting a Long Session?
Before you start a session from your phone and walk away, check these settings:
-
Agent Host persistence: Enable
chat.agentHost.enabledand verify the host process stays running after you close VS Code windows. On Windows, the host runs as a background process; on macOS and Linux, it may require a launch agent or systemd unit to survive logout. -
Sandbox policies: If you’re running local sessions, configure
chat.agent.sandbox.enabledto"on"and definechat.agent.sandbox.allowedDomainsfor any external APIs your agents need (npm registry, GitHub API, etc.). Enterprise-managed settings can require sandboxing and enforce policies developers cannot weaken. -
Actions entitlement monitoring: For cloud sessions, set up budget alerts on your Actions compute pool. The shared entitlement covers builds, cloud sandboxes, and larger hosted runners — a runaway agent session can starve your CI pipeline.
-
Automation schedules: VS Code 1.140 introduced scheduled automations (e.g., “Catch up on main” daily at 9:00 AM). The computer must be awake with VS Code or the Agent Host running when the session is due to start. Don’t assume automations continue after you quit the application.
-
Model routing defaults: Copilot Fusion is now GA with Standard, High, and Max effort levels. High and Max are not included on Free, Student, or Pro plans. Admins should review which models Fusion may route to and whether the 30% discount on model costs (through November 30, 2026) applies to your plan.
The AI Debugging Workflow post explains why traces alone aren’t enough for agent failures — the winning tools fork, replay, and gate fixes in a closed loop. Local replay plus cloud pattern analysis is becoming the 2026 standard, and AHP’s sequenced state tree makes replay technically feasible if tooling catches up.
The real change isn’t phone control — it’s that VS Code stopped being an editor that runs agents and became an agent runtime that happens to include an editor. The scarce resource shifted from model access to continuous compute availability. A local session keeps working only while your laptop stays awake, so teams adopting this workflow are implicitly choosing between hardware uptime they own and Actions credits they share with CI/CD. The protocol is open, the session is portable, and the compute decision is now yours to make explicitly. What’s your team’s tolerance for a session that dies when your laptop sleeps?
Recommended Reading
-
VS Code Agent Host: Multiple AI Agents in Dev Containers
VS Code's Agent Host moves human review from before-write to after-write, so Dev Containers isolate agents but don't replace post-hoc diff review. Sessions persist across windows and run unattended through automations, making after-write oversight the primary security control rather than a pre-execution gate.
-
GitHub 2026: Copilot's Multi-Agent Overhaul and Real Costs
GitHub Copilot Fusion wins on cost, matching Claude Code Opus 5.5 Max performance at $5.59 per task versus $11.42. Agents now start 40% of pull requests, shifting the real bottleneck from code generation to human review and governance.
-
GitHub Copilot Code Review Max vs Standard: What Changed
Lite is the real story. Multi-agent Lite surfaces 47% more high-severity findings at 8% lower cost, while Max costs $10 per review versus $1.50 for Balanced.