Back Home

GitHub Repo

GitHub details Agent Host Protocol, using shared state to continue agent sessions across devices

On November 17, GitHub published details of the Agent Host Protocol’s cross-client architecture and integration experience, explaining how Copilot lets users continue the same agent session across editors, apps, and phones. The protocol centralizes state, action ordering, and replay in a host, giving developers a basis for building their own interfaces.

Software by Microsoft · Public domain · Image source
zh-Hant

GitHub published an engineering article on November 17 detailing how the Agent Host Protocol (AHP) supports Copilot sessions across devices. The news is the publication of architectural details and deployment experience; the protocol already existed, so this was not its initial release. The team said that VS Code and GitHub’s agent environments now use a shared protocol, letting users view and continue work from different interfaces. Official engineering article

AHP places sessions on a separate host, which holds the authoritative state. Clients subscribe to URI-identified channels to receive state and apply actions. Required channels cover the root, session, and chat; terminal and telemetry channels can be added separately. This separates the agent’s lifecycle from the interface window and reduces the burden of integrating an agent backend independently into each application. Protocol repository

Ordering and recovery are key to multi-device operation. The host orders actions using serverSeq; when reconnecting, a client can provide lastSeenServerSeq so the host can replay missed content. Clients can also apply operations locally first, then reconcile them with the host’s response. The host arbitrates tool approvals: the first confirmation takes effect, and later duplicate confirmations are rejected, preventing state divergence when a phone and desktop are used at the same time. Protocol design guide

AHP can also be combined with the Agent Client Protocol (ACP): the host uses AHP to synchronize multiple interfaces and ACP to exchange prompts, streamed content, and tool events with the agent. Existing ACP agents can therefore join shared sessions through a bridge host; actual model calls, tool definitions, and context management remain the responsibility of the agent backend. Layered architecture guide

Engineering teams can start an independent host with code agent host to check whether their own interface can continue an existing session. The repository provides client libraries in six languages, but the specification and language packages are released independently, so teams still need to check versions during integration. Next, they should test state recovery after disconnection, duplicate approvals, and interoperability between different hosts. Continuing a session across interfaces does not, by itself, guarantee that tool operations can be safely retried after a process crash. Getting started / Versioning

Sources

  1. Building the Agent Host Protocol for sessions that continue across devices
  2. microsoft/agent-host-protocol
  3. AHP and the Agent Client Protocol