GitHub has published an engineering write-up of the Agent Host Protocol (AHP), the standard behind session continuity in GitHub Copilot. The post says models are now good enough to work for hours or even days, so you need to be able to check in from anywhere, and that an agent can’t live only inside one application. This summary sticks to what that post says.

The problem it solves

Copilot was first built in VS Code as an extension that bundled its own harness, which tied the agent’s lifetime to the editor. GitHub’s post lists the consequences: close the window and the agent is gone, update VS Code and every agent stops as the application restarts, and connecting to a remote machine gives you a new extension host. At the same time the Copilot app and the GitHub mobile apps were each building their own integration with cloud agents. Each solved the problem for one product, and developers still could not pull agents into their own editor, terminal, phone or tool.

The answer was a protocol: a standard, independently versioned language that every client can use, so each one sees the same agents, history and state without bespoke integrations.

How the protocol is designed

The post states the requirements. Several clients must work with the same agents. A session started in the cloud from a phone should continue on a laptop. The protocol must tolerate network interruptions, reconnections and concurrent changes from several clients. It must also stay out of agent behaviour: unlike the domains that produced the Language Server Protocol and the Debug Adapter Protocol, agents are evolving quickly, so AHP does not encode how agents work. It focuses on how you want to interact with them.

  • Channels: the protocol is organised around URI-identified channels, the coarsest unit of functionality. Every server must implement the root, session and chat channels, and may add others for terminal support, MCP additions or OpenTelemetry reporting.
  • Reducer-based state: within each channel a reducer-based state object drives most client logic. The server is the arbiter of state, and clients send actions that either change state or trigger side effects, such as sending a chat message.

The post lists what this buys. Reconnecting and replaying in poor network conditions is simple: a client sends its queued actions, shows the right loading state, and waits for the server to reconcile and acknowledge them. Clients and servers are easy to debug. Reducer-based state also fits popular UI frameworks such as React.

What it took to adopt

GitHub says adopting AHP in VS Code meant building a new harness and agentic stack underneath it. 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 a VS Code window’s lifecycle. The new stack was built on the Copilot SDK. The post also says the GitHub Agent Host had different requirements from VS Code’s, since it needed to run in the cloud across a wider variety of infrastructure, environments and security constraints.

What builders can take from it

You do not need GitHub’s scale to apply the lesson. If your product has an agent, ask whether its session survives a closed tab, an app update or a change of device, and whether a second client could attach to it. Keeping state on the server and letting clients send actions is one way to get there. Treat that as a design option to evaluate, not a recommendation from the source, which describes its own system.

Questions people ask

What is the Agent Host Protocol?

According to GitHub, it is an open standard built first in VS Code and adopted across GitHub that lets an agent session be started in one place and picked up in another.

How is it different from the Language Server Protocol?

GitHub notes that agents are evolving quickly, so AHP avoids encoding how agents work and focuses on how users interact with them.

Does it work over unreliable networks?

The design goal is to tolerate interruptions and reconnections. A client replays its queued actions and waits for the server to reconcile and acknowledge them.

Sources

← All insights