Skip to content

feat(model): add the v1 subagent models and promote session/close to stable - #181

Merged
EugeneTheDev merged 1 commit into
masterfrom
eugenethedev/subagents-stack/06-models
Dec 4, 2026
Merged

EugeneTheDev merged 1 commit into
masterfrom
eugenethedev/subagents-stack/06-models

Conversation

@EugeneTheDev

@EugeneTheDev EugeneTheDev commented Dec 2, 2026 •

Copy link
Copy Markdown
Collaborator

Part 6 of 11 of the stacked split of #158 (v1 subagents).

Contents

  • New models:
    • ClientCapabilities.subagents, with a lenient serializer;
    • SubagentState;
    • the session updates subagent_update, session_message and session_message_chunk;
    • ToolCallContent.Session.
  • Serializers: they stay next to their models, in SubagentSessionUpdateSerializers.kt. Shared helpers are in
    JsonObjectSerializer.kt.
  • MaybeUndefined is no longer @UnstableApi. The session/close capability, request, response and method are
    stable.
  • v2 conversions reject the subagent fields and updates, which v2 does not model yet. They have tests.
  • Serialization tests cover the new wire shapes: absent versus null, and unknown values.
  • Samples: support/util.kt renders the new updates, because its when over updates is exhaustive.
  • AGENTS.md: where serializers live.

Caveats

  • ClientCapabilities gets the subagents parameter (after _meta, default null): source compatible, but compiled callers must be recompiled.
  • SessionUpdate and ToolCallContent get new variants; an exhaustive when over either needs new branches or an else.
  • The runtimes don't use the new models until 08 and 09. Master's v1 runtimes run against the final models, and
    check passes.

Stack

  1. chore: add the multi-agent orchestration tooling #176 — chore: add the multi-agent orchestration tooling
  2. build: move buildSrc to build-logic and check that internal packages hold no public API #177 — build: move buildSrc to build-logic and check that internal packages hold no public API
  3. docs(samples): give each sample its own package, run task and README #178 — docs(samples): give each sample its own package, run task and README
  4. refactor: move MaybeUndefined to the model package and runtime internals to internal packages #179 — refactor: move MaybeUndefined to the model package and runtime internals to internal packages
  5. feat(protocol)!: order handler starts by arrival and add response hooks #180 — feat(protocol)!: order handler starts by arrival and add response hooks
  6. feat(model): add the v1 subagent models and promote session/close to stable #181 — feat(model): add the v1 subagent models and promote session/close to stable ← this PR
  7. fix(client): make v2 close and delete idempotent and add PendingPermissions #182 — fix(client): make v2 close and delete idempotent and add PendingPermissions
  8. feat!: add v1 subagents to the agent runtime and deliver session events through ClientSessionOperations.notify #183 — feat!: add v1 subagents to the agent runtime and deliver session events through ClientSessionOperations.notify
  9. feat(client)!: add v1 subagent sessions and the Opened marker to the client runtime #184 — feat(client)!: add v1 subagent sessions and the Opened marker to the client runtime
  10. test(client): cover v1 client openings and subagents over the wire and across transports #185 — test(client): cover v1 client openings and subagents over the wire and across transports
  11. docs(samples): add a subagents sample #186 — docs(samples): add a subagents sample

Next steps

@EugeneTheDev
EugeneTheDev force-pushed the eugenethedev/subagents-stack/06-models branch from 7a68f90 to 914b8f4 Compare December 4, 2026 15:33
Base automatically changed from eugenethedev/subagents-stack/05-protocol to master December 4, 2026 16:28
…stable

- Add the subagent models: `SubagentCapabilities` in `ClientCapabilities`,
  `SubagentState`, the `subagent_update`, `session_message` and
  `session_message_chunk` session updates, and `ToolCallContent.Session`,
  with their serializers and the shared `JsonObjectSerializer` helpers.
- `MaybeUndefined` is no longer `@UnstableApi`.
- `session/close`: its capability, request, response and method are no
  longer `@UnstableApi`.
- v2 conversions reject the subagent fields and updates, which v2 does not
  model yet.
- Serialization and conversion tests for the new models, and the
  `acp-model` API dump.
- Samples: render the new session updates in `support/util.kt`.
- AGENTS.md: where serializers live.
@EugeneTheDev
EugeneTheDev force-pushed the eugenethedev/subagents-stack/06-models branch from 914b8f4 to 2422523 Compare December 4, 2026 16:28
@EugeneTheDev
EugeneTheDev merged commit 3515249 into master Dec 4, 2026
3 of 5 checks passed
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.

2 participants