Repository navigation
fix(server): a secret card closes when its request is aborted right after it opens - #42135
Conversation
…fter it opens request_secret recorded the card as pending before installing the cleanup that closes it. A call aborted in between (a Stop, or the MCP client dropping the call) left the card pending for good: the thread showed "Input" with no one waiting, a secret saved there never reached the agent, and after the run ended the form stayed in the thread and failed with "The agent that asked has stopped". Record the pending card as the acquire step of acquireUseRelease, with the wait as its use and closing the card as its release. The release also covers a timeout, so every way the wait ends without an answer closes the card, and an abort lands either before the card exists or after its cleanup is in place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
EvidenceReal web client, Replay provider, fresh synthetic data, 1280×800 viewport, light theme. Both commits received the same temporary three-second delay after recording the pending card. Replay called
Scenario · Replay and timing fixture · Scenario startup hook |




Problem
request_secretrecorded the card before attaching the cleanup that closes it, so a call aborted in between left the card pending for good. Fixes #42134.Change
The wait now runs in
Effect.acquireUseRelease: recording the card is the acquire step and closing it is the release, which also covers a timeout. Most of the diff is re-indentation.Scope
A bug fix with a regression test. Same function as #34634 and #38167, different failure.
Verification
OrchestratorMcpService.activity.test.tsaborts the call while the card is being recorded. On main:expected [ 'pending' ] to deeply equal [ 'pending', 'cancelled' ]. With the fix it passes.vp run check:changedpasses at4146b1b3b6.request_secretover MCP, then aborts the call. Real Chromium web client, 1280×800, light theme, fresh isolated databases and synthetic data on both commits. For the captures only, both commits carry ayield* Effect.sleep("3 seconds")right after the card is recorded, so the abort lands in the window.stranded-base.webm
stranded-head.webm
Scenario and replay driver · proof.json.
scenarios:proveexited 0: failed on base and passed on head.Not checked: desktop, mobile, and a real provider's abort.
Done with claude-opus-5-5 via Claude Code