AskUserQuestion race with in-flight typing: UI shows 'User declined to answer questions' but a selected answer is delivered to the model

Resolved 💬 2 comments Opened Jun 12, 2026 by tidal-wall Closed Jun 16, 2026

Bug

User was typing a message in the prompt box when an AskUserQuestion dialog arrived. The UI displayed "User declined to answer questions", but the model received a tool result indicating the user HAD selected an option ("Both (Recommended)") wrapped in the wants-to-clarify path. UI state and delivered tool result disagree.

Repro (as observed)

  1. Model is mid-turn; user starts typing in the input box.
  2. Model issues an AskUserQuestion tool call; the dialog appears while text is in flight.
  3. User's typed text gets routed as the clarification message.
  4. UI shows 'User declined to answer questions'; the model's tool result says an option was selected and the user wants to clarify.

Expected

UI display and the tool result delivered to the model should agree about whether the question was answered, declined, or deferred for clarification.

Environment

  • Claude Code 2.1.173, darwin 25.5.0 (macOS), zsh
  • Model: claude-fable-5[1m]

🤖 Generated with Claude Code

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗