[BUG] Cloud session: AskUserQuestion asked right after SendUserMessage is dropped on worker resume, so a late answer is silently lost
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
In a cloud session (Claude app, entrypoint: remote_cowork, Claude Code 2.1.281), my answer to an AskUserQuestion card was silently lost. The cloud worker had stopped while the question was pending and a new process had resumed the session. The app still showed the question card, and it accepted my click as answered. The answer never reached the conversation: the transcript has no tool_result for that tool_use id, and Claude never acted on it.
The question was dropped the same way at both worker restarts in this session. I answered the card only after the second restart, so that is the one confirmed lost answer. The pattern each time:
- The assistant calls
SendUserMessage, then immediatelyAskUserQuestion. - Nothing else is running (no tool call, subagent or background job).
- About 3.5–4 minutes later the worker stops in an orderly way. Every MCP connection logs
closed after …s (cleanly)within about 5 ms, and acost-staterecord is written at the same moment. This looks like an idle stop, but no reason is logged. - A new process starts 5–11 minutes later, a few minutes before my next input.
- The resume logic removes the unanswered
AskUserQuestion. The chain then ends on theSendUserMessagetool_result, so the turn is classified as complete (kind: "none"). The question is therefore never held open for a late answer. Instead, a synthetic assistant message is spliced in after that tool_result:
``json``
{"type":"assistant","parentUuid":"<SendUserMessage tool_result>","message":{"model":"<synthetic>","content":[{"type":"text","text":"No response requested."}],"stop_reason":"stop_sequence"}}
This entry is timestamped at resume but written to the file only when the next message arrives. It becomes a sibling of the pending question, which ends up on a dead branch. This is visible directly at the first restart. At the second restart it is inferred from the same preconditions, because a rewind (companion issue) cut the chain before any synthetic entry was written.
- After the second restart I answered the still-displayed card on the Claude desktop app (Windows), and it showed as accepted. The answer was never recorded: no
tool_result, and no orphaned-permission re-run.
The transcript can't show whether the answer never reached the new process, or reached it and was skipped because the question had already been retired at boot. Your server-side session events for that window would settle it.
This differs from #72704 and the 2.1.216 fix ("re-asking the same question and dropping your answer after the session sat idle"). Here the question is not re-asked. The resume logic treats a turn that ends on a SendUserMessage result as complete, so the question is never held open.
What Should Happen?
The cloud-session docs say: "If Claude asks a question and the session sits idle, you can still answer when you come back, up to environment expiry, and the session continues from your answer." After a worker restart, a pending AskUserQuestion should either stay open and answerable (as 2.1.275 did for permission prompts), or be withdrawn from every client so it can't be clicked. It should never accept an answer and then drop it.
Error Messages/Logs
No error was shown. The transcript records, with content removed:
AskUserQuestiontool_use at 23:05:41Z; never answered.- 23:09:19Z: all MCP connections closed cleanly (MCP logs), and a
cost-staterecord was written at the same moment. - 23:14:30Z: a new process started.
- My answer (about 23:17Z) is absent. The next timestamped transcript records are at 23:18:06Z.
At the earlier restart, the same pattern produced the synthetic No response requested. shown above: created at 22:32:09Z, written after 22:34:02Z.
I can share the session ID and relevant log excerpts privately with Anthropic staff. Please don't ask for them in this public thread.
Steps to Reproduce
- Start a cloud session from the Claude app.
- Ask Claude: "Send me a short message with SendUserMessage, then immediately ask me a yes/no question with AskUserQuestion, and wait."
- Don't answer. Leave the session idle for 6–10 minutes, so that the worker stops.
- Come back and click an answer on the question card, which is still displayed.
- Expected result (not yet confirmed from a clean session): Claude doesn't act on the answer. The transcript has no
tool_resultfor the question, and the question's parent has a syntheticNo response requested.sibling.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
Unknown (see the note on 2.1.216 above)
Claude Code Version
2.1.281 (cloud worker). Code behaviour described above is from the 2.1.280 build I could inspect.
Platform
Anthropic API
Operating System
Other Linux (cloud worker); clients were the Claude iOS app and the Claude desktop app on Windows 11
Terminal/Shell
Other: the Claude app (cloud session), not a terminal
Additional Information
Related:
- #72704: idle web session, answers silently lost. Auto-closed as stale.
- #77549 and #70648: AskUserQuestion broken after resume.
- #89265: desktop auto-resume always answered with "No response requested."