[Bug] Anthropic API Error: Duplicate tool names when using sub-agents
Bug Description
Attempt to use sub agents Claude created leads to 400 api errors:
[ERROR] Error streaming, falling back to non-streaming mode: 400 {"type":"error","error":{"type":"invalid_request_error","message":"tools: Tool names must be unique."},"request_id":"req_011CUeKuQiQCVZgzjLsAf6ji"}
[ERROR] Error streaming, falling back to non-streaming mode: 400 {"type":"error","error":{"type":"invalid_request_error","message":"tools: Tool names must be unique."},"request_id":"req_011CUeKuRYWdmZUZBeKvde1Y"}
[ERROR] Error in non-streaming fallback: 400 {"type":"error","error":{"type":"invalid_request_error","message":"tools: Tool names must be unique."},"request_id":"req_011CUeKuS9UNQb53fNPfRbeM"}
Only 5 of my agents, not sure whats going on. I don't have Cline installed.
Environment Info
- Platform: darwin
- Terminal: cursor
- Version: 2.0.30
- Feedback ID: 3b11a747-a59f-4181-adc5-172575bcef12
Errors
[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"tools: Tool names must be unique.\"},\"request_id\":\"req_011CUeKuS9UNQb53fNPfRbeM\"}\n at M4.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:204:83066)\n at Jk.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:358:2117)\n at Jk.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:358:5330)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async Gd2.geA.model (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3389:14755)\n at async geA (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2741:39781)\n at async Gd2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3389:14909)\n at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3389:8646\n at async _e1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3389:1970)\n at async j8A (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3389:8616)","timestamp":"2025-10-31T00:26:14.465Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"tools: Tool names must be unique.\"},\"request_id\":\"req_011CUeKuSVZNYWQGZaUZcyhZ\"}\n at M4.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:204:83066)\n at Jk.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:358:2117)\n at Jk.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:358:5330)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async Gd2.geA.model (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3389:14755)\n at async geA (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2741:39781)\n at async Gd2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3389:14909)\n at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3389:8646\n at async _e1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3389:1970)\n at async j8A (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3389:8616)","timestamp":"2025-10-31T00:26:14.577Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"tools: Tool names must be unique.\"},\"request_id\":\"req_011CUeKuvLNQmUE2GwusjuYS\"}\n at M4.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:204:83066)\n at Jk.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:358:2117)\n at Jk.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:358:5330)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async Gd2.geA.model (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3389:14755)\n at async geA (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2741:39781)\n at async Gd2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3389:14909)\n at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3389:8646\n at async _e1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3389:1970)\n at async j8A (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:3389:8616)","timestamp":"2025-10-31T00:26:21.062Z"},{"error":"Error: Request was aborted.\n at Jk.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:358:3850)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)"
Note: Error logs were truncated.
This issue has 11 comments on GitHub. Read the full discussion on GitHub ↗