AskUserQuestion dialog hides preceding assistant message text until the question is answered
Describe the bug
When the assistant outputs a text message and then calls the AskUserQuestion tool in the same turn, the interactive question dialog is rendered immediately, but the assistant's preceding text (which contains the context needed to answer the question) is not shown until after the user answers or dismisses the dialog.
In our case the assistant wrote a message describing three design variants ("Variant 1: ...", "Variant 2: ...", "Variant 3: ...") and then asked "Which variant should we implement?" via AskUserQuestion. The user only saw the question dialog with short option labels — the descriptive text appeared in the transcript after the dialog was dismissed (via "Other"), so the user had to answer before being able to read what the options actually meant.
Steps to reproduce
- Have the assistant produce a turn that contains: (a) a markdown text block describing several options in detail, followed by (b) an
AskUserQuestiontool call referring to those options (with optionpreviewfields). - Observe the terminal UI when the turn arrives.
Expected behavior
The assistant's text that precedes the tool call should be rendered (and readable/scrollable) before or above the question dialog, so the user can read the context before answering.
Actual behavior
The question dialog takes over immediately; the preceding assistant text is only revealed after the dialog is answered/dismissed. The user answers blind, then sees the explanation.
Environment
- Claude Code CLI: 2.1.173 (terminal)
- OS: Windows 10 Pro (10.0.19045)
- Question had 3 options, each with multi-line
previewcontent (ASCII mockups)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗