GitHub Engineering has published an account of the Agent Host Protocol (AHP), an open standard built first in VS Code and adopted across GitHub products so that agent sessions can continue across devices. The post, published on the GitHub Blog, describes how Copilot moved from an editor-bound extension to a protocol-based architecture in which clients share the same agents, history, and state.

Why it matters

According to GitHub, Copilot was originally built in VS Code as an extension that bundled its own harness. That tied agent lifetime to the editor: closing a window ended the agent, updating VS Code stopped every agent as the application restarted, and connecting to a remote machine produced a new extension host commit-locked to the workbench version. Meanwhile, the Copilot app and the GitHub mobile apps for iOS and Android were each building distinct integrations with cloud-based agents. Each integration solved the problem for one product, but developers who wanted agents in their own workflows, whether an editor, a terminal, a phone, or a self-built tool, could not do so without a one-off integration per client. GitHub frames AHP as the answer to that N:M problem: a standard, independently versioned language across VS Code versions, the Copilot app, mobile apps, and other clients.

Technical details

GitHub states that AHP is oriented around URI-identified channels, the coarsest unit of functionality in the protocol. Every server must implement the root, session, and chat channels, and can implement additional channels for terminal support, MCP additions, or OTel reporting. Within each channel is a reducer-based state object that drives most client logic. The server is the arbiter of state, and each client sends a sequence of actions that either mutate state or trigger side effects such as sending a chat message. GitHub says this design makes reconnection and replay in poor network conditions straightforward: a client sends queued actions, presents the right loading state, and waits for the server to reconcile and acknowledge before confirming. GitHub also notes that reducer-based state plays well with UI frameworks such as React.

The post says AHP deliberately avoids encoding how agents work, focusing instead on how users interact with them, because the agent domain is evolving quickly. The core protocol was kept minimal even as the full feature set is extensive, so that clients and servers remain simple to implement.

Adopting AHP in VS Code required a new harness and agentic stack. GitHub reports that the Copilot Chat extension had grown for over three years to more than 400,000 lines of TypeScript, not counting tests, and was structured around the VS Code window lifecycle and the extension API. As AHP development began in early 2026, the Copilot SDK was also being developed and was used as the foundation for the new stack. GitHub says it was using the agent host to develop the agent host after the first couple of weeks. The GitHub Agent Host had different requirements from VS Code's implementation: VS Code runs the host locally and can place it on other compute over SSH, containers, WSL, or Dev Tunnels, and includes it in the VS Code Server bundle, while the GitHub Agent Host needed to run in the cloud across a wider variety of infrastructure, environments, and security constraints.

What to watch

GitHub positions AHP as a way to bring agents into third-party apps and workflows without bespoke integrations. For teams building agent clients, the practical questions are which channels a server must implement, how action reconciliation behaves under reconnection, and how much of the protocol stays out of agent behavior as the field evolves. The post does not provide benchmark numbers or a published specification timeline, so those details remain to be confirmed.

About the author

GitHub Engineering

Thoai Dispatch Curated — curated source featured on Thoai Dispatch.

More by GitHub Engineering