Claude 5.x explanation written as a single thinking block before AskUserQuestion stays a collapsed Thought#27238
What happened
Sometimes text disappears when the AskUserQuestion tool gets used. I've on quite a few occasions had a question asking me about something the model claims to have explained, but that I never saw.
The missing text never shows up as a message, even after answering the question or reloading.
Diagnosis
On Claude 5.1+ models, when a reply has no text block and a single thinking block before the AskUserQuestion tool_use, that thinking block is usually the explanation the question refers to. T3 files it as a reasoning item, so it shows only as a collapsed, summarized "Thought" row and never as an assistant message.
The cause is the promotion rule from #18923 in apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.ts (v0.1.5):
:1755:// Claude 5.1+ emits at most one pre-tool text block as thinking; treat only a second consecutive thinking block as text.:8250-8256: a thinking block is promoted to assistant text before atool_useonly ifupdate.followsThinking.:8281:followsThinking: previous !== null && previous.messageId === message.message.id. A lone thinking block is never promoted.
#18923 chose this rule from a sample across all tool calls, where lone pre-tool thinking blocks mostly read as reasoning. Right before AskUserQuestion, the opposite holds. The model has just written up what it is asking about, and a lone block is usually that write-up.
The server drops nothing. Every text block before a question was saved and shown. The text exists only as a reasoning summary.
main still has the same rule (claudeWritesUpdatesAsThinking / followsThinking), so no newer release fixes this.
Suggested fix: when a Claude 5.1+ assistant message has no text block and its tool_use is AskUserQuestion, promote the last non-empty thinking block to assistant text even without followsThinking. That keeps #18923's behaviour for ordinary tool calls.
Steps to reproduce
Not deterministic, because the model decides between text and thinking.
- Claude provider,
claude-opus-5-5, default thinking display (summarized), no launch-argument overrides. - Work in a thread where the agent reviews something and then asks you to choose via
AskUserQuestion(e.g. "check this PR and ask me whether to merge it"). Repeat several times. - In roughly one in five question turns, the reply is
thinking → tool_use AskUserQuestionwith notextblock. The question card appears with no visible explanation. The explanation appears only as a collapsed, reworded "Thought" row above it. - Confirm in the DB:
orchestration_v2_projection_turn_itemsholds a singlereasoningrow…<msgId>:thinking:0for that message, and noassistant_messagerow.
Version
0.1.5 (desktop app, local server reports 0.1.5)
Environment
macOS 26 (Darwin 25.6.0, arm64), Node v26.12.1, Claude Code 2.1.312, model claude-opus-5-5
Evidence
| 1 | # All AskUserQuestion calls in 60 provider logs, Oct 23-29 (141 calls), classified by the |
| 2 | # block before the tool_use and how the projection stored it: |
| 3 | text block before question 83 -> all saved as assistant_message, all shown |
| 4 | 2 thinking blocks, no text 28 -> thinking:1 promoted to assistant_message |
| 5 | 1 thinking block, no text 30 -> reasoning only, never an assistant_message |
| 6 | |
| 7 | # Of the 30 lone blocks, about 26 are addressed to the user. Examples (names/numbers redacted): |
| 8 | "PR #NNNN bumps <app> to <version> with its release notes, all 22 checks pass, and merging starts no release ... Your options are to approve and merge at <sha>, hold it until <run> finishes, or run /code-review first." |
| 9 | "Two PRs are ready for a merge decision: #NNNN (vitest upgrade, all 19 checks pass, clears two CVEs) and #NNNN (doc-only plan update, no checks apply). I recommend merging both as-is ..." |
| 10 | # One the model wrote after noticing the problem itself: |
| 11 | "I realize the preceding explanatory text gets collapsed into a one-line summary before the question tool runs, so I need to fold the actual explanation ..." |
| 12 | |
| 13 | # Same-thread contrast (one message each): |
| 14 | msg A: thinking:0 -> tool_use AskUserQuestion => turn_items: reasoning |
| 15 | msg B: thinking:0, thinking:1 -> tool_use AskUserQuestion => turn_items: reasoning, assistant_message |
| 16 | |
| 17 | # Claude process args as launched by T3 0.1.5: |
| 18 | claude ... --thinking adaptive --thinking-display summarized --effort high --model claude-opus-5-5 ... |
Related issues
#18355 and #18923 introduced and narrowed the pre-tool thinking promotion. This issue is the case #18923's rule leaves out, a lone block before AskUserQuestion. #11353 and #14159 cover text blocks folded or hidden around questions, and they were closed as client-side fold issues. Here the text is never a message at all. #18674/#18680 are the reverse problem (reasoning promoted to text), which this fix avoids by limiting itself to AskUserQuestion.
Fix applied or workaround
Set Claude provider launch arguments to --thinking-display highlights, per a comment on #11353. Not yet verified on 0.1.5: the adapter also passes thinking: { display: "summarized" } to the SDK (ClaudeAdapterV2.ts:1548-1560), which may override the flag.
Filed by
Claude Code (claude-opus-5-5) via t3 triage