[BUG] Frequent "API Error: 400 due to tool use concurrency issues" in VSCode extension

Status Open
Reported on v2.1.19
Maintainer reply None cached
Activity 15 comments · opened Jan 26, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Getting frequent "API Error: 400 due to tool use concurrency issues" errors when using Claude Code in VSCode.

Environment:

  • VSCode Extension (not CLI)
  • Windows
  • Started happening: [תאריך - למשל January 25-26, 2026]

Steps to reproduce:

  1. Open any project in VSCode with Claude Code extension
  2. Ask Claude to perform any task that uses tools (read files, edit, etc.)
  3. Error appears frequently, sometimes on every task

Expected behavior:
Tool calls should complete without concurrency errors

Actual behavior:
Tasks fail with "API Error: 400 due to tool use concurrency issues"
This happens multiple times per session, making the extension unusable.

Frequency:
Almost every task triggers this error

What Should Happen?

Tool calls (Read, Edit, Write, Bash, etc.) should complete successfully without errors. Claude should be able to perform tasks that require multiple tool uses without concurrency issues.

Error Messages/Logs

API Error: 400 due to tool use concurrency issues

Steps to Reproduce

  1. Open any project in VSCode with Claude Code extension (v2.1.19)
  2. Start a conversation with Claude
  3. Ask Claude to perform any task that requires tool usage, for example:
  • "Read the file package.json"
  • "Create a new file called test.ts"
  • "Edit this function..."
  1. Error appears: "API Error: 400 due to tool use concurrency issues"

The error happens on almost every task that involves tool calls.
No specific file or code triggers it - it's a general issue with tool usage.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.0.67

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Terminal.app (macOS)

Additional Information

Version mismatch detected:

  • VSCode Extension: 2.1.19
  • CLI (claude --version): 2.0.67

The error occurs frequently when Claude attempts to use multiple tools.
Started happening around January 25-26, 2026.
Previously worked without issues.

View original on GitHub ↗

15 Comments

azaru · 7 months ago

Additional findings on pipe mode (-p) root cause

### Summary
The 400 error is specific to pipe mode (-p). Parallel tool calls work correctly in interactive mode but fail consistently with -p.

### Environment

  • Claude Code version: 2.1.19
  • OS: macOS (Darwin 25.2.0)
  • Models tested: claude-sonnet-4-5-20250929, claude-opus-4-5-20251101

### Key findings

  1. Root cause is -p flag, not any other flag
  • Tested removing --dangerously-skip-permissions → still fails
  • Tested removing --output-format stream-json → still fails
  • Tested different models (sonnet/opus) → both fail
  • Only common factor: -p (stdin pipe mode)
  1. Works in interactive mode

Same parallel tool calls (Bash + Read, or Read + Read) succeed in interactive CLI but fail in pipe mode.

  1. Error can occur AFTER successful tool execution

In some cases, the tool call completes successfully (returns valid results), but the 400 error triggers on the next turn when the model tries to continue.

  1. Prompt instructions don't help

Adding explicit instructions like "Execute ALL tool calls ONE AT A TIME" doesn't prevent the error - model optimizes with parallel calls anyway.

### Minimal reproducer
```bash
# This triggers parallel Read calls and fails
echo "Read /etc/hosts and /etc/passwd and compare them" | claude -p

# Same request works fine in interactive mode
claude # then type the same prompt

Log pattern

// Assistant sends parallel tool calls
{"type":"tool_use","id":"toolu_1","name":"Read","input":{"file_path":"file1"}}
{"type":"tool_use","id":"toolu_2","name":"Read","input":{"file_path":"file2"}}

// Results return successfully
{"type":"tool_result","tool_use_id":"toolu_1","content":"..."}
{"type":"tool_result","tool_use_id":"toolu_2","content":"..."}

// Then error on next assistant turn
{"type":"assistant","error":"invalid_request","content":[{"text":"API Error: 400 due to tool use concurrency issues."}]}

Workaround attempts (none worked)

  • ❌ Remove --output-format stream-json
  • ❌ Remove --dangerously-skip-permissions
  • ❌ Switch models (sonnet → opus)
  • ❌ Add "execute sequentially" instructions to prompt

Suggested investigation

The issue appears to be in how pipe mode handles concurrent tool execution vs interactive mode. There may be a race condition or different code path for tool result aggregation in -p mode.
```

YarrowQiao · 7 months ago

same here

alex-jax · 7 months ago

I have the same issue :(

HanyuPei22 · 7 months ago

Same issue too :(:(

bbernag · 7 months ago

A temporary fix is to downgrade to 2.1.15

curl -fsSL https://claude.ai/install.sh | bash -s 2.1.15

alex-jax · 7 months ago

I downgraded and it works again thanks

On Mon, 26 Jan 2026, 16:32 berna, @.***> wrote:

bbernag left a comment (anthropics/claude-code#20929) <https://github.com/anthropics/claude-code/issues/20929#issuecomment-3800516262> A temporary fix is to downgrade to 2.1.15 curl -fsSL https://claude.ai/install.sh | bash -s 2.1.15 — Reply to this email directly, view it on GitHub <https://github.com/anthropics/claude-code/issues/20929#issuecomment-3800516262>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AKGF5RMBJHBIR3GOS7WHRN34IY6QXAVCNFSM6AAAAACS334T2OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTQMBQGUYTMMRWGI> . You are receiving this because you commented.Message ID: @.***>
utsav-web · 7 months ago

Yes same here. Downgraded and it's working

hahnsangkim · 7 months ago

I'm using Claude Code 2.1.19 for VS Code; any way to download to 2.1.15?

bbernag · 7 months ago
I'm using Claude Code 2.1.19 for VS Code; any way to download to 2.1.15?

Yes, you can

<img width="788" height="207" alt="Image" src="https://github.com/user-attachments/assets/5bf6cc94-254e-4357-9787-c0515b2283a3" />

BhaskaranR · 7 months ago

I am getting this error with claude code on cursor extension. i tried downgrading it doesn't help

mjbusch2121 · 7 months ago

Update: Issue resolved — it was a formatting mistake on my end. ALT + SHIFT + F is working again!

New to all of this, good to now issues are abound. Prettier Extension was working fine in VS Code. Installed Claude Code yesterday and now ALT + SHIFT + F isn't working at all. Uninstalled both Prettier and Claude Code, still not properly functioning. Each ALT + SHIFT + F gets Prettier! error in bottom right corner of VS Code.

oskarogri · 7 months ago

Can confirm the same error.

Platform: Linux (6.17.0-8-generic)
Claude Code running in VSCode extension
Model: claude-opus-4-5-20251101

Rich5 · 7 months ago

same error. Had to downgrade. to 2.1.15

callezenwaka · 7 months ago

Same error here: API Error: 400 due to tool use concurrency issues.

Took a look at the logs:

[ERROR] MCP server "claude-vscode" Failed to fetch tools: MCP error -32601: Method not found

messages.1: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01FgDfzzzUtV74HedBYfTbQs. Each `tool_use` block must have a corresponding `tool_result` block in the next message.
pavel-pasha1 · 7 months ago

Same issue, downgrading extension from 2.1.19 to 2.1.15 helped (claude cli is latest)

claude --version
2.1.9 (Claude Code)

VScode:

Version: 1.108.2
Commit: c9d77990917f3102ada88be140d28b038d1dd7c7
Date: 2026-01-21T13:52:09.270Z
Electron: 39.2.7
ElectronBuildId: 12953945
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Darwin arm64 25.2.0