· via dev.to (home feed)
VS Code Agent Host moves Claude and Codex sessions out of the editor window
VS Code's Agent Host runs Copilot, Claude and Codex harnesses in a dedicated process, letting sessions survive a closed window — at the cost of some vendor CLI features and editor functions.

A dedicated process for agent runtimes
According to a dev.to write-up by Gabriel Anhaia, VS Code 1.129, released on July 15, 2026, introduced the Agent Host: a separate process that runs agent harnesses — the runtimes behind Copilot, Claude and Codex — rather than running them inside a window's extension host. The old arrangement meant an agent belonged to the window that started it, so closing that window killed any long-running task. Two September releases widened the design further: version 1.138 let agent sessions run inside a local Dev Container, and 1.139 extended the same capability to SSH, Tunnel and WSL hosts.
How the pieces talk
Editor windows never speak to the agents directly. They communicate with the Agent Host over the Agent Host Protocol (AHP), an open, MIT-licensed specification that the write-up describes as state-first: the host converts harness events into durable state plus an ordered stream of actions, and every mutation carries a monotonic sequence number so multiple clients viewing the same session converge on the same view. A client that connects gets a snapshot followed by subsequent actions; a client that drops and reconnects can replay what it missed. Transport is a message port for local communication and JSON-RPC over WebSocket for remote connections. The host can be a local utility process or a standalone server on another machine, launched with a code agent host command.
What the design buys
The headline benefit is durability. Per the documentation cited in the post, an active turn keeps running after its project window closes, as long as the Agent Host stays up, and the same session can be rendered from several VS Code windows at once. Agents running on the host also gained tools to list, read and create sessions, and to message sessions they created, with user confirmation required each time.
Dev Container support sits behind the chat.agentHost.devContainer.enabled setting, is labelled experimental, and requires Docker locally or on the remote host. The 1.139 release also moved session metadata into a central catalog, cutting a first listing of roughly 645 sessions from 1.3 seconds to 0.1 second. From version 1.142, released October 14, organizations that set managed permissions or enable sandboxing must use the Copilot harness in the Agent Host for full chat sessions so those policies can be enforced, and the Copilot harness is becoming the default for new sessions.
What it costs
The write-up argues the real price is that the editor shows an adapter's rendering of the agent rather than the agent's own interface. Claude on the host runs through the Claude Agent SDK, which supports only commands that work without an interactive terminal — commands such as theme selection simply aren't offered. Those SDKs are a separate download, fetched on first use rather than shipped with VS Code. Some editor features don't carry over either: Canvases are unsupported for Claude and Codex, the Codex harness is experimental, and using it through a Copilot subscription requires Copilot Pro+, with a ChatGPT sign-in as the alternative. While the 1.142 enterprise policies are in force, Claude, Codex and terminal chat are unavailable outright. Lifecycle caveats remain: local sessions need VS Code itself to stay running, since it manages the local host, and reconnecting to a remote session doesn't recover work that stopped while the host was down.
A competing default
The post's author builds Hermes IDE and discloses that interest up front. His project chose the opposite approach, running each vendor's CLI in a real terminal and observing hook payloads, terminal notification sequences and exit codes rather than rendering a structured view — on the theory that rendered views keep lagging behind fast-moving vendor CLIs. He permits a structured view only where a vendor documents a stable machine protocol, and only as an opt-in.
Why it matters
Decoupling agent lifetime from editor lifetime is a structural change for AI-assisted coding, where long refactors routinely outlast the window that started them. The open, state-synchronizing protocol also points toward multi-client agent tooling that isn't tied to a single editor. But the trade-off — durability and multi-window sync versus the fidelity of each vendor's native interface — is now a live design question for every tool in this space, and VS Code has clearly picked a side.
- #vs-code
- #ai-agents
- #developer-tools
- #claude
- #copilot