Zed and JetBrains Rebuild ACP v2 so Coding Agents Never Block Your Work
ACP v2 enters Preview with background work, subagents, and retry rules, letting agent clients track long-running tasks without canceling turns.
Takeaways
- ACP v2 moves from Draft to Preview, co-built by Zed and JetBrains.
- Prompts no longer own the turn; agents return a messageId and queue instead of rejecting.
- Background list exposes running terminals, tool calls, and subagents in state updates.
- Granular tool_call/cancel and terminal/cancel let clients stop one item without killing the turn.
- idempotencyKey on session/prompt deduplicates retries after dropped connections.
- Subagents are baseline; JSON-RPC batches removed; stricter error codes required.
The ACP v2 announcement moves the protocol from Draft to Preview, with a redesigned session model for coding agents that continue working while developers edit, send prompts, and manage other tasks. Zed and JetBrains developed the revision inside their editors over 17 alpha releases, testing it with Claude and Codex adapters.
ACP is an open JSON-RPC standard for communication between code editors and coding agents. It serves a role similar to the Language Server Protocol for language tooling and the Model Context Protocol for external tools, while focusing on agent sessions, messages, plans, tool calls, terminals, and delegated work.
Prompts no longer lock the session
The central API change separates prompt acceptance from turn completion. Under v1, a prompt occupied the session until the agent finished its turn. In v2, session/prompt acknowledges the submission while work continues. The agent can insert the prompt immediately or queue it, and it cannot reject the request solely because the session is busy.
A successful response includes the messageId assigned to the user message. Clients can therefore distinguish an accepted prompt from a failed request without inferring state from later events. A JSON-RPC error means the message was not inserted.
An agent that fails after accepting a prompt reports an idle state_update with the stop reason error. The update can include the JSON-RPC error object, giving clients structured failure details after work has begun.
Background work becomes visible and cancellable
Session state can become idle while terminals, tool calls, or subagents continue running. State updates now include a background list that identifies this independent work. Editors can use the list to show active tasks and warn when closing a session would terminate them.
Cancellation also becomes more precise. Tool calls can report a paused status, while tool calls and terminals can advertise capabilities.cancel. A client may then invoke tool_call/cancel or terminal/cancel for one operation. The existing session/cancel method still stops foreground work for the session, so developers can terminate a stalled npm install without cancelling the entire turn.
Subagents become child sessions
ACP v2 treats delegation as baseline protocol behavior. An agent can expose delegated work through child sessions, each with its own sessionId. Messages, plans, and tool calls from a child arrive through the same session-update model used for the parent.
Every v2 client must process child sessions, although editors may choose how to display them. This requirement gives agents a standard way to expose delegated work without forcing a particular interface on client developers.
Retries gain duplicate protection
Long-running and eventually remote sessions need to recover from dropped connections without repeating user messages or losing track of replayed history. ACP v2 adds three mechanisms:
replay_completemarks the end of history returned aftersession/resume, allowing clients to distinguish a complete replay from an interrupted one.idempotencyKeyidentifies repeatedsession/promptrequests. While the agent retains the key, a retry returns the originalmessageIdwithout inserting another message.- Per-method retry classifications specify whether a request is safe to resend and describe the effect of a duplicate.
The wire format gets stricter
Version 2 removes JSON-RPC batch requests, matching MCP’s approach. Request IDs must be strings or integers and cannot be null. These constraints reduce ambiguity between implementations.
The specification also requires consistent error codes:
-32601for an unimplemented method-32002for a missing session-32600for requests sent before initialization-32022wheninitializecannot negotiate a compatible protocol version
An error with code -32022 includes the versions supported by the agent, giving clients enough information to select another version or report the incompatibility.
Upsert metadata also gains defined patch semantics. For top-level _meta, an omitted field preserves stored metadata, null clears it, and an object updates individual keys. Implementations no longer need to guess whether an upsert replaces or merges metadata.
Remote transport remains separate
The Preview does not include remote transports or dedicated APIs for prompt steering and queue management. The session model accounts for those features, but their methods can be added later without another breaking protocol revision.
How to test the Preview
ACP v1 and v2 can run side by side, allowing clients and agents to add Preview support without dropping stable integrations.
| Implementation | ACP v2 status |
|---|---|
| Rust SDK quickstart | Available behind the unstable_protocol_v2 feature flag |
| TypeScript SDK docs | Available from @agentclientprotocol/sdk/experimental/v2 |
| Kotlin and Python SDKs | APIs in development |
| Claude adapter | Serves v1 and v2 |
| Codex adapter | Serves v1 and v2 |
Teams moving from the v2 Draft should follow the migration guide. The changes most likely to require code updates are the mandatory messageId response field and required handling for child sessions.
Preview status indicates that the design is approaching stability while remaining open to changes based on implementation feedback. The ACP team is collecting reports through GitHub issues and comments on its request-for-discussion documents before freezing the v2 API.