## Why
When the active backend reconnects, the TUI can discard pending work on
other connected backends. Completions queued before the reconnect can
also arrive after the replacement connection is active.
## What changed
- Preserve pending requests and thread state for other connected backends.
Track asynchronous completions by connection so retired connections
cannot update the TUI.
- Apply request resolution from background backends to pending prompts
and the agents overview. Require users to end a voice call before
switching sessions across backends.
- Close the verification prompt when verification finishes and suppress
queued proofs when the user cancels the prompt.
## Testing
Add regression coverage for preserving another backend's pending work
during reconnect, dropping stale completions, resolving background
requests, and cancelling verification after a proof has been queued.
GitOrigin-RevId: fc932b0d13fd1cf04404bd5ccfce71ff776e259f
## Why
App servers can reuse the same request IDs. Tracking dynamic tool calls by
request ID alone lets one server's cleanup affect another server's call.
Background title and recap events also need to reach their originating server
when the TUI is displaying a different session.
## What changed
- Track dynamic tool calls by backend and request ID, and match completions
to the specific call. Send replies through the original reply handle in the
background and give pending writes time to finish on shutdown.
- Route background task registrations and title and recap events by backend.
Check ownership before registering temporary threads or forwarding their
notifications, and use the original connection for temporary-thread cleanup.
## Testing
Regression coverage checks that closing a side thread preserves another
backend's tool call with the same request ID, that a disconnected backend
cannot register a task thread, and that a title helper cannot replace a
temporary thread owned by another backend.
GitOrigin-RevId: 0878efba94f317c814ee131403f0c6e793dfc2c0