API Error 400: tool use concurrency issues with single sequential Read tool calls

Resolved 💬 5 comments Opened Jan 26, 2026 by Kyle825 Closed Feb 28, 2026

Bug Description

When using Claude Code 2.1.19 in programmatic/pipe mode (-p), I consistently get the error:

API Error: 400 due to tool use concurrency issues.

This occurs even when the model is explicitly instructed to make single sequential tool calls (no parallel calls).

Environment

  • Claude Code Version: 2.1.19
  • Platform: macOS (Darwin 25.2.0)
  • Output Format: --output-format=stream-json (also tested with json - same error)
  • Model: claude-opus-4-5-20251101 (also tested with sonnet and haiku - same error)
  • Permission Mode: --dangerously-skip-permissions

Reproduction

  1. Create a prompt that instructs Claude to read files one at a time (explicitly not parallel)
  2. Pipe the prompt to claude with:

``bash
cat prompt.txt | claude -p --dangerously-skip-permissions --output-format=stream-json --model opus
``

  1. Claude starts, makes a single Read tool call, then fails with the concurrency error

Evidence from Logs

The JSON output shows the error occurs after only 2 turns with a single tool call:

{
  "error": "invalid_request",
  "type": "result",
  "subtype": "success",
  "is_error": true,
  "duration_ms": 3470,
  "num_turns": 2,
  "result": "API Error: 400 due to tool use concurrency issues.",
  "model": "claude-opus-4-5-20251101"
}

The model's first message was: "I'll read the required files sequentially to understand the current state and select the next feature."

Then it made a single Read tool call for features.json, and immediately got the 400 error.

Expected Behavior

Sequential tool calls (one Read at a time) should not trigger "tool use concurrency issues".

Actual Behavior

The CLI returns API Error: 400 due to tool use concurrency issues even with single sequential tool calls.

Additional Context

  • This is blocking an automation pipeline that uses Claude Code CLI for code generation
  • The prompt explicitly instructs: "IMPORTANT: Read files ONE AT A TIME, not in parallel. Parallel tool calls cause API errors."
  • Despite the explicit instruction, the error still occurs on the very first tool call

View original on GitHub ↗

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