[BUG] TUI groups thinking blocks and tool calls separately instead of displaying them in chronological interleaved order

Resolved 💬 4 comments Opened Mar 4, 2026 by carrotRakko Closed Apr 1, 2026

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?

When a single assistant turn contains interleaved extended thinking and tool calls, the TUI groups all tool call blocks together and all thinking blocks together, rather than displaying them in chronological order.

What the model produces (chronological):

∴ Thinking… (consider which file to read)
● Read(file-a.ts)
∴ Thinking… (analyze result, decide to search)
● Search(pattern: "foo")
∴ Thinking… (connect the dots)
● Read(file-b.ts)
∴ Thinking… (arrive at conclusion)
● Final text output

What the TUI actually displays:

∴ Thinking… (first block only)

● Read(file-a.ts)
● Search(pattern: "foo")     ← tools grouped together
● Read(file-b.ts)

∴ Thinking…                  ← remaining thinking blocks
∴ Thinking…                     grouped together at the end
∴ Thinking…
∴ Thinking…

● Final text output

This makes it impossible to follow the reasoning chain — "what did Claude think → what did it do → what did it learn → what did it decide next."

What Should Happen?

Thinking blocks and tool call blocks should be displayed in their original chronological order, preserving the interleaved sequence as the model produced them.

Steps to Reproduce

  1. Use a model that supports extended thinking (e.g., Opus)
  2. Give a task that requires multiple tool calls with reasoning between them (e.g., "trace how function X is called through the codebase")
  3. After the turn completes, expand the thinking blocks
  4. Observe that tool calls and thinking blocks are grouped by type rather than shown in chronological order

Claude Model

Opus

Is this a regression?

I don't know

Claude Code Version

2.1.68 (Claude Code)

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

iTerm2

Additional Information

This is particularly impactful for users who review Claude's thinking process to understand and verify its reasoning. With interleaved thinking, the model's thought process is tightly coupled to each tool call — losing the chronological ordering defeats the purpose of making thinking visible.

✍️ Author: Claude Code with @carrotRakko (AI-written, human-approved)

View original on GitHub ↗

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