Skip to content

Tool Use Request Missing Corresponding Tool Result Blocks #5928

@WeZZard

Description

@WeZZard

Bug Description
Prompts always return error code 400: tools_use ids were found without tool_result blocks immediately after Xxxxxxx

Environment Info

  • Platform: darwin
  • Terminal: ssh-session
  • Version: 1.0.83
  • Feedback ID: 6808c3d8-7d28-4016-b90e-628b676b4666

Errors

[{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at NX (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1774:1184)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1774:912\n    at Array.map (<anonymous>)\n    at ZW (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1774:903)\n    at fkB (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2358:5231)\n    at SR (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:330:19859)\n    at rb (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:332:42835)\n    at ab (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:332:38356)\n    at wj (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:332:38284)\n    at aR (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:332:38138)","timestamp":"2025-08-16T11:18:24.712Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at NX (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1774:1184)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1774:912\n    at Array.map (<anonymous>)\n    at ZW (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1774:903)\n    at fkB (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2358:5231)\n    at SR (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:330:19859)\n    at rb (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:332:42835)\n    at ab (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:332:38356)\n    at wj (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:332:38284)\n    at aR (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:332:38138)","timestamp":"2025-08-16T11:18:24.723Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at NX (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1774:1184)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1774:912\n    at Array.map (<anonymous>)\n    at ZW (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1774:903)\n    at fkB (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2358:5231)\n    at SR (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:330:19859)\n    at rb (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:332:42835)\n    at ab (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:332:38356)\n    at wj (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:332:38284)\n    at aR (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:332:38138)","timestamp":"2025-08-16T11:18:24.724Z"},{"error":"Error: Language not supported while highlighting code, falling back to markdown: \n    at NX (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1774:1184)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1774:912\n    at Array.map (<anonymous>)\n    at ZW (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1774:903)\n    at fkB (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2358:5231)\n    at SR (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:330:19859)\n    at rb (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:332:42835)\n    at ab (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:332:38356)\n    at wj (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:332:38284)\n    at aR (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:332:38138)","timestamp":"2025-08-16T11:18:24.727Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.111: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01VMttWDJu2L9onCw1ddoLQJ. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"}}\n    at D6.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:942:2414)\n    at sP.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:959:2101)\n    at sP.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/c

Note: Error logs were truncated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:apiarea:corebugSomething 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