[BUG] Claude CLI 2.1.19 - Duplicate tool_use IDs with multiple --allowedTools
Resolved 💬 2 comments Opened Jan 26, 2026 by matthew-bram Closed Jan 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?
Claude CLI version 2.1.19 generates duplicate tool_use IDs when invoking tools with 2 or more tools specified via --allowedTools, causing API 400 errors.
What Should Happen?
Commands with multiple --allowedTools should work correctly, as they did in version 2.1.7. Tool invocations should generate unique tool_use IDs regardless of how many tools are allowed.
Error Messages/Logs
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.1.content.1: `tool_use` ids must be unique"},"request_id":"req_011CXV6AipVaVof7PcDqLbFC"}
Steps to Reproduce
- Install Claude CLI 2.1.19 via Homebrew (
brew upgrade claude)
- Run a command with a single allowed tool (works):
```bash
claude --model sonnet --allowedTools "Bash" -p "Run: echo hello" --print
Output: hello (success)
- Run a command with two allowed tools (fails):
claude --model sonnet --allowedTools "Bash,Read" -p "List files using Bash" --print
- Output: API Error: 400 due to tool use concurrency issues.
- The error only occurs when:
- 2+ tools are specified via --allowedTools, AND
- A tool is actually invoked (prompts not requiring tool use succeed)
Claude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.7
Claude Code Version
2.1.19
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗