[BUG] API Error: 400 due to tool use concurrency issues.

Resolved 💬 17 comments Opened Jan 24, 2026 by Bensmirus Closed Feb 28, 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?

Hello, I was using claude in cursor just fine. The day I tried claude in vs code, this error started. Now I can no longer use claude in cursor or vs code, I tried many fixes.

I have claude max.

What Should Happen?

Claude should not interrupt chat

Error Messages/Logs

API Error: 400 due to tool use concurrency issues.

Steps to Reproduce

Open Cursor
Start a new claude chat
Write a prompt
It fails after a few seconds

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.19

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Cursor

Additional Information

_No response_

View original on GitHub ↗

16 Comments

github-actions[bot] · 5 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/20592
  2. https://github.com/anthropics/claude-code/issues/20571
  3. https://github.com/anthropics/claude-code/issues/20555

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

matchpoint-infra · 5 months ago

We're seeing the exact same behavior after upgrading to v2.1.19.

CurryTang · 5 months ago

try downgrading to 2.16/2.7, and this problem still persists.

Bensmirus · 5 months ago
try downgrading to 2.16/2.7, and this problem still persists.

So this is an issue on anthropic side

CurryTang · 5 months ago
> try downgrading to 2.16/2.7, and this problem still persists. So this is an issue on anthropic side

2.15 works for me

Bensmirus · 5 months ago

How to downgrade ?

M4xP4s · 5 months ago

Hey, just wanted to let you know - I encountered the same issue when using the Claude Code extension (Antigravity).
Running the same claude code version (v2.1.19 ) in the terminal works without any issues... So pretty sure you can use the terminal as a temp workaround

rafaelje · 5 months ago
How to downgrade ?

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

mav33rick · 5 months ago

I was having this same issue. Downgraded to 2.1.15, and turned off Auto-Update. Seems to be working.

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 Extensions → "Claude Code for VS Code"
  2. Click dropdown next to Uninstall → "Install Specific Version" → 2.1.17
  3. Uncheck "Auto Update"
  4. Restart VS Code

Result: Extension 2.1.17 + CLI 2.1.19 = ✅ Works

The bug is in the VS Code extension code (2.1.18/2.1.19), not the CLI or API.

androbwebb · 5 months ago

I am also experiencing this just simply using claude.ai/code

luiskcr · 5 months ago

I had to defer to just using CLI, downgrading didn't work

y0sr1 · 5 months ago

I had this issue using VS Code. Here is what solved it for me:

/compact

then

continue
filipmares · 5 months ago

Seeing this issue and diagnosed it as the following using Copilot CLI 😛

Bug Report: MCP Tool Names Exceed 64-Character API Limit

  Error:

    API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.2.content.0.tool_result.content.0.to
  ol_reference.tool_name: String should have at most 64 characters"}}

  Root Cause: Claude Code generates MCP tool names using the pattern:

    mcp__plugin_{plugin-name}_{server-name}__{tool-name}

  This naming convention can easily exceed the Anthropic API's 64-character limit for tool names when plugin names, server names,
  or tool names are descriptive.

  Example: A plugin with an MCP server named azure-devops-mcp-server exposing a tool repo_list_pull_requests_by_commits produces a
  combined name well over 64 characters.

  Suggested Fix Options:

    - Truncate or hash long tool names before sending to the API
    - Use a shorter naming convention for MCP tools from plugins
    - Validate tool name length during plugin installation and warn/error if names would exceed 64 characters
    - Document the limitation so plugin authors know to use short server names

  Current Workaround: Plugin authors must use very short MCP server names (e.g., ado instead of azure-devops-mcp-server) to stay
  under the limit.
github-actions[bot] · 4 months ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

github-actions[bot] · 4 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

Showing cached comments. Read the full discussion on GitHub ↗