[Bug] Anthropic API Error: Missing Tool Result Block

Resolved 💬 5 comments Opened Oct 3, 2025 by aktasbatuhan Closed Jan 9, 2026

Bug Description
stucked like this, API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.65:
tool_use ids were found without tool_result blocks immediately after:
toolu_01N6bBZiLd727MFh7AjBZBxA. Each tool_use block must have a corresponding tool_result
block in the next message."},"request_id":"req_011CTjrpVWtvPFaF6bs4jzMU"}

Environment Info

  • Platform: darwin
  • Terminal: vscode
  • Version: 1.0.111
  • Feedback ID: dbc9cec1-f136-4336-9ec8-f1d5c1511766

Errors

[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.65: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01N6bBZiLd727MFh7AjBZBxA. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"},\"request_id\":\"req_011CTjrpVWtvPFaF6bs4jzMU\"}\n    at W4.generate (file:///Users/batuhanaktas/node_modules/@anthropic-ai/claude-code/cli.js:993:2412)\n    at bT.makeStatusError (file:///Users/batuhanaktas/node_modules/@anthropic-ai/claude-code/cli.js:1010:2131)\n    at bT.makeRequest (file:///Users/batuhanaktas/node_modules/@anthropic-ai/claude-code/cli.js:1010:5344)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async IY1.showErrors (file:///Users/batuhanaktas/node_modules/@anthropic-ai/claude-code/cli.js:1909:29385)\n    at async IY1 (file:///Users/batuhanaktas/node_modules/@anthropic-ai/claude-code/cli.js:1909:17996)\n    at async s8B (file:///Users/batuhanaktas/node_modules/@anthropic-ai/claude-code/cli.js:1909:29212)\n    at async file:///Users/batuhanaktas/node_modules/@anthropic-ai/claude-code/cli.js:1909:24063\n    at async m$0 (file:///Users/batuhanaktas/node_modules/@anthropic-ai/claude-code/cli.js:1909:4265)\n    at async a11 (file:///Users/batuhanaktas/node_modules/@anthropic-ai/claude-code/cli.js:1909:24033)","timestamp":"2025-10-03T07:20:09.540Z"}]

View original on GitHub ↗

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