Skip to content

feat(schema): stabilize subagent sessions - #2939

Merged
benbrandt merged 1 commit into
mainfrom
stabilize-subagents
Nov 20, 2026
Merged

benbrandt merged 1 commit into
mainfrom
stabilize-subagents

Conversation

@benbrandt

Copy link
Copy Markdown
Member

Summary

Moves the Subagent Sessions RFD to Completed and stabilizes the feature in ACP v1. v2 already includes subagents without a feature flag, so the v2 schemas and pages do not change.

In v1, Clients still opt in with clientCapabilities.subagents: {}. The wire shapes are the ones the unstable schema already had.

Changes

Schema

  • Remove the unstable_subagents Cargo feature and its gates from the v1 types. schema/v1/schema.json gains SubagentUpdate, SubagentCapabilities, SubagentSessionCapabilities, SessionCancelCapabilities, SessionMessage, SessionMessageChunk, SessionReference, and the state snapshot types (StateUpdate and its variants, ErrorStopReason).
  • SessionUpdate gains subagent_update, session_message, and session_message_chunk. ToolCallContent gains session. ClientCapabilities gains subagents.
  • The variant descriptions now state the capability requirement and link to the stable pages.
  • The session_message cursor anchor needs only unstable_session_cursors.

Stable v1 pages

  • New Subagents page, copied from the draft page without the session/fork section.
  • Prompt turn: the three session updates in the update table, the "Session-directed messages" section, and the sentence that a session's cost includes its descendants.
  • Tool calls: the "Sessions" content section.
  • Initialization: the subagents Client capability.
  • Overview and error pages: the subagent entries the draft copies had.

Draft v1 pages

  • Drop the "Draft only" and "(unstable)" labels for subagents. The anchors #session-directed-messages-unstable and #sessions-unstable become #session-directed-messages and #sessions.
  • The draft Subagents page keeps the "Forking the parent (unstable)" section.

RFDs and announcements

  • Subagent Sessions moves from Preview to Completed in the navigation, with a revision entry and an RFD update.
  • The RFD gains "Protocol implementation" and "Agent and Client implementations" sections. The table was checked on 2026-11-19 against Zed 07278eddc4a, Claude Agent adapter v0.109.0, and Codex adapter v2.8.0.
  • New announcement page and an entry on the Updates page.
  • Session Cursors RFD: remove the note that the session_message anchor is behind unstable_subagents.

Tests and CI

  • New generator test that the published schemas include the subagent types, and that only v1 has the subagents capability.
  • The idle snapshot generator test now runs for the stable v1 schema too.
  • Remove the test that session_message fails to parse without the feature.
  • CI no longer runs the schema tests with --features unstable_subagents. The unstable_protocol_v2 run already covers the subagent tests that need unstable_end_turn_token_usage off.

Not changed

  • The wire shapes. schema/v1/schema.unstable.json changes in descriptions only.
  • The v2 schemas and pages.
  • The session/fork rules for child sessions and the usage field on the idle state. Both stay unstable with their own RFDs.

Note for SDKs

Removing unstable_subagents breaks a crate that names the feature, such as the Rust SDK's forwarding feature. The unstable umbrella feature is unaffected.

Checks

  • npm run check passes: Clippy, Prettier, the spell check, the Rust tests, and the JSON schema tests, which validate the JSON-RPC examples on the stable pages against schema/v1/schema.json.
  • Clippy and the tests also pass for the schema crate with default features, unstable, unstable_protocol_v2, and each of unstable_session_cursors and unstable_end_turn_token_usage alone.
  • Regenerating the schema a second time gives no diff.
  • All internal links and anchors on the v1 pages, the RFD, and in the v1 schema descriptions resolve, except initialization#filesystem in an existing schema description, which is unrelated to this change.

Move Subagent Sessions to Completed. Publish `subagent_update`,
`session_message`, `session_message_chunk`, and `session` tool call
content in the default v1 schema. v1 keeps the Client's `subagents`
capability. v2 already includes subagents and needs no capability.

- Remove the `unstable_subagents` Cargo feature and its gates from the
  v1 types.
- Add the stable v1 Subagents page, and the subagent sections of the
  stable prompt turn, tool calls, initialization, overview, and error
  pages.
- Drop the "Draft only" and "(unstable)" labels from the draft copies.
- Record the Zed, Claude Agent adapter, and Codex adapter
  implementations in the RFD.

The `session/fork` rules for child sessions and the `usage` field on
the idle state stay unstable with their own RFDs.
@benbrandt
benbrandt requested a review from a team as a code owner November 20, 2026 15:47
@benbrandt
benbrandt enabled auto-merge (squash) November 20, 2026 15:48
@benbrandt
benbrandt merged commit 9d44c77 into main Nov 20, 2026
15 checks passed
@benbrandt
benbrandt deleted the stabilize-subagents branch November 20, 2026 15:50
@acp-release-bot acp-release-bot Bot mentioned this pull request Nov 20, 2026
benbrandt added a commit that referenced this pull request Nov 20, 2026
…2944)

The rule that an answer arriving after cancellation does not restart the
cancelled work was a SHOULD or SHOULD NOT on the prompt lifecycle,
cancellation and elicitation pages, a MUST NOT on the Subagents pages
and in the Subagent Sessions RFD, and a lowercase "should" in the state
transition examples.

Use SHOULD NOT for restarting work everywhere. The Subagents pages and
the RFD keep MUST NOT for the authorization half: a late answer does not
permit a new task for the same child. The examples table gets the
capitalized keyword.

The v1 Subagents page changes too. It became stable in #2939, which has
not been released.
benbrandt added a commit that referenced this pull request Nov 20, 2026
… list (#2947)

Migration guide:

- Subagents are stable in v1 since #2939. The guide no longer calls them
  a draft feature or new in v2, and the update table lists
  `subagent_update`, `session_message` and `session_message_chunk` as
  kept.
- The Subagents section said to send no request for a child. It now
  allows `tool_call/cancel` and `terminal/cancel`, as the Subagents page
  and the Clients checklist do.
- The checklists gain steps that the guide body already requires:
  version selection with `-32022`, `$/cancel_request` for pending
  requests, the `state_update` before every resume response, `type` on
  MCP server configs sent by Clients, authentication for Clients, and
  request IDs and arrays for SDKs.
- The guide gains rules that are new or stricter than v1: rejecting a
  prompt with an unadvertised content type, `-32602` for an invalid
  `session/list` cursor, the `state_update` after a new session that is
  not idle, the `-32601` answer for a Client with no `elicitation`
  capability, and a short list of smaller rule changes.
- Three sentences that disagreed with another part of the guide are
  corrected, and the schema-detail paragraph names two more differences.

RFDs:

- The v2 change list gains the breaking changes it missed, counts five
  error rules, and no longer says terminals have no control method.
- The Elicitation RFD notes the `-32601` answer in v2.
RossRKK pushed a commit to RossRKK/agentic.nvim that referenced this pull request Nov 20, 2026
`clientCapabilities.subagents = {}` asks the agent to expose the
sub-agents it creates as child sessions. claude-agent-acp then reports
each child's work state on the parent, including a background sub-agent
that keeps working after the parent's turn ends, which the client had no
way to see before.

The integration test replays the session/update frames claude-agent-acp
0.109.0 sent for one background sub-agent: running, idle while its own
background command ran, running again, then idle after its report.

RFD: https://agentclientprotocol.com/rfds/subagents ("Capability
negotiation"), stabilised in the ACP schema by
agentclientprotocol/agent-client-protocol#2939
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant