SIGN IN SIGN UP

Fix remote agent host session issues in Sessions app (#306560)

- Handle message events in AgentEventMapper to emit markdown response
  parts for text that arrives without preceding delta events (e.g. after
  tool calls complete)
- Fix tool call confirmation flickering by guarding PendingConfirmation
  re-entry when the invocation is already waiting for confirmation
- Fix tool call duplication in server-initiated turns and reconnection
  by not removing finalized tool calls from the tracking map
- Add isComplete guard in finish() to avoid overwriting finalized tool
  call state
- Extract processState in _trackServerTurnProgress for immediate state
  reconciliation closing gaps between turn detection and listener
  registration
- Fix session disappearing from list after first message by adding
  pending session tracking and onDidReplaceSession in the remote
  sessions provider
- Wrap all tests using timeouts with runWithFakedTimers
R
Rob Lourens committed
9a11a08c75a1d8821b34f8eebd9bcb5b13ecac7b
Parent: ea8cfb1
Committed by GitHub <[email protected]> on 3/31/2026, 2:47:10 AM