[Bug]: Assistant text emitted before a tool call disappears once later text in the same turn arrives
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 23k
- Forks
- 5.9k
- Avg merge
- 11h 14m
- Merged PRs (30d)
- 357
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/client (chat timeline)
Steps to reproduce
Provider: Claude Code harness, model claude-fable-5-1.
- Ask a question the model answers in prose, then has it call a tool (in my case
SendMessageto a resumed subagent), then write a short closing line. Turn shape istext → tool_use → text. - Watch the timeline: the first prose block streams in and is fully readable.
- When the tool call completes and the closing text arrives, the first block is gone. Only the closing line (e.g. "Queued to the worker.") remains as the assistant message.
Reproduced 3 of 3 times with that turn shape. Turns with no tool call render fine. A turn with text → tool_use → text that ran later did not reproduce, so it may be timing-dependent.
Expected
All text blocks in the turn stay visible, interleaved with the tool-call cards.
Actual
The earlier text block is replaced by the last text block. The substantive answer is lost from the visible transcript.
Environment
- T3 Code
0.0.41-nightly.20260911.1533 - macOS 26.6 (Darwin 25.6.0)
- Claude Code provider
Notes
Possibly related to #7137 (stalled stream truncates the message to its first delta), but the symptom here is the reverse: earlier text is dropped in favour of the last block. Happy to add a screen recording on request.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the apps/client chat timeline and reproduce the Claude Code turn shape text → tool_use → text described in the issue. Trace how streamed assistant text blocks are stored and rendered when the tool call completes; done means all text blocks remain visible, interleaved with the tool-call cards, and turns without tools still render correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100