claude-code - 💡(How to fix) Fix Tool results delayed and duplicated in interactive sessions (v2.1.158, Linux, multiple concurrent sessions)

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…
RAW_BUFFERClick to expand / collapse

Symptom

Over the last ~24h, tool calls in interactive sessions exhibit two related problems:

  1. Tool results arrive seconds late — a noticeable delay between the tool finishing and its result appearing to the model/UI.
  2. Tool results render duplicated — a single tool call's result is echoed multiple times. For example, one Read of an unchanged file produced several repeated Wasted call — file unchanged since your last Read results, and a single batch of Read/Bash calls came back with the same outputs repeated.

The duplication causes the model to get confused about what actually ran (it looks like multiple calls completed when only one did).

Local resources are healthy — ruled out

This is not memory/swap/CPU pressure on the host. Measured live:

  • /proc/pressure/memory: some avg10=0.00 avg60=0.00 avg300=0.00 — zero memory-stall time over 10s/60s/300s.
  • vmstat 1: si/so (swap in/out) = 0/0 on every live sample; wa (io-wait) = 0; CPU 91–97% idle.
  • kswapd0: cumulative CPU 00:01:20 over 5 days uptime — no reclaim pressure.
  • 5s swap-counter delta from /proc/vmstat: 1 page in, 0 out, 1 major fault — noise, no thrash.
  • ~6.5 GiB free RAM; load average 0.21 0.65 0.53 on 16 cores.

(There is parked swap usage, but it is cold pages Linux offloaded to free cache — not active paging. PSI and si/so confirm nothing stalls on it.)

Hooks — ruled out

Configured PreToolUse/PostToolUse hooks were timed in isolation:

  • gsd-validate-commit.sh: 22 ms
  • gsd-context-monitor.js: 19 ms
  • gsd-graphify-update.sh: 28 ms
  • node cold-start baseline: 18 ms

Total per-Bash hook overhead ~70 ms — far below the multi-second delays observed.

Environment

  • Claude Code 2.1.158
  • Linux 6.17.0-29-generic, 16 cores, 31 GiB RAM
  • 6 concurrent claude CLI sessions running with --dangerously-skip-permissions

Possible repro angle (not yet bisected)

The reporter runs 6 concurrent CLI sessions. We did not bisect down to a single session (the reporter needs the sessions running). It is plausible the delayed/duplicated tool results correlate with multiple concurrent sessions contending on some shared client-side state/IPC. If others can reproduce, a useful test would be: does the duplication occur with a single session, or only with several concurrent ones?

Expected

Each tool call returns exactly one result, promptly.

Actual

Results are delayed by seconds and sometimes delivered multiple times for a single call.

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 Tool results delayed and duplicated in interactive sessions (v2.1.158, Linux, multiple concurrent sessions)