GitHub says Copilot agent sessions can now continue across VS Code, the GitHub Copilot app and cloud environments through the Agent Host Protocol, or AHP. The open standard gives clients a shared way to access an agent’s session, history and state, so developers can pick up work from another app or device.
Previously, Copilot’s agent in VS Code ran inside an extension tied to one editor window. Closing the window ended the agent, and a VS Code restart stopped running agents. GitHub’s other apps had separate integrations with cloud agents. AHP gives those clients a common way to connect to sessions.
The protocol focuses on how clients interact with agents rather than defining how the agents work. Every AHP server must support channels for basic connection functions, sessions and chat. Servers can add channels for features such as terminal access. A server holds the session state, while clients send actions for it to process. GitHub says this design lets clients reconnect and replay queued actions after a network interruption.
GitHub built hosts in TypeScript and Rust
GitHub built separate agent hosts for VS Code and its wider infrastructure. The VS Code host is written in TypeScript and can run locally or on remote computing environments. GitHub’s host is written in Rust and is designed to run across its cloud infrastructure. According to GitHub, making the two implementations work with each other exposed gaps and assumptions in early versions of AHP.

GitHub says AHP now underlies agent sessions running locally in the Copilot app, in cloud sandboxes and in VS Code. Libraries are available in Rust, TypeScript, Kotlin, Swift, .NET and Go for developers building their own clients or servers.
Developers can connect their own agent host
Developers can connect their own agent host in the Copilot app by enabling Direct Connections under Experimental settings, then adding an Agent Host Protocol host under Environments. VS Code offers Add Remote Agent Host in its Agents window. GitHub also provides a standalone VS Code agent host and samples for developers getting started.



