You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Session recovery in MCPClientSessionAuthority takes about 1,000 lines and eight state types (RecoveryState, RecoveryBackgroundLease, RetiredRecovery, RecoveryPlan, HiddenHandshake, and others). The worker runs detached from the actor and re-authorizes itself after each step, and cancelled recoveries are kept in a second table so that close() can wait for them. A second actor, InitializedMCPClientSession, sits on top for request correlation.
What
Recovery has one owner for its task and state, and close() waits for it without a table of retired work.
Recovery keeps its guarantees: one shared handshake for concurrent callers, at most one replay of a request rejected before processing, no replay when delivery is unknown, and a failed recovery leaves the connection unavailable until reconnect(timeout:).
Whether a recovery continues after its last waiting caller is cancelled is decided and documented. Today it is abandoned unless the event stream started it.
Decision: a recovery continues after its last waiting caller is cancelled. It ends when it completes, when its own deadline passes, or when the client closes. Today the abandoned recovery leaves the connection unavailable until reconnect(timeout:), so cancelling one request can stop every later request.
Activity
lynnswap commentedon Nov 20, 2026
Decision: a recovery continues after its last waiting caller is cancelled. It ends when it completes, when its own deadline passes, or when the client closes. Today the abandoned recovery leaves the connection unavailable until
reconnect(timeout:), so cancelling one request can stop every later request.