Skip to main content
ACP v2 is a consolidation release. It redesigns the prompt lifecycle, unifies streaming and non-streaming updates, makes the schema forward-compatible by default, and removes Client APIs that few implementations used. Migrating does not mean dropping v1. v1-only Agents and Clients will remain common for some time, so implementers should support both versions side by side: negotiate the version per connection, keep your v1 support working, and add v2 next to it. See Supporting v1 and v2 side by side for how to structure this. If you only remember five things, remember these:
  1. The session/prompt response no longer ends the turn. It acknowledges acceptance. Foreground progress and completion arrive as state_update notifications, and the stop reason moved there too, including failures after acceptance.
  2. Updates are upserts. Messages and tool calls are patched by ID with uniform semantics: omitted field = unchanged, null = cleared, value = replaced, chunks append. Plans are replaced whole by planId.
  3. The Client file system, terminal execution, and session modes APIs are gone. Agent-owned terminal output is a separate, display-only v2 feature. Use client-provided MCP servers when the Agent needs Client-side tools.
  4. Capabilities were reorganized. One capabilities + required info field on both sides, session-scoped groups nested under session, object support markers instead of booleans, and a required baseline of session methods.
  5. Everything is extensible now. Almost all enums and tagged unions accept unknown values. _-prefixed values are yours, the rest are reserved for future ACP versions.

Scope: stable v2 and draft features

This guide describes the stable v2 baseline (schema/v2/schema.json). v2 as a whole is in Preview: it is ready to build on, and it is not frozen. Agents can serve v2 to any Client that requests it, because version negotiation decides what each connection speaks. Clients choose when to request v2, and we suggest keeping that choice opt-in for users while Preview feedback comes in. The unstable schema (schema/v2/schema.unstable.json) layers experimental features on top of that baseline. Negotiating protocolVersion: 2 does not imply support for them. Follow each feature’s documented negotiation requirements: optional operations requiring peer participation use explicit capabilities or another documented mechanism, while informational additions with safe forward-compatible handling may be sent without a capability when the feature permits it. Local feature flags control rollout, not peer support. See Experimental Features and Negotiation.

Version negotiation

The Client sends the latest protocol version it supports in initialize. An Agent implementing v2 selects the highest supported version at or below the requested version, or rejects initialization with -32022 (Unsupported protocol version) and structured requested and supported data if none exists. To use v2, send "protocolVersion": 2. A legacy v1-only Agent can return "protocolVersion": 1 to a Client requesting v2. The Client continues only if it supports v1, otherwise it disconnects. A v1 Agent reads a v2 request without the v1 clientCapabilities and clientInfo, so file system, terminal, and terminal authentication support are lost on that connection. A Client that needs them reconnects with a v1 initialize. Conversely, a v1 Client talking to a v2-only Agent receives an ordinary initialization error. It does not need to understand the new error code to report that initialization failed. Treat v2 support as additive. Keep serving protocolVersion: 1 peers when you add v2: an Agent that drops v1 cuts itself off from existing Clients, and a Client that drops v1 loses access to existing Agents. Each side picks its v1 or v2 handlers per connection based on the negotiated version. v2 keeps the underlying JSON-RPC framing, except that request IDs can no longer be null and JSON-RPC batches are not used (see Transports), so a single connection always speaks exactly one negotiated version after initialize.

At a glance

Method changes

session/update variant changes

Initialization

Role-agnostic info and capabilities

v1 used role-specific field names: the Client sent clientCapabilities and optional clientInfo, and the Agent returned agentCapabilities and optional agentInfo. v2 uses the same two field names in both directions (capabilities and info), and info is now required on both sides.
Both responses above have an empty authMethods array. In v2, omitting authMethods has the same availability meaning: the Agent does not advertise auth/login or auth/logout, and Clients MUST NOT call auth/login or auth/logout.

Support markers are objects, not booleans

In v1, capability support was a mix of booleans ("image": true) and objects ("list": {}). In v2, every support marker is an object: supplying {} (or an object with fields) means supported, and omitting the key or supplying null means unsupported. This means checks like promptCapabilities.image === true become presence checks: capabilities.session.prompt.image != null. The object shape leaves room for each capability to grow fields or extend with _meta without another breaking change.

Capability reorganization

  • All session-scoped capability groups now live under capabilities.session. What was agentCapabilities.promptCapabilities is now capabilities.session.prompt, and agentCapabilities.mcpCapabilities is now capabilities.session.mcp.
  • capabilities.session itself is optional, so Agents that don’t do session-based prompting (for example, Agents that only serve extension methods) can omit it entirely. Currently there isn’t protocol support for this, but several experiments are in flight and we are making sure non-session components can be expressed via capabilities.
  • loadSession is gone along with session/load (see Session setup).
  • The individual list, resume, and close markers are gone: advertising capabilities.session at all now requires supporting the baseline methods session/new, session/list, session/resume, session/close, session/prompt, session/cancel, and session/update. Optional extras such as session.delete, session.additionalDirectories, session.prompt, and session.mcp keep their own markers.
  • The v1 Client capabilities fs and terminal are removed entirely (see Client file system and terminal execution). Stable v2 defines Client auth and elicitation capability groups. Agent-owned terminal display is baseline behavior, not a Client execution capability.

Complete v1 → v2 capability mapping

The tables below cover the capability fields in the stable and draft schemas. Paths in the first column are relative to v1 agentCapabilities or clientCapabilities. Paths in the second are relative to v2 capabilities. A Draft only row does not become available merely by negotiating v2. Convert a boolean support marker from true to {} and from false to an omitted key or null only where the table defines a corresponding v2 marker. Object support markers remain objects. Do not copy removed v1 fields into v2 capabilities or move them into _meta as though they were standard v2 capabilities. A removed marker may mean the feature is now baseline, not that the feature was removed.

Agent capability fields

Client capability fields

The per-child-session capabilities.cancel marker in subagent_update is unchanged. It is not an initialize capability. For surviving capability objects, move _meta with its owning group (for example, Agent promptCapabilities._meta → capabilities.session.prompt._meta). Root capability metadata moves to capabilities._meta. For removed groups or markers, review extension semantics and choose a supported root or nested _meta location explicitly. See Advertising Custom Capabilities. Receivers MUST ignore unknown fields, including nested capability fields, but this does not make v1 field names valid v2 advertisements. See Unknown Object Fields.

Authentication

The auth methods are grouped under an auth/ prefix:
  • authenticate → auth/login. The params are unchanged (methodId selecting an advertised method whose type defines a protocol-driven login flow). The descriptor’s identifier field is renamed from id to methodId to match, and its type discriminator is now required.
  • logout → auth/logout. In v1, logout support was opt-in via a capability marker. In v2, returning a non-empty authMethods list advertises auth/login and auth/logout, and the Agent MUST implement both auth/login and auth/logout. If authMethods is omitted or empty, Clients MUST NOT call either method. There is no logout support marker. capabilities.auth remains orthogonal and advertises only authentication-related extensions.

Auth methods

Each entry in authMethods now uses methodId instead of id, and carries a required type discriminator so future auth flows can be introduced without breaking existing implementations:
Because this entry makes authMethods non-empty, the Agent MUST support both auth/login and auth/logout. type: "agent" is the method type that uses auth/login’s protocol-driven flow. Stable v2 defines two types: agent and terminal. Custom types MUST begin with _. Unknown values without a leading _ are reserved for future ACP versions.

Terminal auth methods

terminal methods work as in v1: the Client launches the configured Agent program interactively with the method’s args and env, and never sends auth/login for them. Besides the methodId rename, two things changed shape:
  • env is an array of { "name", "value" } entries, instead of an object that maps names to values. Each entry SHOULD have a unique name. Otherwise the last entry with a given name wins.
  • The Client advertises terminal auth support with the support marker capabilities.auth.terminal: {} instead of clientCapabilities.auth.terminal: true (see Support markers).

The new prompt lifecycle

This is the most significant semantic change in v2. Read this section even if you skim the rest. In short, foreground progress and completion moved from the pending session/prompt request into session/update notifications, while the response now acknowledges user-message insertion:

v1: the response is the turn

In v1, session/prompt stayed pending for the entire turn. The Agent streamed session/update notifications while working, and the eventual response carried the stopReason that ended the turn:
This entangled prompt acceptance with turn completion, which made replay, multi-client sessions, background work, and queued messages awkward to express.

v2: the response acknowledges insertion

In v2, acceptance means insertion of the user message into the ACP conversation. The Agent MUST respond to session/prompt once the message has been inserted, without waiting for foreground processing to finish. Merely receiving, queueing, or assigning an ID to the input does not justify a successful response:
messageId is a required, non-null string identifying the inserted user message. The request gains only the optional idempotencyKey. Clients do not generate this ID. The unstable v1 usage field on the prompt response has moved: in the unstable v2 schema, end-turn usage is an optional usage on the idle state_update. Insertion adds a logical user message with an ID and a position relative to other messages. See Prompt Accepted for adapter examples. Clients MAY send session/prompt while foreground work is active. Unlike many v1 Agents, a v2 Agent MUST NOT reject a prompt only because work is active: it inserts it right away or holds it and inserts it later, in the order received. A held prompt’s response stays pending until insertion. Only session/cancel and session/close are guaranteed to drop it. See Prompts During Active Work. Everything else happens through session/update notifications:
  1. User message update. The Agent MUST report the inserted message’s content and placement, either as a user_message update with a full content array or as streamed user_message_chunk updates. These use the same agent-owned messageId as the response. The response and updates describe the same insertion, but updates may arrive before or after the response:
  2. Active state. When foreground work starts, the Agent MUST report running, or requires_action if it starts blocked on user action. After reporting requires_action, it MUST report running when foreground progress resumes. Active state reporting may precede insertion, for example while a foreground hook runs. It is not acknowledgment of insertion.
  3. Output. Messages, thoughts, plans, and tool calls stream as before (with the changes described in the following sections).
  4. Completion. When foreground work ends, the Agent MUST report idle and SHOULD include the stop reason:
Clients reconcile their submitted input with the response’s (sessionId, messageId), including when the message update arrived first. They MUST NOT match by content or assume that a successful response means the session is idle. SDKs must keep the session’s processing and notification handling alive after the prompt RPC completes. An Agent may know it is idle without knowing why the work stopped. Clients MUST recognize idle even when the stop reason is omitted, null, or unknown. They cannot infer success or failure without a recognized stop reason. User messages, including locally handled commands, MUST be reported live but need not be retained. If an Agent retains and replays an inserted user message, it MUST reuse the response’s ID. A lost prompt response is ambiguous. Neither replay omission nor an identical message proves which submission was inserted. v2 adds an optional idempotencyKey to session/prompt. If the Agent still recognizes the key for an inserted message, a retry returns the original messageId. Without a key, or after the Agent forgets it, a retry can insert another message and run the work again. See Retrying a prompt. Pre-insertion rejection receives a JSON-RPC error response with no user-message updates for that submission. State updates still describe actual foreground work, independently of the request outcome. See Prompts that are never inserted.

Session states

state_update is new in v2 and reports foreground work, whether or not a prompt started it, using one of four stable states (extensible like most v2 enums):
  • running: Foreground work is in progress.
  • idle: No foreground work is active. Background activity may continue. Agents SHOULD include a stopReason when the transition ends foreground work.
  • requires_action: Foreground work as a whole is blocked on user action. Agents SHOULD send this when blocked, including on elicitations. Once reported, they MUST send running when foreground progress resumes, or idle if the work ends without resuming.
  • unknown: The Agent cannot currently determine foreground activity, for example after it loses the event feed of a child session. It is not an outcome. Clients stop presenting an earlier running or requires_action as confirmed activity until a later state replaces it.
Foreground work is the Agent’s active response or workflow in the session, including model processing, tool execution, and waiting for user action needed to continue. Agent-initiated work, such as pursuing an ongoing goal or following up on a completed background task, MUST use the same foreground lifecycle as prompt-driven work, with the same guidance for stop reasons. It does not require a prompt request or a synthetic user message. Background activity can continue and emit other session/update notifications while the Agent reports idle. A detached task’s progress, completion, or permission request does not by itself change the foreground state. If the Agent starts a response or workflow to act on a background result, it MUST report an active state and report idle when that work ends, and SHOULD include a stop reason on the idle update. See Foreground and Background Work for contrasting examples. State updates may also carry a background list of the work still running, so Clients can tell an idle session with running work from a quiet one. session/cancel leaves that work running and no longer cancels permission requests for it. States are aggregate snapshots, not per-request events. Clients MUST apply repeats idempotently, without counting additional work or completions. With concurrent user-action requests, resolving one does not emit running unless foreground progress actually resumes. If other foreground work can progress, the state remains running while requests are pending. The Agent MUST report idle when no foreground activity remains, even between immediately consecutive turns. Completing an individual prompt or command while other foreground activity continues does not require a boundary. Accepted local slash commands MUST also report an active state and completion when handled from idle, even without model work. A command with no user-action wait uses running → idle. New sessions default to idle until a state update reports otherwise. Updates may arrive before the new-session response, which does not overwrite them. An Agent whose new session is not idle MUST send the session’s state_update after the response. Every successful session/resume MUST be preceded by a current-state snapshot, after any requested replay. Resume does not imply idle, and Agents MUST NOT replay historical state updates as current activity. See Current-State Synchronization and the transition table and lifecycle examples. The v1 stop reasons (end_turn, max_tokens, max_turn_requests, refusal, cancelled) keep their names. They moved from the session/prompt response to the idle state_update and describe why foreground work stopped. refusal lost one meaning. The v1 schema said that the user prompt and everything after it would not be included in the next prompt, and that the UI should show this. In v2, refusal only reports that the Agent refused to continue. The idle update names no message, and foreground work can cover no user message or several, so a Client does not remove or mark messages because of it. v2 adds the error stop reason. v1 reported a failure during the turn as an error response to the pending session/prompt. In v2, once the user message is inserted, a failure ends foreground work with an idle state_update whose stopReason is error and whose optional error field carries the same JSON-RPC error object. An error response to session/prompt now always means the message was not inserted. See Failures.

Cancellation

$/cancel_request and internal request cancellation can no longer answer an inserted session/prompt with -32800: once the user message is inserted, the Agent responds with its messageId, so an error response always means the message was not inserted. Stop the work it started with session/cancel. session/cancel is still a notification. When cancellation stops active foreground work, the Agent MUST send that work’s pending updates, then an idle state_update with stopReason: "cancelled", before starting new foreground work in that session. A later prompt can be inserted and acknowledged during cancellation or held with its response pending. The Agent MUST answer earlier prompts it has not inserted with -32800. Listed background work can continue reporting updates after the idle update. The Agent stops waiting for the cancelled work’s pending session/request_permission requests. Agents MUST cancel those requests, and pending elicitations the work no longer needs, individually with $/cancel_request rather than cancel every request with that session ID. The Agent decides which requests those are. Clients no longer answer every pending permission request when they send session/cancel. They SHOULD dismiss and answer a request when the Agent cancels it with $/cancel_request. session/close cancels ongoing work the same way, and unlike session/cancel it also stops the session’s background work. When it cancels active foreground work, the Agent sends the final updates and the idle cancelled state before responding to session/close, and answers prompts it never inserted with -32800. After cancellation completes, Agents SHOULD ignore late answers and external completions rather than use them to resume the cancelled work. Responses can race with cancellation before completion. A repeated or resume snapshot carrying an old cancelled stop reason does not cancel a current interaction. If no foreground work was active, no additional completion update is required.

Replay and Agent-initiated work

Because foreground progress is now expressed entirely in notifications, the same message flow works for history replay on session/resume and agent-initiated work. It also supports future queued-work flows.

Messages and message IDs

Message IDs are required

Every message chunk and message update in v2 MUST carry a messageId. In v1, messageId was optional on chunks. Message IDs are opaque strings generated by the Agent: the Agent owns session history, so it is the single source of message identity. All chunks of one message share one messageId. Chunks for different messages can interleave, and a new messageId does not end earlier messages. An entity keeps the timeline position of its first update. See Entity IDs. Message IDs are unique per message type within a session, not across types: a user message, an Agent message, and an Agent thought may share the same messageId and remain distinct messages. The same applies to other entity IDs such as toolCallId and planId. Clients key entities by type and ID. See Entity IDs.

Whole-message upserts

Alongside the chunk updates, v2 adds user_message, agent_message, and agent_thought updates that carry a full content array (chunks carry a single content block). These are upserts keyed by messageId, with three-state patch semantics:
  • Omitted content leaves existing content unchanged (useful for updating _meta or other fields without resending content).
  • content: null or content: [] clears the message content.
  • A concrete array replaces all content currently stored for that message, including content accumulated from earlier chunks.
Chunks always append to whatever content is current. For example: agent_message with content: [A], then agent_message_chunk with B renders as [A, B]. A later agent_message with content: [C] resets the message to [C], and subsequent chunks append to that. Use chunks for streaming, and whole-message updates for output that is already complete, such as corrections or replay.

Tool calls

One upsert notification

v1 had tool_call (create) and tool_call_update (modify). In practice the split bought nothing, so v2 keeps only tool_call_update. The first update with an unseen toolCallId creates the tool call. Subsequent updates patch it. Only toolCallId is required, but the Agent SHOULD include title on the first report:
The patch semantics are the same three-state model as messages: omitted fields stay unchanged, null explicitly clears a field, and concrete values replace. Array fields such as content and locations are replaced wholesale when present. The optional name metadata is available in both versions. Concrete names map directly between versions, but v2’s name: null clear cannot be represented by a v1 update because v1 treats null like omission. A strict adapter must reject that conversion, while an intentionally lossy adapter may omit the clear. The remaining fields (title, kind, status, content, locations, rawInput, rawOutput) and kind values are unchanged from v1, except that a location’s line no longer accepts 0. The status enum adds cancelled and paused, and both enums are now extensible. tool_call_update also gains an optional capabilities field. See Background work and cancel controls. Top-level _meta is now stored tool-call state, too. v1 gave no rule for keeping a tool_call_update’s _meta, so Agents could use it for data about one report. In v2, a concrete _meta patches the tool call’s stored metadata by top-level key: keys it omits keep their stored values, a key set to null is removed, and any other value replaces that key whole (see Metadata Patches). A key sent on an earlier report therefore stays until the Agent sets it to null or clears _meta. Put data about a single report in the session/update notification’s params._meta instead.

Streaming tool-call content

v2 adds tool_call_content_chunk, which appends a single ToolCallContent item to a tool call instead of resending the whole array:
Chunks and updates compose exactly like message chunks and updates: a tool_call_update that includes content replaces the accumulated content. Later chunks append to it. The session ToolCallContent item is kept, and needs no Client capability in v2. It links a tool call to another session it operates on, such as a subagent it spawned, and is for display only. See Sessions.

Agent-owned terminal display

v2 retains a terminal ToolCallContent shape, but changes its ownership and meaning. It is now only a reference to a display terminal owned by the Agent:
The reference contains no mutable state. The Agent reports that separately with a terminal_update upsert keyed by terminalId:
Only terminalId is required. command, cwd, size, output, exitStatus, capabilities, and _meta are patch fields: omission leaves the stored value unchanged, null clears it, and a concrete value replaces it, except that a _meta object patches stored metadata by top-level key. On a first-seen terminal, omitted fields start unknown or empty. Every supplied cwd MUST be absolute. size is the terminal size in character cells, with required cols and rows. When present, Clients can use it to render output as the program wrote it. output is an authoritative replacement snapshot for replay, correction, or resynchronization. Its required data field is RFC 4648 base64-encoded bytes and is the complete byte sequence the Agent wants the Client to retain for the terminal at that point. A concrete snapshot replaces all previously stored bytes. Clients MUST NOT merge or splice bytes from the previous snapshot into it. Optional nullable output._meta is snapshot-scoped. Omission and null both mean no snapshot metadata was provided. A concrete exitStatus marks the terminal as exited. Its optional nullable exitCode and signal fields use omission or null when unavailable. Optional nullable exitStatus._meta is scoped to that exit information and likewise treats omission and null as equivalent. Conventional POSIX signal names include SIGTERM, SIGKILL, and SIGINT. Other platforms may use platform-specific names. For example: "exitStatus": { "signal": "SIGTERM" }. For efficient live output, the Agent sends append updates:
Each chunk’s data is independently base64-encoded. Decode each chunk separately, then append the resulting bytes in received order for that terminal. Do not concatenate encoded strings before decoding. Chunk boundaries may split UTF-8 code points and ANSI escape sequences, so text and terminal parsers retain state between chunks. A later terminal_update.output snapshot replaces all bytes accumulated so far, and subsequent chunks append to that replacement. A Client can use an isolated terminal emulator, but it only needs to provide a safe sanitized transcript fallback. The terminal is display-only: it has no input, resize, interrupt, wait, release, or execution semantics. The one control is opt-in cancellation, where an Agent lets the Client stop the process with terminal/cancel.

Background work and cancel controls

v1 had no way to say that work goes on after the turn that started it. v2 reports such work on entities the Client already tracks. See Background work.
  • background list. state_update carries an optional background list of the terminals, tool calls, and child sessions that run independently of foreground work. An Agent that reports background work MUST include the list on every state_update. Omitted or null means not reported, not that nothing is running.
  • paused status. A tool call that has started, is not running now, and will not continue until something resumes it reports paused. pending also covers work that is scheduled to run later. See Status.
  • capabilities.cancel. tool_call_update and terminal_update carry an optional capabilities field. While it advertises cancel, the Client can stop that one tool call with tool_call/cancel or that one terminal with terminal/cancel, without cancelling the rest of the session’s work. The Client MUST NOT send either request for an item that does not currently advertise cancel.
  • session/cancel and session/close. session/cancel does not cover work in the latest background list, which keeps running. session/close stops it.

Diff content

The v1 diff shape (a single path with oldText/newText) could not distinguish a deleted file from an emptied one, had no way to express renames, copies, or binary changes, and forced Clients to compute renderable diffs themselves. v2 replaces it with structured changes plus optional renderable patch text:
  • changes (required, with at least one entry) is the authoritative list of file-level operations. add, delete, and modify carry a path. move and copy carry oldPath and path. Each change may carry an optional fileType (text, binary, directory, symlink) and mimeType. Clients can build file trees and summaries from changes without parsing any patch text.
  • patch (optional) carries renderable text for some or all changes and MUST be consistent with changes. Stable v2 defines git_patch as one or more diff --git sections in Git’s --patch (-p) text format. Unlike Git’s repository-relative paths, every path MUST be absolute, including in rename from, rename to, copy from, and copy to lines, with no prefix such as Git’s default a/ and b/. Otherwise paths follow Git, including /dev/null for the missing side of an added or deleted file and Git’s quoting of unusual paths. See Diffs for producing this with git diff. Surrounding commit metadata and email envelopes MUST NOT be included. Agents SHOULD provide patch whenever feasible. Clients MUST handle diffs where patch is omitted or null (binary changes, symlink retargets, and similar cases have no useful text rendering).
A deleted file is now simply:
There is no mechanical mapping from v2 diffs back to oldText/newText. When migrating a v1 Client, render patch.text according to patch.format, using changes for headers, file trees, and non-text cases.

Edits known only as a snippet

Many v1 Agents filled oldText and newText with just the replaced snippet, such as an edit tool’s old_string and new_string, without reading the file. v2 has no form for a snippet: a git_patch hunk needs line numbers, and each entry in changes needs an operation, which a snippet does not always tell. An edit with an empty old_string, for example, is an add or a modify depending on whether the file exists. A tool that writes a whole file has the same gap: its input has the new contents, but not the old ones or the operation. Such an Agent has two options:
  • Read the file before the tool runs, and compute changes and patch from its contents.
  • Send no diff until the change is done. Until then, locations can still point the Client at the file.
Read the file somewhere the tool waits on, so it still holds its contents from before the change. Reading once the tool input is complete races an auto-approved edit, which may already have run, and the patch would then be computed against the edited file. A permission check is safe, but auto-approved edits skip it, so they need a hook that runs before the tool, such as Claude Code’s PreToolUse hook.

Permission requests

session/request_permission no longer takes a bare toolCall. The prompt copy and the subject of the request are now separate concerns:
  • title is required: human-readable text for the permission prompt itself. It does not update any tool call’s displayed title.
  • description is optional supporting copy.
  • subject is an optional tagged union describing what needs permission. Stable v2 defines type: "tool_call", whose toolCall payload is the same ToolCallUpdate upsert shape used in session updates, and type: "command", which describes an Agent-executed command. Requests may omit subject entirely for approvals without structured context, and unknown subject types SHOULD be preserved when proxying and either rendered generically or declined by policy.
In v1, Agents routinely stuffed permission prompt text into the tool call’s title, mutating displayed tool state as a side effect. In v2, put prompt copy in title/description and let subject.toolCall carry only genuine tool-call state. A command permission subject is self-contained rather than a patch:
command and cwd are required, and cwd MUST be absolute. toolCallId, terminalId, and _meta are optional and nullable. Omission and null are equivalent and mean the value was not provided. The IDs only associate the permission with displayed state and may be absent when permission is requested before execution. Approval authorizes the Agent to execute the command. It never asks the Client to execute it. options and the response shape are unchanged, except that options now needs at least one entry. A selected outcome is not approval by itself. The Agent MUST match optionId to an option in the original request. In the example above, optionId: "deny" selects reject_once, so the Agent MUST NOT run the script. For reject_always, the Agent denies the current operation and remembers the denial. It MUST NOT treat an unoffered ID or a kind or outcome it does not understand as approval. In v1, cancelled meant the prompt turn was cancelled. In v2 the Client also sends it when the user dismisses the prompt or the Client declines it by policy. The Agent MUST NOT proceed with that operation, but cancelled alone doesn’t mean the foreground work is ending. Cancellation is reported separately. While foreground work as a whole is blocked on a permission response, the Agent SHOULD report state_update with requires_action. Once reported, it MUST report running when foreground progress resumes, or idle if the work ends without resuming. A permission request for independent background activity does not by itself change the foreground state, and resolving a permission request does not itself imply running. Apply the aggregate transition rules, including with concurrent requests and late answers.

Elicitation

elicitation/create and elicitation/complete keep their shape, with one removal, one changed rule, and one changed error code. A string property in a form’s requestedSchema no longer takes pattern. v1 added pattern on top of MCP’s string schema. v2 has the same string keywords as MCP: minLength, maxLength, format, and default.
  • Agents stop sending pattern and check the submitted value themselves.
  • Clients stop evaluating pattern.
One rule also changes. An Agent MUST handle a response action it does not understand as cancel. In v1 it could not treat it as a known action. One error code changes too. A Client with no elicitation capability answers elicitation/create with -32601. v1 used -32602 for any mode the Client did not advertise, which is still the code for a Client that advertised elicitation but not the requested mode.

Plans

V1 supports the legacy plan checklist as well as identified plan operations for Clients that advertise plan. V2 uses only the identified operations and requires no capability. To report a legacy checklist in v2, send plan_update with type: "items" and a planId:
The items entry fields (content, priority, status) remain required. V2 priorities and statuses are extensible, and status adds cancelled. For markdown, send the complete content and optionally an absolute path. Each update replaces the whole plan with that planId, even if its type changes. An empty entries list empties a checklist. To remove a plan, send plan_removed with its planId. See Agent Plan.

Session setup and lifecycle

session/load is gone. session/resume does both

v1 had two ways to reattach to a session: session/load (replays full history, gated by loadSession) and session/resume (no replay, gated by sessionCapabilities.resume). v2 keeps only session/resume with an optional replayFrom cursor:
  • Omit replayFrom (or send null) for v1 resume behavior: reattach without replay. The Agent sends the current state_update and a current update for each terminal, tool call, and child session in its background list. It does not resynchronize messages or foreground tool calls, so a Client that wants them resynchronized requests replay.
  • "replayFrom": { "type": "start" } for v1 load behavior: the Agent replays all retained conversation history as session/update notifications (using the same updates as live traffic) before responding. The Agent can send current state, such as a terminal output snapshot, instead of every historical update. See Replay Contents.
v1 had no signal for the end of a session/load replay other than the response. In v2 the Agent sends replay_complete after the last replayed update and before the response. If the session is already active on the connection, the Client can still receive an earlier live update after sending session/resume. The marker identifies the end of the requested replay, not its start. A replay that ends without the marker and without a successful response is truncated. See Replay Complete. The cursor is a tagged union so future versions can add replay-from-a-point variants without new methods. The schema accepts custom and future cursor types for preservation by intermediaries, but Agents MUST reject unsupported types or malformed cursors with -32602 (Invalid params), not silently fall back to another replay mode. Retained user messages MUST preserve the ID returned by session/prompt. Agents SHOULD preserve Agent and thought message IDs when possible, but Clients cannot assume those IDs remain stable across reconnects or restarts. The same applies to toolCallId, terminalId, and planId. A Client attaching to a session can rebuild its transcript from a full replay of the retained history. If you replay messages as chunks, as many v1 Agents do, start each one with a message update carrying content: [] so the chunks don’t append to content the Client already holds, or send the message as one whole-message update instead. The same applies if you replay session-directed messages, tool-call content, terminal output, or compaction summaries as chunks: first send the entity’s update with that field emptied. This empty-content primer resets only the ID used in that replay. It cannot clear a message previously delivered under another ID. See Resuming Sessions.

Consistent lifecycle requests

session/new and session/resume take the same shape of environment parameters: a required cwd (absolute path), plus optional additionalDirectories and mcpServers. Note that mcpServers was required (even if empty) on session/new in v1 and is now optional. Omitting it and sending [] are equivalent. Both responses carry the session’s configOptions and availableCommands. An Agent whose session has configuration options or commands MUST include them, because a setup response replaces the lists the Client holds. Neither carries modes anymore. additionalDirectories still requires the session.additionalDirectories capability and absolute paths, and each session/resume MUST send the full intended additional-root list. Omitting the field or sending [] activates no additional roots rather than restoring previous ones. The same applies to mcpServers on resume.

Baseline methods

As covered under Initialization, advertising capabilities.session commits the Agent to session/new, session/list, session/resume, session/close, session/prompt, session/cancel, and session/update. Clients can rely on listing, resuming, and closing sessions without probing individual capability markers. session/delete remains optional behind session.delete.

Subagents

An Agent can expose a subagent as a child session with its own sessionId. It announces the child with subagent_update on the parent session and then sends the child’s messages, tool calls, plans, and state with the child’s sessionId. In v1 the Client opts in to these updates with the subagents capability. In v2 they need no capability, so every Client handles them:
  • Register the child that a subagent_update announces, and attribute later updates and requests with that sessionId to it. Do not drop them as traffic for an unknown session.
  • Do not send session/prompt, session/resume, or session/close for a child. Apart from responses to its requests, send only session/cancel while its subagent_update advertises capabilities.cancel, and tool_call/cancel or terminal/cancel for an item that advertises its own.
  • Show session_message and session_message_chunk as messages between sessions, not as user messages or answers to the user.
  • After session/resume, discard the child state and capabilities held from before, and wait for current ones.
v1 reports a child’s state only on the parent’s subagent_update. In v2, a child sends ordinary state_update notifications on its own sessionId, and Agents SHOULD mirror the same snapshot in the parent’s subagent_update.state. Exposing subagents stays optional for Agents. See Subagents.

Session modes become config options

The dedicated modes API is removed: the modes field on session responses, session/set_mode, the current_mode_update notification, and all SessionMode* types. Mode-like state (and model selection, thinking level, and similar knobs) is expressed through session config options, which already existed in v1:
  • The option’s identifier field is renamed from id to configId, matching the parameter name used by session/set_config_option.
  • The stable category values are mode, model, model_config, speed, and thought_level. Clients can use them for UX affordances (placement, shortcuts) and MUST tolerate unknown categories.
  • Agents SHOULD list the values of a select thought_level option from lowest to highest. v1 has no ordering rule for these values.
  • Clients change values with session/set_config_option (sessionId, configId, type, value). The required type discriminator is "id" with a string option ID or "boolean" with a boolean value. The response returns the full updated configOptions array, since one change can affect other options. Agent-initiated changes arrive as config_option_update session updates, which replace the v1 current_mode_update.
The switch_mode tool kind stays, and now means changing the mode-category config option.

Client file system and terminal execution removed

v2 removes all of the v1 Client-provided file and terminal methods:
  • clientCapabilities.fs and the fs/read_text_file / fs/write_text_file methods
  • clientCapabilities.terminal and the terminal/create, terminal/output, terminal/release, terminal/wait_for_exit, terminal/kill methods
In practice these methods were inconsistently implemented outside of a few IDEs, and Agents already needed their own file and execution handling for Clients that didn’t offer it. Clients that want to expose file access, unsaved editor state, or command execution to Agents can do so by providing an MCP server to the session (via mcpServers on session/new / session/resume), which puts those tools on the same footing as every other tool the Agent uses. Agent-side, drop the capability checks and the dual execution paths. Report file changes through diff content. When byte-faithful command display matters, report output through the new Agent-owned terminal stream. The v2 terminal content reference does not restore Client-side execution. It only anchors display state supplied by the Agent.

MCP server configuration

MCP transport configuration is aligned with the current MCP transport model:
  • Every server config MUST carry a type discriminator. In v1, stdio configs had no type field. In v2 they are "type": "stdio". Unknown transport types can then be carried as extension variants instead of failing to parse.
  • The deprecated HTTP+SSE transport ("type": "sse") is removed.
  • Support is advertised per transport under capabilities.session.mcp: stdio is now an explicit capability (session.mcp.stdio), so Agents that cannot launch subprocesses can opt out, and session.mcp.http covers remote servers.
  • Each server name MUST be unique within mcpServers, and Agents reject duplicates with -32602.
  • A stdio command MUST be an absolute path, and Agents reject a relative one with -32602. v1 described the field as an absolute path but did not require it.
  • On session/resume, mcpServers is the complete set of Client-provided servers, like additionalDirectories. Servers from earlier requests are not restored.
  • Empty arrays are no longer required: args and env on stdio configs and headers on HTTP configs are optional in v2 (v1 required args, env, and headers even when empty).

Content blocks

The five content block types are unchanged: text, image, audio, resource_link, and resource. v2 realigns their fields with MCP 2026-07-28. Notably, resource_link gains an optional icons array (each icon has a required src URI plus optional mimeType, sizes, and theme of light/dark), and the type discriminator is extensible like most v2 enums, so unknown block types no longer break deserialization for receivers that have a fallback. IconTheme and annotation Role values are extensible too, and icons and annotations accept _meta. Agents MUST reject a prompt that contains a content type that is neither baseline (text, resource_link) nor advertised with -32602, without inserting it. v1 put the restriction only on Clients. If you maintain a validator or generated models, v2 also tightens schema-level details that v1 left loose: base64 payloads (image/audio and terminal data, resource blob) are marked with contentEncoding: "base64", URI fields are marked format: "uri", SessionInfo.updatedAt and SessionInfoUpdate.updatedAt are marked format: "date-time", annotations.priority is bounded to the inclusive range 0 to 1, multi-select elicitation items need at least one option, session/prompt prompt and systemPrompt content each need at least one content block, permission options, config select options, each config option group’s options, and single-select elicitation enum and oneOf each need at least one entry, a tool call location’s line starts at 1, resource_link size is unsigned, form-mode requestedSchema requires type: "object" and properties, and setup-response configOptions is no longer nullable: omit it rather than sending null. Two details are looser: a value in an accepted elicitation’s content can be any JSON value, for custom or future property types, and TerminalExitStatus.exitCode is signed, so it can be negative. Text content blocks can contain Markdown in both versions. For other display strings, v2 makes plain text the default and names the exceptions. For example, a tool call title is plain text, while a plan entry’s content and a command’s description can contain Markdown. v1 did not specify formats for those fields. See Plain text and Markdown for the full list.

Slash commands

session/new and session/resume responses now carry availableCommands alongside configOptions. An Agent with commands MUST include them there. A setup response replaces the Client’s command list, including a list from an available_commands_update that arrived before the response. The draft session/fork response also supports commands for the newly created session when forking is supported. Agents no longer need to send command notifications before the session/new response. See the setup response example. In setup responses, availableCommands is an optional array: omission or [] means the session has no commands. Agents MUST NOT send null. available_commands_update notifications remain supported for advertising commands later or changing them. Each notification replaces the complete list previously advertised in a response or notification. [] clears it. A command still carries name and description, but each command and its optional input specification are now tagged unions. Commands gain a required type: "command" discriminator so other kinds of commands can be added later, and the v1 untagged unstructured input gains an explicit type: "text" discriminator so richer input types can be added later:
As with other extensible unions, unknown command and input types SHOULD be preserved when proxying. Each command type defines how its entries are invoked, so a Client that doesn’t understand a command type ignores it and MUST NOT display it as a slash command. A Client that can’t render an input type can fall back to plain text input or hide the command’s input hint.

Consistent ID naming

v2 applies one naming rule across the schema: a field that identifies a protocol entity or references one is named after its domain (sessionId, messageId, toolCallId, planId, optionId), never a generic id. The concrete renames from v1: New entities introduced in v2 follow the same rule (messageId on messages, planId on plans). A few schema definition names also changed without any wire-format change, which matters only to schema-codegen consumers: the session/update and session/cancel payload types are now UpdateSessionNotification and CancelSessionNotification, the auth request/response types follow the new method names (LoginAuthRequest/LoginAuthResponse, LogoutAuthRequest/LogoutAuthResponse), and the Client auth capability type is now ClientAuthCapabilities. Definitions tied to wire changes are renamed or removed along with them, for example UnstructuredCommandInput → TextCommandInput, Plan → PlanUpdate, ToolCall → ToolCallUpdate, and McpServerSse removed. These lists are not exhaustive. Compare the $defs of the two schemas for the complete set.

Extensibility and forward compatibility

v2 makes the whole schema forward-compatible by convention:
  • Open enums and tagged unions. Enum-like strings and tagged unions accept unknown values, except the few closed ones. Values beginning with _ are reserved for implementation-specific extensions (e.g. _com.example/widget). Unknown values without a leading _ are reserved for future ACP versions. Receivers SHOULD preserve unknown values when storing, replaying, proxying, or forwarding, and either render them generically or fall back safely. Do not mint non-underscore custom values.
  • _meta everywhere. As in v1, _meta objects carry implementation metadata. In v2’s upsert-style updates, top-level _meta is a patch: omitted means unchanged, null clears it, and an object patches stored metadata by top-level key, where a key set to null is removed and any other value replaces that key whole (see Metadata Patches). Metadata nested in a snapshot, exit-status object, content item, command permission subject, or chunk is scoped to that object. Omission and null are equivalent.
  • Custom methods still use the _ prefix, unchanged from v1.

Transports

stdio remains the primary transport. Each message is a single JSON-RPC object. ACP does not use JSON-RPC batches, and receivers reject an array with -32600. v2 also states three rules that the v1 page did not:
  • Shutdown. The Client ends the connection by closing the Agent’s stdin. The Agent SHOULD exit once it has finished or stopped its work.
  • Message timing. After initialize, Agents MAY send requests and notifications at any time. Clients MUST handle them independently of the responses they are awaiting.
  • Message order. Transports MUST deliver messages in the order they were sent, and receivers MUST apply a session’s session/update notifications in the order received.
See Transports. A standard remote transport (streamable HTTP with SSE streams, plus WebSocket) is being specified in its own RFD and is not part of core v2. See the transport RFD for its current state.

Errors

Several error rules that were SHOULD in v1 are MUST in v2, and v2 adds one. Agents and Clients MUST respond with -32601 to a method they don’t implement, or to a capability-gated method they didn’t advertise. Agents MUST:
  • respond with -32002, with data.sessionId, to a session-scoped request for a session that doesn’t exist or isn’t active on the connection
  • reject a request other than initialize that arrives before initialization completes with -32600, and also an initialize repeated after another request
  • reject a systemPrompt with an unadvertised mode, an unsupported content block type, or content that exceeds the Agent’s limits with -32602
  • return -32602 for an invalid session/list cursor
See Errors.

Smaller rule changes

These rules are new or stricter than in v1:
  • Unique identifiers. Command names in availableCommands, each methodId in authMethods, each optionId in a permission request, and each config option’s configId, values, and groupIds MUST be unique within their list. v1 did not require it.
  • Late cancellation. Receivers MUST ignore a $/cancel_request for a request ID that is unknown or already answered, and MUST NOT send a second response for it.
  • Adjacent text blocks. Adjacent text blocks form one continuous text, and Clients SHOULD join them without a separator before rendering.

Migration checklist: Agents

  1. Initialization. Read params.capabilities / params.info. Return capabilities and a required info. Restructure your capability object: nest prompt and MCP capabilities under session, convert boolean markers to {} objects, drop loadSession and the list/resume/close markers. Select the highest version you support at or below the requested protocolVersion, and reject initialize with -32022 when there is none.
  2. Implement the baseline. If you advertise session, implement session/new, session/list, session/resume, session/close, session/prompt, session/cancel, and session/update. On session/close, finish cancelled foreground work (final updates and the idle cancelled state) before responding.
  3. Auth. Rename authenticate → auth/login for method types that define protocol-driven login. If you return a non-empty authMethods list, implement both auth/login and auth/logout. If you omit the field or return an empty array, Clients MUST NOT call either method. Do not add a logout support marker: capabilities.auth is only for authentication-related extensions. Add type and methodId to your auth method descriptors, and send terminal method env as { "name", "value" } entries.
  4. Prompt lifecycle. Respond to an accepted session/prompt with { "messageId": "…" }, carrying the agent-generated ID of the inserted user message. Emit a user_message (or streamed user_message_chunk) acknowledgment with the same messageId, a running state update when foreground work starts (or requires_action if it starts blocked, then running when progress resumes), and an idle state_update carrying the stop reason when it ends, including cancelled after session/cancel. Don’t reject a prompt only because work is active: insert or hold it, and answer prompts not yet inserted with -32800 on session/cancel or session/close. Report a failure after insertion as an idle state_update with stopReason: "error" and the JSON-RPC error in error, never as an error response to the prompt. Background updates may continue while idle. Reject a prompt that contains a content type you did not advertise with -32602, without inserting it. Reject a malformed idempotencyKey with -32602. Recognize the key for as long as the message is retained, across restarts, or for a live-only message while the session stays active on a connection. Return the recorded messageId without another insertion.
  5. Message IDs. Generate and attach a messageId to every message chunk and update.
  6. Tool calls. Stop sending tool_call. Send tool_call_update for creation and patches. Use tool_call_content_chunk to stream content. Respect omit/null/value patch semantics, including key-level _meta patches.
  7. Terminal output. Add terminal content references for Agent-owned display terminals. Send terminal_update for command, absolute cwd, size, snapshots, and exit state. Send independently base64-encoded terminal_output_chunk values for live bytes. The Client’s only control is terminal/cancel, which you opt into for each terminal with capabilities.cancel.
  8. Diffs. Replace oldText/newText with changes (+ fileType/mimeType where known) and provide patch in git_patch format whenever feasible. If a tool’s input describes an edit only as a snippet, read the file somewhere the tool waits on, before it can run, or send no diff until the change is done (see Edits known only as a snippet).
  9. Permissions. Put prompt copy in required title (+ optional description). Use the tool_call subject for tool-call state and the command subject for a command, required absolute cwd, and optional tool-call/terminal associations. Check the selected option in this request. A rejection or cancelled outcome means “don’t proceed with this operation”, not that foreground work must end. On session/cancel, cancel the pending permission requests of the cancelled work with $/cancel_request. On session/close, cancel every pending permission request and elicitation of the session the same way. In v1 the Client answered them.
  10. Plans. Send plan_update with the complete items or markdown plan, and plan_removed to remove it. Neither requires a Client capability.
  11. Modes and config options. Drop session/set_mode, modes, and current_mode_update. Expose the same state as config options with category: "mode" and emit config_option_update. Return the session’s configOptions in every session/new and session/resume response. Rename option id to configId and group group to groupId, and require the type discriminator ("id" or "boolean") on session/set_config_option. List the values of a select thought_level option from lowest to highest.
  12. Replay. Handle replayFrom on session/resume, and send a current state_update before every resume response, with or without replay. Replay history as ordinary session/update notifications when asked, current-state snapshots such as terminal output are fine. When the Client may already hold an entity’s _meta, remove stale keys explicitly, since an _meta object no longer replaces them. Start each entity that you replay as chunks with an update that empties the chunked field. Send replay_complete after the last replayed update, also for an empty history, and hold every other update for the session until after it. Remove session/load.
  13. Client file and terminal methods. Remove all fs/* and terminal/* calls. The new terminal content is Agent-owned display state, not a Client resource.
  14. MCP config. Require type discriminators. Reject SSE and unadvertised transports with -32602, and a relative stdio command too. Advertise session.mcp.stdio / session.mcp.http as appropriate.
  15. Slash commands. Add the type: "command" discriminator to each advertised command and the type: "text" discriminator to command input specifications. Return the session’s commands in availableCommands in every session/new and session/resume response, and use complete-replacement available_commands_update notifications for later changes.
  16. Parsing. Make enum handling open: preserve unknown variants where a safe fallback exists.
  17. Errors. Return the now-required error codes: -32601, -32002 with data.sessionId, and -32600 before initialization or for a late initialize.
  18. Subagents. Exposing subagents is optional. If you do, announce each child with subagent_update on its parent before any update or request that carries the child’s sessionId. Report the child’s work on its own sessionId, mirror its state_update in the parent’s subagent_update.state, and report messages from a parent to a child as session_message. Advertise capabilities.cancel only for a child whose work you can cancel on its own. Report unknown when you can no longer observe a session’s foreground work.
  19. Elicitation. Stop sending pattern on string properties, and validate the submitted value yourself.
  20. Background work. If work outlives the foreground work that started it, list it in background on every state_update. Report suspended tool calls as paused. Advertise capabilities.cancel only on tool calls and terminals you can stop, and handle tool_call/cancel and terminal/cancel for them.

Migration checklist: Clients

  1. Initialization. Send protocolVersion: 2, required info, and capabilities (drop fs/terminal, and advertise terminal auth as auth.terminal: {}). Read the Agent’s capabilities from result.capabilities with presence checks instead of boolean checks.
  2. Rely on the baseline. When capabilities.session is present, use list/resume/close/prompt/cancel without probing markers. Keep checking session.delete and other optional extras.
  3. Prompt lifecycle. Don’t treat the session/prompt response as turn completion. Drive UI from state_update (running / idle / requires_action / unknown), take the stop reason from the idle update, and render the user’s message from the user_message acknowledgment (which carries its canonical messageId). Treat stopReason: "error" as a failed outcome and read its details from the idle update’s error. An error response to session/prompt means the message was not inserted. Keep accepting background updates while idle. If the response is lost, resuming does not prove it is safe to resend. If a duplicate would matter and you cannot rule it out, show the outcome as unknown and let the user choose. Reuse the original prompt and idempotencyKey for a retry.
  4. Messages. Track messages by required messageId. Implement upsert semantics: whole-message updates replace content (or clear it with null/[]), chunks append.
  5. Tool calls. Create tool calls on first-seen toolCallId in tool_call_update. Apply omit/null/value patches, and patch top-level _meta by key. Append tool_call_content_chunk items. Replace accumulated content when an update carries content.
  6. Terminal output. Maintain Agent-owned terminal state by terminalId. Apply update patch and snapshot-replacement semantics, and use the reported size for rendering when present. Independently decode and append chunk bytes. Render them in an isolated terminal emulator or sanitized transcript, with no input. The only process control is terminal/cancel, for a terminal that advertises capabilities.cancel.
  7. Diffs. Render patch.text when present. Drive file trees and summaries from changes. Handle patch-less diffs (binary, symlink, directory).
  8. Permissions. Render title/description. Apply tool_call subjects like ordinary tool-call updates, and render command subjects from their command, required absolute cwd, and optional associations. Show a generic prompt for absent or unknown subjects. Answer cancelled when the user dismisses the prompt or policy declines it. When the Agent cancels a request with $/cancel_request, dismiss the prompt and answer cancelled.
  9. Plans. Track plans by planId. Replace the whole plan on plan_update and remove only the named plan on plan_removed.
  10. Notices and compaction. Handle notice, compaction_update, and compaction_summary_chunk, or ignore them. v2 sends them without a Client capability.
  11. Modes and config options. Drop session/set_mode and current_mode_update handling. Drive mode/model UI from configOptions (using category) via session/set_config_option and config_option_update. Read configId and groupId, render boolean options, and send session/set_config_option with a type of "id" or "boolean".
  12. Resume. Replace session/load with session/resume + replayFrom: { "type": "start" }, and use session/resume without replayFrom to reattach when you still hold the session’s entities and missed no updates. Request replay when you want them resynchronized, for example after a lost connection. Use replay_complete to find the end of the replayed history, and treat a replay that ends without it and without a successful response as truncated.
  13. Client file and terminal methods. Remove fs/* and terminal/* implementations for v2 connections. Expose Client-side tools through MCP servers passed in mcpServers, using only transports the Agent advertises under session.mcp. Send a type on every server config and an absolute command for each stdio server. Do not treat display terminals as Client resources.
  14. Cancellation. After session/cancel, keep accepting updates. An idle state_update with stopReason: "cancelled" confirms that foreground work was cancelled. It does not end the session’s update stream. The work can also end first with another stop reason. No additional idle update is required if no foreground work was active when cancellation took effect. Don’t answer every pending permission request when you send it. Dismiss and answer a request when the Agent cancels it with $/cancel_request.
  15. Parsing. Preserve unknown enum variants, tolerate unknown sessionUpdate types, and read commands and their input as tagged unions. Replace the configOptions and availableCommands lists you hold with the lists in each setup response, including lists from updates that arrived before the response. An omitted list means none. Replace the command list on each available_commands_update, including [] to clear it.
  16. Subagents. Handle subagent_update, which needs no capability and cannot be ignored as an unknown update. Register each child session, attribute its updates and requests to it, and show session_message entries as messages between sessions. Send nothing for a child except responses to its requests, session/cancel while the child advertises capabilities.cancel, and tool_call/cancel or terminal/cancel for an item that advertises its own. Discard child state and capabilities when you resume the parent.
  17. Elicitation. Stop evaluating pattern on string properties. v2 forms don’t carry it.
  18. Background work. Read the background list on state_update, and treat an omitted list as not reported. Show paused tool calls as paused. Offer to stop a tool call or terminal only while it advertises capabilities.cancel, with tool_call/cancel or terminal/cancel.
  19. Auth. Call auth/login instead of authenticate and auth/logout instead of logout, and only when the Agent returns a non-empty authMethods list. Read methodId instead of id on each method descriptor, expect its type, and read a terminal method’s env as { "name", "value" } entries.

Migration checklist: SDKs

  1. Separate the versions. Keep v1 and v2 schemas, generated models, and test fixtures fully separate. Exposing unstable-v2 types does not advertise support. Enforce each feature’s documented negotiation requirements independently of protocolVersion: 2.
  2. Three-state fields. Model omitted vs null vs concrete values distinctly wherever v2 defines patch semantics. A plain nullable/optional type erases a distinction the protocol depends on. Apply the top-level _meta of upserts as a key-level patch rather than a replacement.
  3. Strict where it counts. Reject malformed payloads for known discriminator values instead of demoting them to the unknown-variant fallback. The fallback exists only for genuinely unknown values.
  4. Preserve what you don’t understand. Round-trip _-prefixed extension values, unknown future variants, and _meta when storing, replaying, proxying, or forwarding.
  5. Fixtures. Cover the full prompt lifecycle, resume replay, cancellation, permission flow, message replacement and clearing, tool-call content chunks, terminal snapshot replacement, split and invalid UTF-8 bytes, exit state, command subjects, structured diffs, and child session announcements, routing, and resume.
  6. Stop reasons. Don’t remove or mark the user’s message on refusal. Model the idle update’s stop reason as a union tagged by stopReason and flattened into the update, so a stop reason can carry fields of its own, such as the error stop reason’s error. Keep unknown stop reasons with their fields, and treat a missing or null stopReason as no stop reason.
  7. JSON-RPC envelope. Never send a request with id: null or a JSON array of messages. Reject a message that has a method and id: null with -32600, and a JSON array with -32600 too.

Supporting v1 and v2 side by side

Supporting both versions is the recommended path, not an edge case: v1 peers will remain in the wild well after v2 stabilizes, and dropping v1 support means losing them. Version negotiation gives you one protocol version per connection, so the cleanest approach is to keep two thin protocol layers behind shared application logic and select one after initialize.

Negotiate once, then use the selected version

The v2 version negotiation rules apply to Agent endpoints implementing v2, including dual-stack endpoints. They do not impose new requirements on legacy v1-only Agents:
  • The Client MUST request the latest version it supports. After the Agent selects a lower version, the Client MAY request that version, or a lower version it supports, when it repeats initialize or reconnects.
  • An Agent implementing v2 MUST select the highest supported version at or below the requested version. If none exists, it MUST return -32022 with requested and supported data instead of a higher-version success response.
  • Both peers MUST use the selected version’s specification for subsequent traffic. A Client that cannot support the returned version SHOULD close the connection and inform the user.
For an Agent supporting both v1 and v2, a v1 request selects v1, a v2 request selects v2, and a request for a newer unsupported version selects v2. An Agent supporting only v1 returns v1 to a Client requesting v2. The returned version is a selection, not a promise that the Agent will translate subsequent v2 messages into v1. Keep initialization separate from session setup. Prepare handlers for both versions before connecting, but dispatch subsequent traffic through only the selected version’s handlers. Inspect the selected version before sending session/new or interpreting capabilities. The request uses the Client’s requested-version initialization shape, while the response uses the Agent’s selected-version shape. For example, a v2 request carries info and capabilities, while a v1 response carries agentInfo and agentCapabilities. A version-specific SDK Client API is not necessarily a dual-stack Client: it may reject a response selecting the other version. Use the SDK’s negotiation support where available. If falling back requires a new SDK connection, close the first connection and initialize the replacement with the selected version’s API. An Agent implementing v2 also accepts a repeated initialize before any other request. A legacy v1-only Agent might not.

Agent routing in the SDKs

The TypeScript SDK exposes the router through its experimental v2 entry point:
The runnable dual-version TypeScript agent shows both implementations on one stdio endpoint, including their different prompt lifecycles. From a checkout of the TypeScript SDK with dependencies installed, run npm run build, then configure your Client to launch node dist/examples/dual-version-agent.js from that checkout. The Rust SDK provides the corresponding builder with the unstable_protocol_v2 crate feature:
See the Rust SDK’s protocol v2 guide for Agent routing and Client-side fallback. These routers select a version-specific implementation and normalize initialization parameters for it. They do not translate later requests, notifications, or responses. A standalone v2 Agent API can negotiate v2 with a Client requesting a newer version, but it does not provide a v1 implementation. Register both implementations to serve v1 Clients.

Version mismatch is an initialization failure

A v2-only endpoint rejects a v1 request with -32022 and data: { "requested": 1, "supported": [2] }. It does not need to invoke the v2 initialization handler or require v2’s Client identity just to report this mismatch. The connection is not initialized, and the Client SHOULD close it. A v2-aware Client can display the supported versions, while an existing v1 Client can report the initialization error generically. A request for a newer version can still select v2. A v1-only endpoint can select v1 for a v2 request. In either case, the Client MUST check whether it supports the selected version before proceeding. The latest-version integer does not advertise a complete set of supported versions. Do not confuse version mismatch with malformed initialization parameters. A missing, non-integer, or out-of-range protocolVersion, or malformed parameters for a supported version, remains -32602 (Invalid params). Agents read protocolVersion first, so a version mismatch is never reported as -32602, and parameters written for a newer version are not rejected. Use the SDK routers to negotiate before dispatching to a version-specific implementation.

Share application logic, not wire shapes

Keep business logic, tool execution, and any shared persistence behind version-specific adapters. Each adapter owns its protocol’s capabilities, validation, and lifecycle:
  • Prompt completion: v1 keeps session/prompt pending until the turn ends. v2 acknowledges insertion and reports foreground completion through an idle state_update.
  • Conversation updates: v1 streams chunks, while v2 also supports identified entities, replacements, clearing, and replay. A v1 projection must not assume it can represent every v2 update.
  • Client tools: v1 may use Client file system and terminal methods. v2 uses MCP servers for Client-side tools. Agent-owned display terminals are not a replacement execution API.
Advertise only what each adapter implements. Negotiating v2 does not enable unstable features, and sharing a session store does not automatically make every session resumable through both versions. Define cross-version session access explicitly if your application offers it. General-purpose v1↔v2 struct conversions cannot implement these lifecycle differences or represent every state. Prefer adapters over blanket conversions. Any shared conversion helper should have a narrow contract and report unsupported or lossy mappings explicitly rather than silently dropping behavior.

Validate the dual-stack endpoint

Exercise the same published endpoint with both v1 and v2 Clients:
  1. Check that each Client reaches the matching implementation and receives that version’s capabilities.
  2. Check fallback from a v2 Client to a v1-only Agent, including whether the Client continues with v1 or disconnects.
  3. Send a higher requested version, including parameters the Agent can’t parse, and check that the Agent selects its latest supported version.
  4. Run prompt completion and cancellation through both versions, and assert each version’s completion signal, not just successful initialization.
  5. Check that disabling v2 support leaves the v1 endpoint working.
  6. Send a v1 request without Client identity to a v2-only endpoint. Check for -32022 with requested: 1 and supported: [2], and check that no v2 session work starts.