claude-code - 💡(How to fix) Fix Batched/parallel tool calls: one failure cancels all siblings; Edit old_string match failures (Windows CRLF)

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…

Two recurring, related failure modes when an assistant turn issues multiple tool calls in a single message (parallel/batched tool use), observed consistently over ~2 days of heavy use (Bash + Edit + Read + browser/Playwright MCP, on Windows).

Error Message

When several tool calls are sent together and an early one returns a non-zero exit / error, every remaining queued call in that same batch is cancelled with: Expected: independent tool calls in a batch should fail independently; one error should not cancel siblings (or there should be a clear way to request best-effort execution).

  1. Make batched tool calls fail independently (don't cancel siblings on one error), or add an explicit "continue-on-error" semantic.
  2. Edit tool: more robust EOL/whitespace-tolerant matching on Windows, and a clearer error that distinguishes "not found" from "ambiguous".

Root Cause

Two recurring, related failure modes when an assistant turn issues multiple tool calls in a single message (parallel/batched tool use), observed consistently over ~2 days of heavy use (Bash + Edit + Read + browser/Playwright MCP, on Windows).

Fix Action

Fix / Workaround

Impact

  • Large, repeated loss of queued work; turns become unreliable when batching.
  • Practical workaround the assistant is forced into: issue one tool call per message, which is much slower.

Code Example

Cancelled: parallel tool call Bash(cd "…") errored
RAW_BUFFERClick to expand / collapse

Summary

Two recurring, related failure modes when an assistant turn issues multiple tool calls in a single message (parallel/batched tool use), observed consistently over ~2 days of heavy use (Bash + Edit + Read + browser/Playwright MCP, on Windows).

1. One failed call in a batch cancels all remaining calls ("cascading cancellation")

When several tool calls are sent together and an early one returns a non-zero exit / error, every remaining queued call in that same batch is cancelled with:

Cancelled: parallel tool call Bash(cd "…") errored

A single trivial failure (e.g. a cd into a not-yet-created dir, an Edit whose old_string doesn't match, or a screenshot Read that exceeds the image size limit) aborts 10–30 unrelated, independent operations in the same turn. This wastes large amounts of work and forces re-issuing everything.

Observed triggers seen repeatedly:

  • A Read of a PNG exceeding the max image dimension ("At least one of the image dimensions exceed max allowed size") failing, which then cancels all subsequent edits/commands in the batch.
  • An Edit failing old_string match, cancelling the rest of the batch.
  • A git/cd command returning exit 1 (e.g. folder not present yet) cancelling later, independent commands.

Expected: independent tool calls in a batch should fail independently; one error should not cancel siblings (or there should be a clear way to request best-effort execution).

2. Edit tool: old_string match failures / silent non-application

Frequent String to replace not found in file errors even when the target text appears present, often due to whitespace/EOL handling (the repo is on Windows; Git reports LF will be replaced by CRLF). When an Edit is part of a batch, its failure also triggers #1. Net effect: edits intermittently don't apply and take the rest of the batch down with them.

Environment

  • Claude Code on Windows 11 (PowerShell + Git-Bash/MSYS), CRLF/LF in play
  • Heavy mixed tool use: Bash, Edit, Read (incl. images), Playwright MCP
  • Frequency: many times per session over 2 days

Impact

  • Large, repeated loss of queued work; turns become unreliable when batching.
  • Practical workaround the assistant is forced into: issue one tool call per message, which is much slower.

Suggested fixes

  1. Make batched tool calls fail independently (don't cancel siblings on one error), or add an explicit "continue-on-error" semantic.
  2. Surface partial results from a cancelled batch instead of discarding them.
  3. Edit tool: more robust EOL/whitespace-tolerant matching on Windows, and a clearer error that distinguishes "not found" from "ambiguous".

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 Batched/parallel tool calls: one failure cancels all siblings; Edit old_string match failures (Windows CRLF)