English edition · cyberattaques.org in FrenchFrançais
IT news

GitHub details the Agent Host Protocol that carries Copilot agent sessions across devices

GitHub has described the Agent Host Protocol (AHP), an open standard first built in VS Code. It lets Copilot agent sessions be picked up from the editor, the Copilot app, mobile apps or the cloud. Teams that manage developer workstations and remote environments are concerned, because agent hosts can now run outside the editor and accept direct connections.

What to do now Illustration photo (developer laptop phone code)

GitHub has published an engineering post on the Agent Host Protocol (AHP), an open standard behind session continuity in GitHub Copilot. A session started in one place, such as a cloud session launched from a phone, can be continued somewhere else, such as a laptop. The protocol was built first in VS Code and then adopted across GitHub. Sessions in the Copilot app, in cloud sandboxes and in VS Code now all run on the same protocol.

The change addresses a limit of the earlier design. Copilot shipped in VS Code as an extension that bundled its own agent harness, so an agent lived only as long as the editor window did. Closing the window or updating VS Code stopped every running agent. Meanwhile, the Copilot app and the iOS and Android mobile apps were each building their own integration with cloud agents. GitHub wanted one independently versioned protocol in place of these one-off integrations.

Technically, AHP is organised around channels identified by URIs. Every server must implement the root, session and chat channels. Optional channels can add terminal support, MCP-related features or OTel reporting. Each channel holds a reducer-based state object, and the server is the authority on that state. Clients send actions that either change the state or trigger side effects, such as sending a chat message. After a network drop, a client resends its queued actions and waits for the server to reconcile and acknowledge them. The protocol deliberately says nothing about how agents behave, only about how users interact with them.

There are two separate host implementations. VS Code's host is written in TypeScript and ships in the VS Code Server bundle. It runs locally and can be placed on other compute over SSH, containers, WSL or Dev Tunnels. GitHub's host is written in Rust and built to run in the cloud, across a wider range of infrastructure and security constraints. The new stack is built on the Copilot SDK rather than the Copilot Chat extension. That extension had grown past 400,000 lines of TypeScript and depended entirely on the VS Code extension API. Like MCP, AHP allows vendor-specific extensions through custom methods and _meta data.

AHP libraries exist for Rust, TypeScript, Kotlin, Swift, .NET and Go, so third parties can write their own clients and servers. In the Copilot app, connecting to a third-party host requires the experimental setting Experimental > Direct Connections, then Environments > Add Agent Host Protocol Host. In VS Code, the option is Add Remote Agent Host in the Agents window. Running code agent host starts a standalone host. Running code agent endpoints lists the endpoints of the host built into the editor.

The post does not address security. It does not say how clients authenticate to hosts or how host endpoints are protected. It also does not describe any controls administrators can apply across an organisation. Administrators will need to look for that information in GitHub's documentation before allowing third-party or remotely exposed agent hosts.

Action plan

What to do now

  1. Inventory the workstations and environments where the Copilot app or VS Code run agent hosts, including remote machines reached over SSH, WSL, containers or Dev Tunnels.
  2. Decide whether the experimental Direct Connections setting and third-party AHP hosts are acceptable in your organisation, and tell developers.
  3. Run code agent endpoints on a test machine to see which endpoints the VS Code built-in agent host exposes.
  4. As general good practice, check GitHub's documentation on how these endpoints are authenticated and protected before rolling agent hosts out more widely.

Sources