API Error 400 "tool use concurrency issues" in large projects (400+ files)
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?
Problem
Frequent "API Error: 400 due to tool use concurrency issues" in VSCode extension when working with large projects.
Environment
- Claude Code VSCode Extension
- macOS
- Project with 424 HTML files
Reproduction
- Open project with 400+ files
- Use any tool (Grep, Bash, Read, etc.)
- Error appears randomly, even with single tool calls
Comparison
- Same setup in smaller projects (<100 files): No errors
- Same project, same tools: Errors occur
Suspected cause
Extension collects context (git status, file changes) for all files, causing parallel API load that exceeds concurrency limits.
What Should Happen?
Tool calls should work reliably regardless of project size.
A project with 400+ files should not cause API concurrency errors
when the user is only making single tool calls.
Expected: Single tool calls complete without "API Error 400
due to tool use concurrency issues"
The extension should queue or throttle internal context collection
(git status, file watchers, etc.) to avoid exceeding API concurrency limits.
Error Messages/Logs
API Error: 400 due to tool use concurrency issues.
Steps to Reproduce
- Open VSCode with Claude Code extension (v2.1.19)
- Open a project folder containing 400+ HTML files
- Start a Claude conversation
- Make a single tool call (e.g., Grep, Read, or Bash)
- Error appears: "API Error: 400 due to tool use concurrency issues"
- Retry same action → sometimes works, sometimes fails again
Note: Same actions in smaller projects (<100 files) work without errors.
Claude Model
None
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
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 10 comments on GitHub. Read the full discussion on GitHub ↗