[Bug] Parallel tool calls trigger persistent "Cancelled" errors
Bug Description "Cancelled: parallel tool call" errors kill the ongoing session. Once the error happens, it will happen for all following tool calls effectively killing the session. Restarting claude to resume the session fresh also doesn't seem to be showing the tool calls which had repeatedely errored out.
Environment Info
- Platform: linux
- Terminal: kitty
- Version: 2.1.156
- Feedback ID: 3cd02669-4c81-4283-9f78-9d9a266bef71
Terminal transcript when the error happens
● Bash(cd /home/antoine/stuff/*snip*; python3 localresearch/crosscheck.py 2>&1 | tail -20)
⎿ # crosscheck rows=842 mismatches=0
● Bash(cd /home/antoine/stuff/*snip*; python3 localresearch/crosscheck.py; echo "EXIT=$?")
⎿ # crosscheck rows=842 mismatches=0
EXIT=0
● Bash(cd /home/antoine/stuff/*snip*
python3 - <<'PY'…)
⎿ R2 OK: clean ValueError -> tmpo0z06u49.xml: endpoint type='internal_speaker' operating_mode='normal' has no <p
rofile>
● Bash(cd /home/antoine/stuff/*snip*
cat > /tmp/r2test.py <<'PY'…)
⎿ Error: Exit code 1
Traceback (most recent call last):
File "/tmp/r2test.py", line 4, in <module>
import dolby_to_easyeffects as d
ModuleNotFoundError: No module named 'dolby_to_easyeffects'
● Bash(python3 /tmp/r2test.py > /tmp/r2out.txt 2>&1; echo "exit=$?")
⎿ Cancelled: parallel tool call Bash(cd /home/antoine/stuff/*snip*
cat > /tmp/…) errored
Read 1 file (ctrl+o to expand)
● Bash(echo alive; cd /home/antoine/stuff/atmos; pwd)
⎿ Cancelled: parallel tool call Bash(cd /home/antoine/stuff/*snip*
cat > /tmp/…) errored
● Bash(python3 /tmp/r2test.py 2>&1)
⎿ Cancelled: parallel tool call Bash(cd /home/antoine/stuff/*snip*
cat > /tmp/…) errored
Read 1 file (ctrl+o to expand)
● Update(tests/test_decoders.py)
⎿ Error editing file
● Bash(python3 -m pytest tests/test_decoders.py -q 2>&1 | tail -4)
⎿ Cancelled: parallel tool call Bash(cd /home/antoine/stuff/*snip*
cat > /tmp/…) errored
● Bash(python3 -m pytest tests/test_decoders.py::TestIntAttr -q 2>&1 | tail -5)
⎿ Cancelled: parallel tool call Bash(cd /home/antoine/stuff/*snip*
cat > /tmp/…) errored
● Bash(git log --oneline -3 > /tmp/g1.txt 2>&1; git status --short >> /tmp/g1.txt 2>&1; cat /tmp/g1.txt)
⎿ Cancelled: parallel tool call Bash(cd /home/antoine/stuff/*snip*
cat > /tmp/…) errored
Found 3 possible duplicate issues:
- https://github.com/anthropics/claude-code/issues/63192
- https://github.com/anthropics/claude-code/issues/47931
- https://github.com/anthropics/claude-code/issues/22264
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with Claude Code
The symptoms seem to be different from those 3 candidate duplicate issues.
Also reproducible on macOS — the cascade is cross-platform (this is currently tagged platform:linux).
Environment
- macOS (Darwin 25.5.0), Apple Silicon
- Claude Code: <run: claude --version>
- Model: Opus 4.8 (claude-opus-4-8, 1M context)
Mechanism (reproduced 3× in a single session) When the model emits several tool calls in one turn (a parallel batch), if any one call exits non-zero / throws, every other still-pending call in that same batch is cancelled, regardless of whether they are independent. Each cancelled sibling returns:
Cancelled: parallel tool call
In my session the triggers were ordinary, recoverable errors: cat on a non-existent path (exit 1), a Python one-liner raising AttributeError (exit 1), json.load on an empty file (exit 1). Each single error wiped out 15–19 unrelated sibling calls (Read / Write / Edit / WebFetch / WebSearch / ToolSearch / MCP) — none of which ever executed.
Minimal repro — in one turn, issue a batch containing:
- Bash: cat /tmp/does-not-exist (exits 1), plus
- a few independent valid calls (e.g. Read package.json, WebFetch
).
Result: every valid call returns Cancelled: parallel tool call Bash(cat …) errored and does not run.
Secondary symptoms in the same session (possibly same root cause — cross-refs #63859, #63797, #63538):
- tool results intermittently return empty, then flush together later in one large delayed batch
- Read returns stale / duplicated content (a file's lines repeated, wrong section headers)
- with output empty/stale, the model adopted incorrect tool output downstream and presented fabricated numbers (cf. #63538)
Impact — one trivial command error (a typo or wrong path) silently kills a whole batch of unrelated work; once the session degrades, subsequent batches keep failing, effectively bricking the session until /clear or restart.
Expected — independent tool calls in a batch should each execute and return their own result (or own is_error). One sibling failing should not cancel unrelated siblings.
Workaround that holds — force one tool call per turn (no parallel batches), so there is no sibling to cancel.
Corroborating on Claude Code 2.1.156 / Linux / Opus 4.8 (1M), with two details I don't see in the thread yet — reconstructed from the session JSONL via parentUuid/uuid.
1. The trigger can be an auto-mode permission denial, not just an exit-code error
The igniting call was a single compound Bash:
cd <proj>
rm -f /tmp/<proj>/verify_final.txt
.venv/bin/python - > /tmp/<proj>/verify_final.txt 2>&1 <<'PY' # opens a live sqlite DB
rm matched a permissions.deny entry (Bash(rm:*)), so the whole compound command was refused — the recorded tool_result was Permission to use Bash with command … (is_error: true) and it never ran. Same shape as #52867 (auto-mode classifier deny → sibling Cancelled), which was auto-closed as stale but is still reproducing in 2.1.156. So the cascade is reachable via both {exit code ≥ 2} and {permission/deny refusal}.
2. The persistence is cross-turn, not same-batch (the #63576 "kills the session" part)
There was no parallel batch. Every cancelled call was a solo tool_use in its own assistant turn, yet each got Cancelled: parallel tool call Bash(cd <proj>\nr…) errored — all pointing back at that one refused rm. It cascaded across 17 consecutive single-tool turns over ~10 minutes, hitting Bash, read-only Read, and Edit to unrelated paths:
17:48:33 Bash(cd <proj>; rm -f …; python > … <<PY) → "Permission to use Bash with command …" (refused, never ran)
17:48:40 Read(/tmp/<proj>/verify_final.txt) → Cancelled: parallel tool call Bash(cd <proj>\nr…) errored
17:48:56 Bash(echo NOW …) → Cancelled … Bash(cd <proj>\nr…) errored
17:49:54 Bash(echo VERIFY-START …) → Cancelled …
… 13 more solo turns (Read …/cli.py, Edit, Read /tmp/…, …) all Cancelled against the same r… …
17:58:52 Edit(CLAUDE.md) → Cancelled …
17:59:01 «user interacts / queue flush» → wedge clears
17:59:52 Bash(…) → OK
Two consequences worth flagging:
- No auto-recovery. The model couldn't escape on its own — every fresh call it issued was instantly cancelled against the same refused command. It cleared only when the user interacted (~17:59).
- Opus 4.8 rabbit-holes on it (matching @hansborr above): while wedged it kept emitting new diagnostic commands, treated the environment as broken, and only after ~10 min self-diagnosed "the cascade is now explained: an earlier Bash (rm…)" — ~10 min of turns and tokens burned on ghost-cancelled calls.
Net: in 2.1.156 a single refused/denied call (not necessarily an exit-code ≥ 2 error) cancels all subsequent solo tool calls across turns until manual intervention.
Seeing the same on v2.1.158 (macOS), and I think I've pinned the exact boundary: the v2.1.145 fix ("failing read-only command no longer cancels sibling calls") only protects commands the classifier can statically prove are simple + read-only. Any compound command (a for loop, cmd; cmd, a heredoc cat > … <<PY) that exits non-zero still cancels every in-flight sibling in the same parallel batch — which matches the heredoc that kicked off the cascade in the transcript above.
Minimal deterministic repro
Dispatch these three Bash calls in a single turn (one parallel batch):
for n in 1 2 3; do echo "loop n=$n"; done; false← compound, exits 1sleep 2; echo SIBLING-B-SURVIVEDsleep 2; echo SIBLING-C-SURVIVED
Result: call 1 exits 1; calls 2 and 3 both return
<tool_use_error>Cancelled: parallel tool call Bash(for n in 1 2 3; do echo "loop n=$n"; don…) errored</tool_use_error>
Control (proves it's classification, not the error)
Replace call 1 with a simple read-only failure — ls /nonexistent-path (also exits 1) — and siblings B and C both survive and print. So the cancellation is gated on how the failing member is classified, not on the failure itself. Compound commands fall through to the pre-v2.1.145 cascade-cancel path (#22264).
Notes
- This is the milder, non-persistent presentation of what's reported here; same trigger family.
- The cancellation is surfaced identically to a user interrupt (#64047), so the model can't distinguish them, and downstream it can confabulate the cancelled results (#63538).
- Reports cluster in v2.1.15x (this issue, #63881, #64047, #63859), coinciding with the v2.1.154 dynamic-workflows release.
Suggested fix scope: independent sibling calls should resolve on their own exit status regardless of whether the failing member is simple or compound; extend the v2.1.145 protection to compound commands (or stop treating a batch member's non-zero exit as a batch-abort signal at all).
Environment: v2.1.158 · darwin (macOS 25.5.0) · Opus 4.8.
Related: #22264 (canonical), #63881, #64047, #63859, #63538.
FYI I hit this a few times again today on 2.1.158 as well. (originally reported on 2.1.156)
Corroborating #22264 — same on 2.1.156. In my case the cancellation persisted across sequential turns (verified via the parentUuid chain: each cancelled call's parent was the previous cancel-result, i.e. a new turn, not the original batch), and it silently dropped a side-effecting mark_chapter call. Reinforces that this isn't within-batch-only.
According to https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md#21161 tihs should be fixed in 2.1.161