[BUG] Resume labels an unanswered AskUserQuestion as "User declined to answer questions"

Status Open
Reported on v2.1.281
Maintainer reply None cached
Activity 0 comments · opened Sep 27, 2026

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?

If the Claude Code process ends while an AskUserQuestion prompt is open, claude --resume shows that question as declined:

● User declined to answer questions
  ⎿  · Merge the PR now? (Merge / Wait)

I never declined it. The prompt was still waiting for my answer when the process ended. Since 2.1.281 the tool result that resume adds for the call says the session ended before the result was recorded, but the transcript view still shows the decline label.

What Should Happen?

The resumed transcript should mark the question as unanswered, for example "Question not answered (session ended)". Only a real rejection of the prompt should show "User declined to answer questions".

Error Messages/Logs

Tool result stored after resuming and sending the next message (2.1.283, fields trimmed):
{"type":"user","message":{"role":"user","content":[{"type":"tool_result","content":"[Tool call interrupted: the session ended before this call's result was recorded, so its outcome is unknown. Check whether it took effect before relying on it or running it again.]","is_error":true,"tool_use_id":"toolu_..."}]},"toolDenialKind":"interrupted"}

Steps to Reproduce

  1. Run claude and send: Use AskUserQuestion to ask me whether to merge the PR.
  2. Leave the question dialog open and kill the process from another shell (kill -9 <pid>, or taskkill /F /PID <pid> on Windows).
  3. Run claude --resume and pick that session.
  4. The question shows up as "User declined to answer questions".

Claude Model

_No response_

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.283 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

Reproduced on 2.1.283 (Windows) with the steps above.

Related: #69074 (the same label after "Chat about this").

I can attach a minimal transcript that reproduces this without a model call.

View original on GitHub ↗