[Bug] Anthropic API Error: Invalid tool_result without corresponding tool_use block

Resolved 💬 3 comments Opened Dec 19, 2025 by architguptaPI Closed Dec 23, 2025

Bug Description
after using the plan generated using plan mode in a conversation for implementation, Claude has started throwing a tool_user error on every user message. I am not using any sub-agent. It stopped generating code or doing any sort of analysis when it reached in its to-do list an action item where it was supposed to wait for my input. On responding, Claude went into flurry and started giving the same error on every message. The error: ``API Error: 400
{"type":"error","error":{"type":"invalid_request_error","message":"messages.0.content.0:
unexpected
tool_use_id found in tool_result blocks: toolu_01WWVNTVaxeTr8FLcS7V2j6y.
Each
tool_result block must have a corresponding tool_use block in the previous
message."},"request_id":"req_011CWFnpFBHEDCwkA6MKhTgS"}
``

Environment Info

  • Platform: darwin
  • Terminal: pycharm
  • Version: 2.0.73
  • Feedback ID: 5f2d3f2e-f1bb-4b00-88c0-2e0904e5778c

Errors

[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.0.content.0: unexpected `tool_use_id` found in `tool_result` blocks: toolu_01WWVNTVaxeTr8FLcS7V2j6y. Each `tool_result` block must have a corresponding `tool_use` block in the previous message.\"},\"request_id\":\"req_011CWFnf3wr4zo14hWimKDQM\"}\n    at I9.generate (file:///Users/archit/.nvm/versions/node/v24.0.2/lib/node_modules/@anthropic-ai/claude-code/cli.js:499:11051)\n    at gT.makeStatusError (file:///Users/archit/.nvm/versions/node/v24.0.2/lib/node_modules/@anthropic-ai/claude-code/cli.js:846:2195)\n    at gT.makeRequest (file:///Users/archit/.nvm/versions/node/v24.0.2/lib/node_modules/@anthropic-ai/claude-code/cli.js:846:5420)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async PV9.qG1.model (file:///Users/archit/.nvm/versions/node/v24.0.2/lib/node_modules/@anthropic-ai/claude-code/cli.js:4676:6345)\n    at async qG1 (file:///Users/archit/.nvm/versions/node/v24.0.2/lib/node_modules/@anthropic-ai/claude-code/cli.js:1335:19526)\n    at async PV9 (file:///Users/archit/.nvm/versions/node/v24.0.2/lib/node_modules/@anthropic-ai/claude-code/cli.js:4676:6499)\n    at async file:///Users/archit/.nvm/versions/node/v24.0.2/lib/node_modules/@anthropic-ai/claude-code/cli.js:4674:3799\n    at async iQ0 (file:///Users/archit/.nvm/versions/node/v24.0.2/lib/node_modules/@anthropic-ai/claude-code/cli.js:996:2037)\n    at async THA (file:///Users/archit/.nvm/versions/node/v24.0.2/lib/node_modules/@anthropic-ai/claude-code/cli.js:4674:3769)","timestamp":"2025-12-19T09:12:19.041Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.0.content.0: unexpected `tool_use_id` found in `tool_result` blocks: toolu_01WWVNTVaxeTr8FLcS7V2j6y. Each `tool_result` block must have a corresponding `tool_use` block in the previous message.\"},\"request_id\":\"req_011CWFnpFBHEDCwkA6MKhTgS\"}\n    at I9.generate (file:///Users/archit/.nvm/versions/node/v24.0.2/lib/node_modules/@anthropic-ai/claude-code/cli.js:499:11051)\n    at gT.makeStatusError (file:///Users/archit/.nvm/versions/node/v24.0.2/lib/node_modules/@anthropic-ai/claude-code/cli.js:846:2195)\n    at gT.makeRequest (file:///Users/archit/.nvm/versions/node/v24.0.2/lib/node_modules/@anthropic-ai/claude-code/cli.js:846:5420)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async PV9.qG1.model (file:///Users/archit/.nvm/versions/node/v24.0.2/lib/node_modules/@anthropic-ai/claude-code/cli.js:4676:6345)\n    at async qG1 (file:///Users/archit/.nvm/versions/node/v24.0.2/lib/node_modules/@anthropic-ai/claude-code/cli.js:1335:19526)\n    at async PV9 (file:///Users/archit/.nvm/versions/node/v24.0.2/lib/node_modules/@anthropic-ai/claude-code/cli.js:4676:6499)\n    at async file:///Users/archit/.nvm/versions/node/v24.0.2/lib/node_modules/@anthropic-ai/claude-code/cli.js:4674:3799\n    at async iQ0 (file:///Users/archit/.nvm/versions/node/v24.0.2/lib/node_modules/@anthropic-ai/claude-code/cli.js:996:2037)\n    at async THA (file:///Users/archit/.nvm/versions/node/v24.0.2/lib/node_modules/@anthropic-ai/claude-code/cli.js:4674:3769)","timestamp":"2025-12-19T09:14:23.740Z"}]

View original on GitHub ↗

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