Batched/parallel tool calls: one failure cancels all siblings; Edit old_string match failures (Windows CRLF)

Resolved 💬 2 comments Opened May 31, 2026 by mmercuri Closed Jun 4, 2026

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".

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗