Bug: API Error 400 - tool use concurrency issues

Open 💬 18 comments Opened Jan 24, 2026 by hirata-kosuke

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?

Description
When executing custom slash commands, Claude Code repeatedly fails with:
API Error: 400 due to tool use concurrency issues

Steps to Reproduce

  1. Create custom slash command in .claude/commands/
  2. Execute command (e.g., /video-create テスト動画)
  3. Answer the follow-up questions from AskUserQuestion
  4. Error occurs immediately after user response

Environment

  • OS: Windows
  • Claude Code version: 2.1.19 (Claude Code)
  • Date: 2026/01/24

Screenshot
<img width="1816" height="404" alt="Image" src="https://github.com/user-attachments/assets/32dd82c9-a81d-4aa0-8d29-062078931ef9" />

Notes

  • Error persists even after waiting 10+ minutes
  • Error occurs after AskUserQuestion tool completes
  • Simple commands without AskUserQuestion may also fail

What Should Happen?

  1. Create custom slash command in .claude/commands/
  2. Execute command (e.g., /video-create テスト動画)
  3. Answer the follow-up questions from AskUserQuestion
  4. Error occurs immediately after user response

Error Messages/Logs

API Error: 400 due to tool use concurrency issues

Steps to Reproduce

  1. Create custom slash command in .claude/commands/
  2. Execute command (e.g., /video-create テスト動画)
  3. Answer the follow-up questions from AskUserQuestion
  4. Error occurs immediately after user response

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.19 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

18 Comments

github-actions[bot] · 5 months ago

Found 1 possible duplicate issue:

  1. https://github.com/anthropics/claude-code/issues/11421

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

BruceJillis · 5 months ago

This has also started happening to me, I did interact with the new Rewind feature on a message but now all my conversations end quickly and abruptly in API Error: 400 due to tool use concurrency issues.. Ive tried removing all my local state to reset or remove any broken commands / state locally but to no avail. I switched to another workspace, reinstalled the vscode extension. Nothing helps. I tried the global CLAUDE.md fix but it didnt help.

2026-01-24 12:12:55.756 [info] From claude: 2026-01-24T11:12:55.756Z [DEBUG] [API:auth] OAuth token check complete

2026-01-24 12:12:56.088 [info] From claude: 2026-01-24T11:12:56.088Z [ERROR] Error in non-streaming fallback: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.1: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_019JokayPpkqsHmYZXExsSGR. Each `tool_use` block must have a corresponding `tool_result` block in the next message."},"request_id":"req_011CXS6yTubqh5GtX3voua3b"}

2026-01-24 12:12:56.088 [info] From claude: 2026-01-24T11:12:56.088Z [ERROR] "Error: Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.1: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_019JokayPpkqsHmYZXExsSGR. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"},\"request_id\":\"req_011CXS6yTubqh5GtX3voua3b\"}\n    at generate (B:/~BUN/root/claude.exe:143:37450)\n    at makeRequest (B:/~BUN/root/claude.exe:160:5435)\n    at processTicksAndRejections (native:7:39)"

It stops happening when I switch back to version: 2.1.17 and restart extensions, start a new chat.

MiccoHadje · 5 months ago

Me too. Seems to be a persistent problem that Anthropic is ignoring.

maxritter · 5 months ago

Same for me with newer versions of CC, 2.1.6 working fine and later the issues came

goslingmanagment · 5 months ago

Same for me, literally can't work

aecs4u · 5 months ago

same issue!

nandorcsupor · 5 months ago

Same issue - seems to be widespread

PHY041 · 5 months ago

✅ WORKAROUND FOUND

The fix: Install VS Code extension version 2.1.17 while keeping CLI at 2.1.19

Steps:

  1. In VS Code, go to Extensions
  2. Find "Claude Code for VS Code"
  3. Click the dropdown arrow next to Uninstall → "Install Specific Version" → Select 2.1.17
  4. Uncheck "Auto Update" to prevent it from upgrading
  5. Restart VS Code

Result:

  • Extension shows: 2.1.17
  • claude --version shows: 2.1.19
  • It works! No more concurrency errors

What this tells us:
The bug is in the VS Code extension code (2.1.18 or 2.1.19), NOT in the CLI or API. The extension's tool call orchestration is broken in newer versions.

| Configuration | Status |
|---------------|--------|
| Extension 2.1.19 + CLI 2.1.19 | ❌ Broken |
| Extension 2.1.17 + CLI 2.1.19 | ✅ Works |

Hope this helps others!

heathdutton · 5 months ago

Can confirm this bug is real, happens when using 2.1.19 and starting new sessions in terminal with prompts fed in.

coreofalchemy-ui · 5 months ago

아진짜 나도 이거때문에 일을 못한다고 일을 씨발 진짜 딱 내가 맥스구독하고 나니까 바로 이러네 아 정신병걸리겠다

tobiasopdenbrouw · 5 months ago

Confirmed this bug is real. Also confirmed that dropping back to version 2.1.17 works.

emregurhan · 5 months ago

🔴 Also experiencing this - Critical impact on productivity

Environment

  • OS: macOS (Darwin 25.3.0)
  • Claude Code Version: Latest (VS Code Extension)
  • Model: Claude Opus 4.5
  • Date: 2026-01-27

Reproduction Scenario

The error occurs frequently during:

  1. Task tool usage - When spawning subagents (e.g., statusline-setup, Explore)
  2. AskUserQuestion flow - After answering questions, the next tool call fails
  3. Parallel tool calls - When Claude attempts to call multiple tools simultaneously

Error Frequency

  • Very frequent - happens multiple times per session
  • Makes the tool nearly unusable for complex workflows
  • No workaround found (retrying doesn't help)

Impact Assessment

Looking at GitHub, there are 10+ duplicate issues filed in the last 48 hours alone:

  • #21281, #21100, #21087, #21082, #21001, #20888, #20839, #20678, #20598...

This suggests a widespread regression affecting users across all platforms (Windows, macOS, Linux).

Suspected Root Cause

The error message "tool use concurrency issues" suggests the API is rejecting requests where:

  • A previous tool call hasn't fully completed
  • Multiple tool results are being processed simultaneously
  • There's a race condition in the message/response handling

Suggested Priority

Given the volume of reports and the fact that this blocks core functionality (tool usage is fundamental to Claude Code), this should be treated as a P0/Critical issue.

Request

Could the team please:

  1. Acknowledge this is a known issue being actively worked on
  2. Provide an ETA or workaround if available
  3. Consider a hotfix release given the impact

Thank you for your attention to this matter. 🙏

SixFive7 · 5 months ago

+1

madebycaliper · 5 months ago

Same outchea

ppiankov · 3 months ago

If your session is stuck in this state and /rewind doesn't recover it, the root cause is likely a dropped tool_result — a tool_use block in the conversation history has no matching result, making the conversation structurally invalid.

Workaround: contextspectre v0.46.0+ can fix this by injecting synthetic tool_result entries:

# Dry run — show orphaned tool_use blocks
contextspectre rewire <session-id>

# Fix — inject synthetic tool_results
contextspectre rewire <session-id> --apply

Install: brew install ppiankov/tap/contextspectre

See #39316 for the specific recovery-failure analysis.

laurent22 · 2 months ago

I wish some attention was given to this issue. The only workaround is go back to an old version of VSCode but this has its own problems. Is the Claude team even aware of this?

Aditya-Tripuraneni · 1 month ago

I am having this issue as well, noticed it after downloading the new claude update.

<img width="967" height="323" alt="Image" src="https://github.com/user-attachments/assets/78c02e15-1565-42c8-b051-301e5c532b43" />

RajanChavada · 1 month ago

+1 getting the same error after a few turns of successful tool calls and outputs