Skip to content

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

@ickma2311

Description

@ickma2311

Bug Description

I encountered an API error while using Claude Code that prevents the tool from functioning properly.
API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.130: tool_use ids were found without tool_result blocks immediately after: toolu_01MCWvUZWP7Ty9EsfDhsV2UY. Each tool_use block must have a corresponding tool_result block in the next message."},"request_id":"req_011CSTnAoAVBSahd26ad84Vv"}

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 1.0.90
  • Feedback ID: c670f88b-fda8-4cdd-b9db-d511cfa1aed6

Errors

[{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at FV (file:///opt/homebrew/Cellar/node/24.2.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1755:1184)\n    at file:///opt/homebrew/Cellar/node/24.2.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1755:912\n    at Array.map (<anonymous>)\n    at tJ (file:///opt/homebrew/Cellar/node/24.2.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1755:903)\n    at zhB (file:///opt/homebrew/Cellar/node/24.2.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:3063:9171)\n    at ED (file:///opt/homebrew/Cellar/node/24.2.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:330:19415)\n    at Gc (file:///opt/homebrew/Cellar/node/24.2.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:332:42814)\n    at A9 (file:///opt/homebrew/Cellar/node/24.2.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:332:38355)\n    at jb (file:///opt/homebrew/Cellar/node/24.2.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:332:38283)\n    at SD (file:///opt/homebrew/Cellar/node/24.2.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:332:38137)","timestamp":"2025-08-25T04:14:29.289Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at FV (file:///opt/homebrew/Cellar/node/24.2.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1755:1184)\n    at file:///opt/homebrew/Cellar/node/24.2.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1755:912\n    at Array.map (<anonymous>)\n    at tJ (file:///opt/homebrew/Cellar/node/24.2.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1755:903)\n    at zhB (file:///opt/homebrew/Cellar/node/24.2.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:3063:9171)\n    at ED (file:///opt/homebrew/Cellar/node/24.2.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:330:19415)\n    at Gc (file:///opt/homebrew/Cellar/node/24.2.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:332:42814)\n    at A9 (file:///opt/homebrew/Cellar/node/24.2.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:332:38355)\n    at jb (file:///opt/homebrew/Cellar/node/24.2.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:332:38283)\n    at SD (file:///opt/homebrew/Cellar/node/24.2.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:332:38137)","timestamp":"2025-08-25T04:14:29.293Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at FV (file:///opt/homebrew/Cellar/node/24.2.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1755:1184)\n    at file:///opt/homebrew/Cellar/node/24.2.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1755:912\n    at Array.map (<anonymous>)\n    at tJ (file:///opt/homebrew/Cellar/node/24.2.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1755:903)\n    at zhB (file:///opt/homebrew/Cellar/node/24.2.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:3063:9171)\n    at ED (file:///opt/homebrew/Cellar/node/24.2.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:330:19415)\n    at Gc (file:///opt/homebrew/Cellar/node/24.2.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:332:42814)\n    at A9 (file:///opt/homebrew/Cellar/node/24.2.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:332:38355)\n    at jb (file:///opt/homebrew/Cellar/node/24.2.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:332:38283)\n    at SD (file:///opt/homebrew/Cellar/node/24.2.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:332:38137)","timestamp":"2025-08-25T04:14:29.295Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at FV (file:///opt/homebrew/Cellar/node/24.2.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1755:1184)\n    at file:///opt/homebrew/Cellar/node/24.2.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1755:912\n    at Array.map (<anonymous>)\n    at tJ (file:///opt/homebrew/Cellar/node/24.2.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1755:903)\n    at zhB (file:///opt/homebrew/Cellar/node/24.2.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:3063:9171)\n    at ED (file:///opt/homebrew/Cellar/node/24.2.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:330:19415)\n    at Gc (file:///opt/homebrew/Cellar/node/24.2.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:332:42814)\n    at A9 (file:///opt/homebre

Note: Error logs were truncated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:apiarea:toolsbugSomething isn't workingduplicateThis issue or pull request already existsplatform:macosIssue specifically occurs on macOS

    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