Repository navigation
fix(client): make v2 close and delete idempotent and add PendingPermissions - #182
Open
EugeneTheDev wants to merge 1 commit into
Open
EugeneTheDev wants to merge 1 commit into
EugeneTheDev wants to merge 1 commit into
Conversation
This was referenced Dec 2, 2026
Merged
EugeneTheDev
force-pushed
the
eugenethedev/subagents-stack/07-v2-close
branch
5 times, most recently
from
December 4, 2026 15:33
8aa4e22 to
f949c06
Compare
EugeneTheDev
force-pushed
the
eugenethedev/subagents-stack/07-v2-close
branch
from
December 4, 2026 16:28
f949c06 to
d0f018f
Compare
Base automatically changed from
eugenethedev/subagents-stack/06-models
to
master
December 4, 2026 16:29
…ssions - v2 `ClientSession.close` and `Client.deleteSession` treat `-32002` (resource not found) as success, as ACP asks. A session object that was closed or deleted sends nothing on a later `close`, so it can't close a session that reused its id. - Add `client.internal.PendingPermissions`: `RootPendingPermissions`, which the v2 client session now uses for its permission cancel race, and `SubagentPendingPermissions`, used by the v1 client later. - Tests: v2 `ClientSessionTest` and `SubagentPendingPermissionsTest`.
EugeneTheDev
force-pushed
the
eugenethedev/subagents-stack/07-v2-close
branch
from
December 4, 2026 16:29
d0f018f to
973a133
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 7 of 11 of the stacked split of #158 (v1 subagents).
Contents
ClientSession.closeandClient.deleteSessiontreat-32002(resource not found) as success, as ACP asks.close, so it can't close a newersession that reused its id.
client.internal.PendingPermissions:RootPendingPermissionsreplacesPendingPermissionCancellationin the v2 client session;SubagentPendingPermissionsis for the v1 client's subagents.ClientSessionTestandSubagentPendingPermissionsTest.Caveats
SubagentPendingPermissionsuntil 09.PendingPermissionCancellation.That is wrong for v2 from this layer on. The final bullet would be wrong for v1 until 09, so the old bullet stays
until then.
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 PendingPermissions← this PRfeat!: add v1 subagents to the agent runtime and deliver session events through ClientSessionOperations.notifyfeat(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.