Repository navigation
feat!: add v1 subagents to the agent runtime and deliver session events through ClientSessionOperations.notify - #183
Open
EugeneTheDev wants to merge 1 commit into
Conversation
This was referenced Dec 2, 2026
Merged
EugeneTheDev
force-pushed
the
eugenethedev/subagents-stack/08-agent
branch
4 times, most recently
from
December 4, 2026 11:32
d9d8b32 to
bec6ab2
Compare
EugeneTheDev
force-pushed
the
eugenethedev/subagents-stack/08-agent
branch
2 times, most recently
from
December 4, 2026 16:28
47624af to
a327e0d
Compare
…n events - `ClientSessionOperations.notify` takes a `SessionEvent`: an `Update`, or the `Opened` marker that the client runtime delivers. The two-argument `notify` is now an extension. - The v1 agent runtime supports subagents: `AgentSubagents`, its factory, context and session, the session wrappers in `agent.internal`, and the load replay window. - The v1 client keeps its runtime; `ClientSessionHolder` and `ClientSessionImpl` import the `notify` extension. - Update the callers: the e2e recording client, the v1 TCK agent, the terminal sample client and the README example. - Tests: `AgentSubagentsTest`, `ReplayWindowTest`, and the agent, client and integration tests that implement or call `notify`. Remove the old `ClientSessionHolderTest` and the unknown-session test from `SimpleAgentTest`; the client layer replaces them. - `acp` API dump: the agent and common blocks. - AGENTS.md: "Shared state", "v1 agent" and "Structuring long comments".
EugeneTheDev
force-pushed
the
eugenethedev/subagents-stack/08-agent
branch
from
December 4, 2026 16:29
a327e0d to
8c7d9bb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 8 of 11 of the stacked split of #158 (v1 subagents).
Contents
ClientSessionOperations.notifynow takes aSessionEvent: eitherUpdate, orOpened, which only the clientruntime delivers. The two-argument
notifybecomes an extension (import com.agentclientprotocol.common.notify).AgentSubagents.announce,AgentSubagentFactory,AgentSubagentContextandAgentSubagentSession;agent.internal, and theSessionTablesnapshot of roots and subagents;onResponseQueued.acpAPI dump: the agent and common blocks.AgentSubagentsTest,ReplayWindowTest,AgentTest, the client tests that implementnotify, the newScriptedAgentTransporthelper, and the integrationSimpleAgentTestandFeaturesTest. These run the finalagent against master's v1 client, and pass.
Breaking changes
ClientSessionOperations.notify(notification: SessionUpdate, _meta: JsonElement?)is replaced bynotify(event: SessionEvent).Agent code calling
client.notify(update)orclient.notify(update, meta)keeps compiling through the extensioncom.agentclientprotocol.common.notify, but must be recompiled and may need that import.In this PR the client still delivers only
SessionEvent.Update; it starts deliveringOpenedin feat(client)!: add v1 subagent sessions and the Opened marker to the client runtime #184.Caveats
client/ClientSessionHolder.ktandclient/ClientSessionImpl.ktare inmasterform, each with one added line,import com.agentclientprotocol.common.notify. 09 deletes both files.SessionEvent.Opened. The KDoc ofSessionEvent,ClientSessionOperations.notifyandRemoteClientSessionOperations, the README example andTerminalClientSupportall describe or handle it.SessionEvent.kt:33→client.BaseClientSession.subagents;ClientSessionOperations.kt:47→client.ClientSubagentSession.No Dokka task exists, so
checkcan't catch them.ClientSessionHolderTestis deleted, and master's unknown-session testleaves
SimpleAgentTest. Their replacements arrive in 09.@Suppress("DEPRECATION")inClientEarlySessionUpdatesTestandFeaturesTestcomes before thedeprecations, which land in 09.
Stack
chore: add the multi-agent orchestration toolingbuild: move buildSrc to build-logic and check that internal packages hold no public APIdocs(samples): give each sample its own package, run task and READMErefactor: move MaybeUndefined to the model package and runtime internals to internal packagesfeat(protocol)!: order handler starts by arrival and add response hooksfeat(model): add the v1 subagent models and promote session/close to stablefix(client): make v2 close and delete idempotent and add PendingPermissionsfeat!: add v1 subagents to the agent runtime and deliver session events through ClientSessionOperations.notify← this PRfeat(client)!: add v1 subagent sessions and the Opened marker to the client runtimetest(client): cover v1 client openings and subagents over the wire and across transportsdocs(samples): add a subagents sampleNext steps
master.master(git rebase --onto master <merged> <next>) and force-push it.