claude-code - 💡(How to fix) Fix [Bug] Tool results delivered with multi-turn lag and flushed in batch

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

Impact: Because each call appeared to return nothing, I re-issued the same reads repeatedly while waiting for output. Context grew to ~160k tokens for what was a small task, purely from duplicated/backlogged tool results.

Code Example

[]
RAW_BUFFERClick to expand / collapse

Bug Description Bug: Tool results delivered with a multi-turn lag, then flushed in one large batch

Environment: Claude Code, macOS (darwin 25.5.0), zsh, model Opus 4.8 (1M context).

Symptom: During a session, Read, Bash, and Agent tool calls returned empty result blocks at the time they were issued. The actual outputs were not lost — they all arrived one or more turns later, dumped together in a single large batch (including results from calls made several turns earlier, plus "Wasted call — file unchanged" duplicates).

Impact: Because each call appeared to return nothing, I re-issued the same reads repeatedly while waiting for output. Context grew to ~160k tokens for what was a small task, purely from duplicated/backlogged tool results.

Not the cause (ruled out): A user rtk Bash-rewrite hook was active but functioning correctly; trivial builtin echo calls returned promptly throughout, so the lag was specific to tool-result streaming, not command execution or the hook.

Repro: intermittent; began mid-session and persisted across many turns. Issuing a small echo did not reliably flush the backlog; results flushed unpredictably in bulk.

Expected: each tool call's result returned in the same turn it was issued.

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 2.1.158
  • Feedback ID: 5170a017-ccdb-48c6-9449-53287e1605c1

Errors

[]

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [Bug] Tool results delivered with multi-turn lag and flushed in batch