claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[Bug] Anthropic API Error: Tool Use Concurrency Failure

Open BeamNawapat opened this issue 4 months ago • 4 comments

Bug Description ⎿ API Error: 400 due to tool use concurrency issues. Run /rewind to recover the conversation.

Environment Info

  • Platform: darwin
  • Terminal: vscode
  • Version: 2.0.14
  • Feedback ID:

Errors

[{"error":"AxiosError: Request failed with status code 403\n    at iM (file:///Users/beamnawapat/.nvm/versions/node/v22.14.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:24:1136)\n    at Unzip.<anonymous> (file:///Users/beamnawapat/.nvm/versions/node/v22.14.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:29:9845)\n    at Unzip.emit (node:events:530:35)\n    at Unzip.emit (node:domain:489:12)\n    at endReadableNT (node:internal/streams/readable:1698:12)\n    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)\n    at A81.request (file:///Users/beamnawapat/.nvm/versions/node/v22.14.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:31:2129)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async rLA (file:///Users/beamnawapat/.nvm/versions/node/v22.14.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:280:34283)","timestamp":"2025-10-11T08:59:27.305Z"},{"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_015WwAGWnrurTaFoMyiEyVnq, toolu_01NWL26LWJKWwoG9F2sfZfDy. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"},\"request_id\":\"req_011CU18sukfx9FCEnz3RJudy\"}\n    at N4.generate (file:///Users/beamnawapat/.nvm/versions/node/v22.14.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:428:21403)\n    at tS.makeStatusError (file:///Users/beamnawapat/.nvm/versions/node/v22.14.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:573:2117)\n    at tS.makeRequest (file:///Users/beamnawapat/.nvm/versions/node/v22.14.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:573:5330)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async KwQ.yD1.model (file:///Users/beamnawapat/.nvm/versions/node/v22.14.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:3209:19050)\n    at async yD1 (file:///Users/beamnawapat/.nvm/versions/node/v22.14.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2492:39781)\n    at async KwQ (file:///Users/beamnawapat/.nvm/versions/node/v22.14.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:3209:19204)\n    at async file:///Users/beamnawapat/.nvm/versions/node/v22.14.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:3209:13417\n    at async sl0 (file:///Users/beamnawapat/.nvm/versions/node/v22.14.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:3209:4415)\n    at async wB1 (file:///Users/beamnawapat/.nvm/versions/node/v22.14.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:3209:13387)","timestamp":"2025-10-11T08:59:39.813Z"},{"error":"AxiosError: Request failed with status code 403\n    at iM (file:///Users/beamnawapat/.nvm/versions/node/v22.14.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:24:1136)\n    at Unzip.<anonymous> (file:///Users/beamnawapat/.nvm/versions/node/v22.14.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:29:9845)\n    at Unzip.emit (node:events:530:35)\n    at Unzip.emit (node:domain:489:12)\n    at endReadableNT (node:internal/streams/readable:1698:12)\n    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)\n    at A81.request (file:///Users/beamnawapat/.nvm/versions/node/v22.14.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:31:2129)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async uy6 (file:///Users/beamnawapat/.nvm/versions/node/v22.14.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1148:470)\n    at async Promise.all (index 0)\n    at async file:///Users/beamnawapat/.nvm/versions/node/v22.14.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1134:12743","timestamp":"2025-10-11T09:01:56.536Z"}]

BeamNawapat avatar Oct 11 '25 09:10 BeamNawapat

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/9309
  2. https://github.com/anthropics/claude-code/issues/9103
  3. https://github.com/anthropics/claude-code/issues/9233

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

github-actions[bot] avatar Oct 11 '25 09:10 github-actions[bot]

Temporatory fix: https://github.com/anthropics/claude-code/issues/8763#issuecomment-3391509893

BeamNawapat avatar Oct 11 '25 09:10 BeamNawapat

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.

github-actions[bot] avatar Dec 07 '25 10:12 github-actions[bot]

This is still very much a real problem with remote sessions. The workaround is fine but it really does need to be addressed. Please do not automatically close this issue.

harrisonpage avatar Dec 26 '25 17:12 harrisonpage