[Bug] Anthropic API Error: Missing Tool Result Block

Resolved 💬 3 comments Opened Oct 2, 2025 by kchalmershappymoney Closed Oct 6, 2025

Bug Description
All of my other sessions of Claude Code have worked fine, but this failed randomly with this error.

API Error: 400 {"type":"error","error":{"type":"invali
d_request_error","message":"messages.89: tool_use
ids were found without tool_result blocks
immediately after: toolu_01LzAZRHGLKsPQ3TUqZHr1fg.
Each tool_use block must have a corresponding
tool_result block in the next message."},"request_id
":"req_011CTj1QbwUzszWRAkKzACCq"}

Environment Info

  • Platform: darwin
  • Terminal: windsurf
  • Version: 2.0.5
  • Feedback ID:

Errors

[{"error":"AxiosError: Request failed with status code 403\n    at fN (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:715:1077)\n    at Unzip.z0 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:716:9955)\n    at Unzip.emit (node:events:520:35)\n    at Unzip.emit (node:domain:489:12)\n    at endReadableNT (node:internal/streams/readable:1701:12)\n    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)\n    at vQ1.request (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:718:2088)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async YWA (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:891:25807)","timestamp":"2025-10-02T20:13:45.308Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.89: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01LzAZRHGLKsPQ3TUqZHr1fg. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"},\"request_id\":\"req_011CTiz2Nh2gF3HHb2hfoRpb\"}\n    at B4.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:895:18688)\n    at yP.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1034:2131)\n    at yP.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1034:5344)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async E2B.dG1.model (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1120:39804)\n    at async dG1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1120:27733)\n    at async E2B (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1120:39958)\n    at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1120:34180\n    at async ZH0 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1120:9568)\n    at async r11 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1120:34150)","timestamp":"2025-10-02T20:14:03.009Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.89: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01LzAZRHGLKsPQ3TUqZHr1fg. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"},\"request_id\":\"req_011CTiz3J3Fwr1zKXF6EbH1s\"}\n    at B4.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:895:18688)\n    at yP.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1034:2131)\n    at yP.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1034:5344)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async E2B.dG1.model (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1120:39804)\n    at async dG1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1120:27733)\n    at async E2B (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1120:39958)\n    at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1120:34180\n    at async ZH0 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1120:9568)\n    at async r11 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1120:34150)","timestamp":"2025-10-02T20:14:15.313Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.89: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01LzAZRHGLKsPQ3TUqZHr1fg. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"},\"request_id\":\"req_011CTj1QbwUzszWRAkKzACCq\"}\n    at B4.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:895:18688)\n    at yP.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1034:2131)\n    at yP.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1034:5344)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async

Note: Error logs were truncated.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗