GitHub's Agent Host Protocol: your agent session, untied from the editor
GitHub's open Agent Host Protocol moves coding-agent sessions out of the editor window and into a separate process, so the same session can follow you from VS Code to your phone. Here's how it works — and where it still stops.

On this page
In brief
- Copilot used to live inside the VS Code window: close the window and the agent died with it.
- The Agent Host is a separate process that owns sessions; the Agent Host Protocol lets any client talk to it.
- Channels with reducer-based state make reconnection and replay easy; the protocol stays out of agent behaviour.
- Two independent hosts — TypeScript in VS Code, Rust at GitHub — were the acid test that made the protocol portable.
- Local sessions still die with the machine; only cloud sessions, on a paid Copilot plan, survive it.
Close the window and the agent dies. That was the deal with coding agents until now — not because the models couldn't keep working for hours on their own, but because the agent lived inside the editor. GitHub's answer, explained in an engineering post published November 17, is to give the agent a home of its own: a separate process called the Agent Host, and an open protocol, the Agent Host Protocol, that lets any client talk to it.
Plumbing, but the kind that changes what sits above it: once a session belongs to a process instead of a window, it can outlive the window, move between devices, and be driven by software GitHub never wrote.
The agent lived inside the window
GitHub Copilot began in VS Code as an extension that bundled its own harness. That worked while agents were short-lived helpers. But extensions are attached to a single VS Code window, and the agent inherited that lifetime: close the window and the agent is gone; update VS Code and every agent stops while the application restarts; connect to a remote machine and you get an entirely new extension host, commit-locked against the version of the workbench you have.
Meanwhile the Copilot app was being built, alongside the existing GitHub mobile apps, and each product made its own distinct integration with cloud-based agents. Each solved the problem for one product. But developers also want to pull agents into their own workflows — an editor, a terminal, a phone, a tool they built themselves — and they can't do that if every client needs its own one-off integration. A shared, independently versioned language means every client sees the same agents, history, and state, and you aren't tied to one app's idea of what a session is.
A host, not an extension
The fix has two parts. The Agent Host is a dedicated process that owns sessions, their terminals, and their changes. The editor window becomes just one client of that process. The Agent Host Protocol (AHP) is the open standard the clients and the host speak.
Version 1.0 shipped with VS Code 1.144 on October 28, 2026. With it, a session started in VS Code can be picked up in the Copilot app, on github.com, in GitHub Mobile, or through the Copilot CLI. Cloud sessions run on GitHub's infrastructure, so a task started from your phone can be reviewed from your laptop with your own machine off. GitHub's example: one session, "Fix the flaky login test," started in the Copilot app at 9:02, a tool call approved from a phone at 9:40, the diff reviewed in VS Code at 11:15, the pull request landed by a cloud agent at 11:32.
Rebuilding underneath it was the hard part. The Copilot Chat extension, which used to provide all of VS Code's AI capabilities, had grown over three years to more than 400,000 lines of TypeScript — structured around the lifecycle of a VS Code window and dependent entirely on the extension API. Neither that lifetime nor those APIs would be available in a standalone host process. The new stack is built on the Copilot SDK, developed in parallel from early 2026; GitHub says the team was dogfooding the host within weeks, though covering the long tail of Copilot Chat's features took considerably longer.
Channels, reducers, and a server that arbitrates
The protocol itself is deliberately small at the core. It is organised around URI-identified "channels," the coarsest unit of functionality. Every server must implement three — root, session, and chat — and can add more for terminal support, MCP additions, or telemetry reporting.
Within each channel sits a reducer-based state object. The server arbitrates the state; clients send actions that mutate it or trigger side effects, like sending a chat message. That makes reconnection easy: a client replays its queued actions and waits for the server to reconcile and acknowledge them. Debugging is straightforward, and reducer state suits React-style UIs.
One design choice matters most: the protocol stays out of agent behaviour. The Language Server Protocol and the Debug Adapter Protocol encode how their domains work; the world of agents is evolving too fast for that, so AHP avoids encoding how agents work and focuses on how you want to interact with them. Like MCP, it provides escape hatches — custom methods and _meta data on objects — for out-of-band signalling.
Two hosts, one protocol
The most interesting part: there are two agent hosts, not one. VS Code's is TypeScript, around 369,000 lines; GitHub's, built for the cloud's wider infrastructure and security constraints, is Rust, around 305,000 lines.
That was deliberate. Two different teams implementing the same protocol independently is the acid test: a protocol with one implementation isn't truly portable, GitHub says. After months heads-down, the teams inventoried how each had extended the protocol. Some extensions reasonably stay GitHub-specific, like metadata linking to project boards. Elsewhere the variance exposed gaps — early versions couldn't represent shell-type tool output not backed by a PTY. Some were bad assumptions, like VS Code presuming a structure for the session URIs it received. The result, GitHub says: AHP became portable in practice, not just in theory.
What you can do with it today
You don't need to write a client to use it. In VS Code, "Add Remote Agent Host" in the Agents window connects to a websocket-based host, and code agent endpoints lists your editor's running host. Run code agent host in a terminal for a standalone host. In the Copilot app, enable Experimental > Direct Connections, then Environments > Add Agent Host Protocol Host.
The protocol is also buildable by outsiders. GitHub publishes client libraries in six languages — Rust, TypeScript, Kotlin, Swift, .NET, and Go — plus language-independent test suites; it says agents can build clients and servers with little prompting. One engineer drives a desk macropad from his agent's live state; others built smartwatch apps and Kanban boards.
The payoff is the one it was built for: start a session from your phone, continue it from your laptop. The host keeps the session; clients take turns looking at it.
The honest limits
The protocol moves the session out of the window, not out of the machine. A local session still needs its computer and Agent Host running — close the laptop and it stops. Only cloud sessions survive your machine being off, and those need a paid Copilot plan and are subject to organisation policies. Cloud sessions also use a separate workspace, so local uncommitted changes aren't automatically copied over.
AHP is plumbing, not a product: it doesn't make agents smarter or safer, only portable. The interesting questions are the ones Microsoft's AI Transparency Initiative, announced yesterday, is about: making agent activity seeable and verifiable — a different problem from carrying a session between screens, and a harder one. Any client that can drive an agent needs access controls; the host is now part of the job.
Still, the direction is clear: agents are becoming long-running services with clients, and the editor is one client among many. For the first time, the session has an address that isn't a window.


