Repository navigation
Description
Logs shared offline
Root cause
High confidence: this is a three-bug chain, not a missing permission UI response.
-
A nested-chat unsubscribe incorrectly removed the client from the whole session.
The client remained subscribed to the session/default chat, but unsubscribing one nested subagent chat triggeredsession/activeClientRemoved:ahp-...jsonl:19283— nested chat unsubscribeahp-...jsonl:19289— client15ea...removed- Faulty session-wide release:
protocolServerHandler.ts:1468-1492
-
The provider retained that removed client’s tools.
Server-originated actions bypassAgentSideEffects.handleAction; its envelope listener only mirrorsChatToolCallComplete, notSessionActiveClientRemoved(agentSideEffects.ts:158-177). ThereforeActiveClientToolSetstill attributedtoolSearchto dead client15ea.... -
The retry hit a completion-before-permission race.
- First
toolSearchwaited for the 30-second disconnected-client timeout, then failed cleanly (remote-agenthost.log:18801-18809). - The model retried.
- Retry failure arrived at
01:49:55.623, before permission registration at01:49:55.625(remote-agenthost.log:18811-18815). handleClientToolCallComplete()calledrespondToPermissionRequest(), but no deferred existed yet (copilotAgentSession.ts:997-999).- Two milliseconds later
_handlePermissionRequest()created the deferred and waited forever (copilotAgentSession.ts:1824-1825,1889).
- First
That is the unmatched final event at events.jsonl:18658.
Recommended fixes
- Only remove an active client when it has no remaining session or chat subscriptions for that session.
- Mirror server-originated
SessionActiveClientRemovedintoagent.removeActiveClient(...). - Buffer early client-tool completion for the permission gate too, not only for the eventual SDK tool handler.
The knowledge docs don’t capture this exact chain. No code was changed.
Metadata
Metadata
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
connor4312 commentedon Jul 24, 2026
This should be fixed with #326049
joshspicer commentedon Jul 27, 2026
Client tools (integrated browser) appear to work. Tested after a reconnection too