[BUG] Interleaved thinking causes text to render character-by-character in TUI and IDE plugin
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?
Description
When interleaved-thinking-2025-05-14 beta header is active, the TUI and IDE plugin render
text responses character-by-character, with each character appearing as a separate list item
interleaved with "Thought for 0s" blocks.
Environment
- Claude Code version: 2.1.117
- OS: macOS (arm64)
- Occurs in: CLI TUI + CatPaw IDE plugin
Steps to Reproduce
- Start a new Claude Code session
- Ask any question that triggers interleaved thinking
- Observe the response rendering
Expected Behavior
Text renders normally as continuous output.
Actual Behavior
Each character appears as a separate bullet point, interleaved with "Thought for 0s" blocks:
- 我
- Thought for 0s
- 发
- Thought for 0s
- 现
- ...
Root Cause (identified)
The request header includes interleaved-thinking-2025-05-14 (hardcoded in CLI source).
This causes the API to return interleaved thinking and text content blocks in the stream.
The TUI renderer does not correctly handle interleaved block types — it renders each delta
event as a new list item instead of grouping by block index.
Setting alwaysThinkingEnabled: false or effortLevel: low in ~/.claude/settings.json
does NOT fix the issue because the beta header is hardcoded.
Workaround
None currently available from user side.
What Should Happen?
The correct rendering logic should be:
On content_block_start → create a new block slot by index, type is either thinking or text
On content_block_delta → append the delta to the existing block at that index
On content_block_stop → finalize and render that block
thinking blocks render as a collapsible "Thought for Xs" summary, text blocks render as normal continuous text.
What's happening now is the renderer skips the grouping step — every content_block_delta event triggers a new render item regardless of index or type, so each character becomes its own bullet point with a "Thought for 0s" in between.
Error Messages/Logs
Steps to Reproduce
1
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.117 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗