[BUG] AskUserQuestion modal ignores buffered user input queued before the prompt was rendered
Bug
When the model emits an AskUserQuestion modal while the user has already typed a message into the input buffer (not yet delivered to the model's turn), the modal renders with stale premises. The buffered input and the modal race, and the model ends up processing the modal answer and the prior buffered message as two separate signals — producing confusing/contradictory behavior.
Steps to Reproduce
- Ask the model something underspecified that leads it to pose an AskUserQuestion modal (e.g. "version bump and release" → model asks patch vs. minor, defaulting to patch).
- Before/while the modal appears, type a message that answers or overrides it (e.g. "minor release").
- Observe: the modal still shows its stale default, your selection and your typed message are recorded as separate inputs, and the interaction reads as if the model asked a question it should already have had the answer to.
Expected Behavior
Before a UI prompt is rendered, any outstanding buffered user input should be drained into the model's context, so the model can decide whether the prompt is still needed (and cancel/skip it if the buffered input already resolves it).
Actual Behavior
The modal is rendered and answered independently of the queued input; ordering is prompt-first, buffer-second, so the prompt has no knowledge of inputs the user already sent.
Related Issues
Related but distinct from:
- #45374 — dialog steals keyboard focus and captures keystrokes mid-typing (a focus/input-capture issue; this report is about message ordering/context, and occurs even when no keystrokes are misrouted)
- #68072 — UI state vs. delivered tool result disagreement in the same race
- #52378 — queuing multiple AskUserQuestion forms
This report's specific ask: drain the queued user message into the model's context before the AskUserQuestion is rendered, so the question can be skipped when it's already answered.
Environment
- Claude Code VS Code extension
- darwin 25.5.0 (macOS), zsh
- Model: claude-fable-5
🤖 Generated with Claude Code