feat(unstable): Intial RFD and schema for subagents - #1992
Conversation
1509932 to
2fc02e6
Compare
|
Implementation feedback from AIR and the reference adapter branches:
The canonical capability and lifecycle shape works for both adapters. We only needed Two edge cases still seem underspecified:
One smaller compatibility note: the current RFD requires |
0c06d25 to
4315189
Compare
|
@nikita-ashihmin please check again :) |
|
I would like to keep the RFD + protocol changes in separate PRs because it is easier to accept an RFD without having to do rounds on the Rust code at the same time to get a merge |
benbrandt
left a comment
There was a problem hiding this comment.
I think this is going in the right direction overall, but still have several questions I think we need to resolve.
Thanks for kicking this off!
Address review feedback from #1992: - Merge subagent_spawned and subagent_state_update into one upsert-style subagent_update following the v2 entity pattern; add explicit running state - Make name, task, and capabilities optional; only subagentSessionId required - Drop the Agent-side capability: the Client capability alone gates the updates - Drop the per-child close capability; session/close is not valid for child IDs - Stop implying children inherit the parent's execution context - Allow SDKs to buffer updates for unannounced child sessions - Explain why the local disconnected state cannot wait for late updates - Add FAQ entries for naming, capability, and disconnected-state choices - Define v2 support: capability-free, v2 patch semantics, open state enum Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…gent_update Replace SubagentSpawnedUpdate and SubagentStateUpdate with a single SubagentUpdate where only subagentSessionId is required and omitted or null fields mean unchanged. Add a running state to SubagentState, drop the per-child close capability, and remove the agent-side subagents session capability. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Mirror the v1 subagent types into v2 with v2 conventions: no capability (unknown updates flow into OtherSessionUpdate), MaybeUndefined patch semantics, and an open SubagentState enum that preserves unknown values. Register subagent_update in the known-discriminator guards. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Thanks for the thorough review, Ben! Pushed a rework addressing all threads (182be75, ee65f9c, a06ecf2):
On splitting RFD and protocol changes: happy to do that — I'd keep this PR as the RFD and move the schema/Rust changes into a follow-up PR once you're happy with the shape. Say the word and I'll split it. @nikita-ashihmin heads-up: the wire shape changed (single |
Separate reusable child sessions from individual tool-call operations. Add non-owning session references, object cancellation capabilities, and work-state reporting for both protocol versions. Define ownership, routing, best-effort replay, and provider cost semantics in the RFD and draft guides. Regenerate unstable schemas and add serialization and compatibility tests.
Preserve main's RFD status categories and retain subagents in Draft. Regenerate schema artifacts from the merged Rust definitions to include both main's capabilities and the subagent session model.
The v1 client only uses Usage in the subagent work-state payload. Require both unstable_subagents and unstable_end_turn_token_usage so usage-only feature combinations do not fail CI with warnings denied. Validated all 95 depth-two feature configurations with CARGO_BUILD_WARNINGS=deny.
Replace tool-call session references with message upserts and chunks, with optional participant metadata and mirrored v2 child state snapshots. Align new v1 patches with tri-state semantics and refine subagent recovery and documentation.
Shorten the v1 and v2 schema summaries, remove redundant nesting guidance, and keep the v2 protocol guide self-contained. Regenerate reference documentation and add Ben Brandt as RFD co-author.
|
Real-world confirmation this works end to end, from an independent (non-JetBrains) client, in case it's useful signal for moving this RFD along. We're building a multi-agent client that juggles several ACP agent sessions at once (Claude, Codex, Kimi, each over SSH/stdio) and wanted exactly this: a standard way to see an agent's own subagent/Task dispatch instead of flattened Found { "clientCapabilities": { "_meta": { "jetbrains": { "air": { "version": 1, "capabilities": ["nativeSubagentSessions"] } } } } }does work today and produces exactly the shape this RFD describes — tested dispatching two parallel Task subagents against a real {"sessionUpdate": "subagent_spawned", "subagentSessionId": "...", "name": "Contar até 3", "task": "...", "capabilities": {}}
{"sessionUpdate": "subagent_state_update", "subagentSessionId": "...", "state": "completed"}So the design works in practice; what's missing for a non-AIR client is just the canonical field reaching a published SDK build. Not asking for anything specific here beyond leaving this as a data point — happy to help test once |
|
This is in progress and the adapters need to be updated |
Add subagents RFD