Breaking the Editor Barrier: Introducing the Open Agent Host Protocol for Universal AI Continuity

In the rapidly evolving landscape of artificial intelligence, the paradigm of the "AI assistant" is shifting. We have reached a point where AI models are sufficiently autonomous to work for hours or even days on complex tasks without constant human oversight. However, this increased capability has exposed a critical limitation in current software architecture: the "agent silo." For AI to truly become a reliable partner in a developer’s workflow, it cannot be confined to a single application window. True productivity requires that an agent’s state remain accessible across editors, mobile devices, web interfaces, and cloud environments.

To address this, GitHub has introduced the Agent Host Protocol (AHP), an open standard designed to facilitate seamless session continuity. By moving away from proprietary, client-specific integrations, the AHP enables a unified experience where a task started in a desktop IDE can be reviewed on a mobile phone and finalized in a cloud-based development environment. This transition represents a fundamental rethink of how we build and deploy AI agents.

The Obsolescence of Client-Specific Integrations

Historically, GitHub Copilot was developed primarily as a VS Code extension. While this allowed for a deep, integrated experience within the editor, it also created a rigid dependency between the agent’s "life" and the application’s lifecycle. In this model, an agent’s state was tethered to the extension host. When a developer closed a VS Code window, the agent effectively vanished. If the editor required an update or a restart, the session was interrupted, forcing a cumbersome reconnection process. Furthermore, connecting to a remote machine often resulted in an entirely new extension host, creating a disjointed experience that failed to account for the modern developer’s multi-device, multi-environment workflow.

Building the Agent Host Protocol for sessions that continue across devices

As GitHub expanded its product suite—developing the standalone Copilot app and integrating features into its iOS and Android mobile platforms—it became clear that individual, bespoke integrations for every product were unsustainable. Each product was essentially reinventing the wheel to achieve session continuity. Developers were left with a fragmented experience: they wanted to carry their AI-driven workflows across terminals, mobile devices, and custom-built tools, but they were held back by the lack of a universal language for agent communication.

The industry required a standard, independently versioned protocol that could act as a bridge between various clients. By creating the Agent Host Protocol, GitHub aims to decouple the agent’s logic from the specific UI client. A shared protocol ensures that every client—be it a desktop IDE, a command-line interface, or a custom application—can access the same agents, history, and state, without requiring custom, one-off engineering for each surface.

Designing a Protocol for Ubiquitous Agent Interaction

The design philosophy behind the AHP is rooted in the necessity for fluidity. A developer might start a complex coding task in a cloud-based environment via their phone, only to pick up that exact session later on their laptop. To achieve this, the protocol had to be robust enough to handle network instability, frequent reconnections, and the challenges of concurrent modifications from multiple clients.

Building the Agent Host Protocol for sessions that continue across devices

Crucially, the creators of the AHP decided to keep the protocol agnostic regarding agent behavior. Unlike the Language Server Protocol (LSP) or the Debug Adapter Protocol (DAP), which serve as established standards for specific domains, the field of AI agents is still in its infancy and changing rapidly. By avoiding the encoding of "how" an agent works, the AHP focuses exclusively on the interaction layer—how a user communicates with the agent and how the agent reports its state. This minimalism ensures that the protocol remains simple enough to implement, while its extensible nature allows for specialized functionality like terminal support, Model Context Protocol (MCP) integrations, or OpenTelemetry (OTel) reporting.

The core of the AHP is built around URI-identified "channels." These channels serve as the primary units of functionality. While every server implementation is required to support root, session, and chat channels, developers have the flexibility to add optional channels to suit their needs. Within these channels, a reducer-based state management system is employed. Because the server serves as the ultimate arbiter of truth, it maintains the state, while clients send sequences of actions to either trigger side effects—such as sending a chat message—or mutate that state.

This architecture offers significant advantages. For instance, in environments with poor network connectivity, a client can simply queue actions and wait for the server to reconcile them, providing a smooth, "loading" experience that feels native. Furthermore, the reducer-based model is highly compatible with modern UI frameworks like React, making it straightforward for developers to build responsive, state-aware frontends.

Building the Agent Host Protocol for sessions that continue across devices

Scaling Implementation Across Diverse Infrastructure

Implementing the AHP in VS Code required a massive undertaking: building an entirely new agentic stack from the ground up. The existing Copilot Chat extension had evolved over three years into a massive codebase of over 400,000 lines of TypeScript. Because it was so deeply intertwined with the VS Code extension API, it could not simply be ported to a standalone process.

The team leveraged the Copilot SDK as the foundation for this new stack. Developing a harness that could handle simple tasks was straightforward, but replicating the extensive feature set that users had come to expect from Copilot Chat proved to be a complex, multi-month challenge. This transition saw the VS Code agent host grow to nearly 370,000 lines of code, while the GitHub Agent Host—written in Rust to accommodate a wider variety of cloud infrastructure and security constraints—reached over 300,000 lines.

Having two separate implementations—one in TypeScript for local VS Code environments and one in Rust for the cloud—has served as a rigorous test of the protocol’s viability. It forced the teams to reconcile differences in their approaches and identify gaps in the protocol. For example, early iterations of the AHP struggled to represent certain shell-type tool outputs that were not backed by a pseudo-terminal (PTY). By working through these discrepancies, the teams ensured that the AHP was not just a theoretical standard, but a truly portable protocol that works in practice.

Building the Agent Host Protocol for sessions that continue across devices

This collaborative development has confirmed that the AHP can accommodate different languages and environments while maintaining a consistent experience for the user. It also provides "escape hatches" through custom methods and metadata, allowing developers to handle edge cases or platform-specific signaling without breaking the core standard.

The Future of Connected AI Workflows

Today, the Agent Host Protocol is the engine driving continuity across all GitHub and VS Code surfaces. Whether a developer is working within the GitHub Copilot app, utilizing cloud sandboxes, or relying on VS Code, the underlying communication is unified by the AHP. This allows for a truly "connected" experience: a task might be initiated on a desktop, have a tool call approved from a mobile device, and eventually be finalized by an automated cloud agent.

The protocol has been designed with accessibility in mind. Libraries are now available in a variety of languages, including Rust, TypeScript, Kotlin, Swift, .NET, and Go. This ecosystem has already begun to foster innovation, with developers building everything from real-time agent status displays on hardware macropads to sophisticated Kanban-style task management tools.

Building the Agent Host Protocol for sessions that continue across devices

As an open standard, the AHP is not intended to be a closed tool for GitHub alone. By making the protocol, the samples, and the infrastructure available to the public, the creators hope to see it adopted by a wider range of editors, third-party apps, and custom agentic systems. For those looking to integrate, the protocol allows for direct connections in both the Copilot app and VS Code. As the industry continues to move toward more autonomous and multi-surface AI interactions, the Agent Host Protocol provides the necessary infrastructure to ensure that these tools remain as flexible and mobile as the developers who use them.

Share:

Asep Darmawan writes for Tech Maze.