Skip to content

[Bug] Anthropic API Error: Missing Tool Result Block #6410

@LGTrader

Description

@LGTrader

Bug Description
The last couple of threads have resulted in this sort of error message:
\

Great. Thanks. Another thought I had overnight, stemming
from my old days as a Design Engineering Manager, is the
possiblility of you and I doing actual design reviews.
Possibly cover different sections of the code maybe once a
week. I've been testing the changes you have made for me and
so far, as far as I can tell, they all work great. However
I don't personally read code very well so tackling smaller
pieces that are most stable would be good for my eduction
and would help me stay on top of what we're doing
⎿ API Error: 400 {"type":"error","error":{"type":"invalid_re
quest_error","message":"messages.16: tool_use ids were
found without tool_result blocks immediately after:
toolu_01XRDm8h2b9Gn2gmCHguj8f2. Each tool_use block must
have a corresponding tool_result block in the next
message."},"request_id":"req_011CSR1gqK4HuqVz9cweXQQx"}

Environment Info

  • Platform: linux
  • Terminal: vscode
  • Version: 1.0.89
  • Feedback ID: ce04ff66-194c-4019-a664-68feaec10205

Errors

[{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at FV (file:///home/mark/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1755:1184)\n    at file:///home/mark/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1755:912\n    at Array.map (<anonymous>)\n    at tJ (file:///home/mark/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1755:903)\n    at zhB (file:///home/mark/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:3063:9171)\n    at ED (file:///home/mark/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:330:19415)\n    at Gc (file:///home/mark/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:332:42814)\n    at A9 (file:///home/mark/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:332:38355)\n    at jb (file:///home/mark/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:332:38283)\n    at SD (file:///home/mark/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:332:38137)","timestamp":"2025-08-23T17:00:51.810Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.16: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01XRDm8h2b9Gn2gmCHguj8f2. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"},\"request_id\":\"req_011CSR1RvGncdwjxT1BrREsz\"}\n    at b4.generate (file:///home/mark/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:926:2412)\n    at HP.makeStatusError (file:///home/mark/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:943:2101)\n    at HP.makeRequest (file:///home/mark/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:943:5314)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async NZ1.showErrors (file:///home/mark/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1898:27491)\n    at async NZ1 (file:///home/mark/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1898:16486)\n    at async qBB (file:///home/mark/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1898:27321)\n    at async file:///home/mark/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1898:22275\n    at async XD0 (file:///home/mark/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1898:3656)\n    at async $e (file:///home/mark/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1898:22245)","timestamp":"2025-08-23T17:07:21.237Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.16: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01XRDm8h2b9Gn2gmCHguj8f2. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"},\"request_id\":\"req_011CSR1gqK4HuqVz9cweXQQx\"}\n    at b4.generate (file:///home/mark/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:926:2412)\n    at HP.makeStatusError (file:///home/mark/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:943:2101)\n    at HP.makeRequest (file:///home/mark/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:943:5314)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async NZ1.showErrors (file:///home/mark/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1898:27491)\n    at async NZ1 (file:///home/mark/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1898:16486)\n    at async qBB (file:///home/mark/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1898:27321)\n    at async file:///home/mark/.npm-global/lib/node_mo

Note: Error logs were truncated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:apibugSomething isn't workinghas reproHas detailed reproduction stepsplatform:linuxIssue specifically occurs on Linux

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions