[Bug] Anthropic API Error: 400 - Tool Use Concurrency Issues
Resolved 💬 18 comments Opened Nov 11, 2025 by corneliusroemer Closed Mar 1, 2026
Bug Description
Claude Code is stuck while running 3 tools in parallel:
▐▛███▜▌ Claude Code v2.0.37
▝▜█████▛▘ Sonnet 4.5 · Claude Pro
▘▘ ▝▝ /Users/cr/code/loculus/website/codemods
> fix the wrongly pointed CLAUDE.md symlink to point at the AGENTS.md in this file
⏺ I'll fix the symlink to point to the correct AGENTS.md file.
Let me first check the current state of the symlink and find the AGENTS.md file:
> you got stuck?
⎿ API Error: 400 due to tool use concurrency issues. Run /rewind to recover the conversation.
> /feedback
⎿ Feedback / bug report submitted
⏺ Bash(ls -la CLAUDE.md)
⎿ Running…
⏺ Bash(ls -la AGENTS.md)
⎿ Running…
⏺ Bash(pwd)
⎿ Running…
Reproduction
I have a CLAUDE.md that's pointed at a non-existing file (this was user error). However, that shouldn't get CLAUDE to get hung up.
touch AGENTS.mdln -s doesntexit CLAUDE.mdclaude 'fix the wrongly pointed CLAUDE.md symlink to point at the AGENTS.md in this file'
Environment Info
- Platform: darwin
- Terminal: iTerm.app
- Version: 2.0.37
- Feedback ID: 276b774c-faf7-4085-ac28-39c66adba63a
Errors
[{"error":"Error: Lock file is already being held\n at <anonymous> (/$bunfs/root/claude:87:11857)\n at X (/$bunfs/root/claude:86:5167)\n at <anonymous> (node:fs:243:13)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-11-11T14:28:37.885Z"},{"error":"Error\n at Kw (/$bunfs/root/claude:59:1142)\n at <anonymous> (/$bunfs/root/claude:64:10074)\n at emit (node:events:92:22)\n at endReadableNT (internal:streams/readable:861:50)\n at processTicksAndRejections (native:7:39)\n at request (/$bunfs/root/claude:66:2146)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-11-11T14:28:38.264Z"},{"error":"Error: Lock file is already being held\n at <anonymous> (/$bunfs/root/claude:87:11857)\n at X (/$bunfs/root/claude:86:5167)\n at <anonymous> (node:fs:243:13)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-11-11T14:28:45.413Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.2: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01KmABc9NCMy5RJysowsbePy, toolu_01PKM3nuBfZ7Z3GS4mzWqqSn, toolu_01QupRKTCoJLbtgprX6aaZbn. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"},\"request_id\":\"req_011CV2G8EEr6qV6sHbwhw4hy\"}\n at generate (/$bunfs/root/claude:228:83080)\n at makeRequest (/$bunfs/root/claude:670:5356)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-11-11T14:29:45.354Z"},{"error":"Error: Lock file is already being held\n at <anonymous> (/$bunfs/root/claude:87:11857)\n at X (/$bunfs/root/claude:86:5167)\n at <anonymous> (node:fs:243:13)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-11-11T14:29:48.176Z"},{"error":"Error: Lock file is already being held\n at <anonymous> (/$bunfs/root/claude:87:11857)\n at X (/$bunfs/root/claude:86:5167)\n at <anonymous> (node:fs:243:13)\n at processTicksAndRejections (native:7:39)","timestamp":"2025-11-11T14:30:01.588Z"}]
18 Comments
Found 3 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Corresponding Zed issue: https://github.com/zed-industries/zed/issues/44211
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
<img width="1439" height="485" alt="Image" src="https://github.com/user-attachments/assets/ed2cd883-2102-4d86-80f1-93e973bcf7fd" />
Same problem here
It makes claude code unusable, it takes 10 prompts to just get one action done if you're lucky
It's terrible. How do we get this escalated?
Maybe try making a post on reddit about it, sometimes helps
this error from ops post looks very familiar to me dealing with debians
apt...did anyone here recently suffer a bad crash while using claude code?https://github.com/anthropics/claude-code/issues/20592#issuecomment-3794761654
✅ WORKAROUND FOUND
The fix: Install VS Code extension version 2.1.17 while keeping CLI at 2.1.19
Steps:
Result:
claude --versionshows: 2.1.19What 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!
Confirmed that this workaround works for me - downgraded to extension v2.1.17 fixed it, I'm using claude v2.0.22.
Confirming that downgrading to 2.1.17 also worked for me. Thank you!
Yes downgrading resolved the issue.
Issue only happens for me after some time, when using claude in cli mode
claude -p "some prompt"Downgrading solved it for me:
curl -fsSL https://claude.ai/install.sh | bash -s v2.1.17(or without v, i forgot)
Don't forget disabling auto update, and removing the existing like you can find with
whereis claude(otherwise the new version will still be used)
Additional Case Report: Parallel Edit Tool Calls to Same File
I encountered this same error in an automated AI solver workflow. Adding this case as it provides additional detail about a specific trigger scenario.
Environment
claude --output-format stream-json -p ...)Specific Trigger: Parallel Edit Tool Calls on Same File
In my case, Claude attempted 4 parallel Edit tool calls to the same file (
src/algorithms/max_first_reduction.rs) within a single streamed message:"tool_use" ids were found without "tool_result" blocks immediately afterError Details from Logs
Suggested Mitigation
For the Edit tool specifically, parallel calls to the same file should be serialized because:
old_stringthat may no longer exist after prior modificationsWorkaround
For now, I've worked around this by adding prompt guidance:
However, a client-side fix in Claude Code to automatically serialize same-file Edit operations would be more robust.
Full Case Study
I've documented this case in detail: https://github.com/link-assistant/hive-mind/issues/1188
Got the problem since yesterday on each prompt, both on Windows and WSL.
I tried updating to 2.1.20 this morning, still not working, got the error on each prompt.
Confirming that downgrading to 2.1.17 also worked for me.
Closing for now — inactive for too long. Please open a new issue if this is still relevant.
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.