[Bug] Tool results delivered with multi-turn lag and flushed in batch
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
[]This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗