Skip to content

Missing Tool Result Block for Tool Use ID toolu_01NX4cDJoa6Pv3PiMxrgrgKH #4454

@gklps

Description

@gklps

Bug Report

Bug Description

API Error: 400 Bad Request

{
  "type": "error",
  "error": {
    "type": "invalid_request_error",
    "message": "messages.2: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01NX4cDJoa6Pv3PiMxrgrgKH. Each `tool_use` block must have a corresponding `tool_result` block in the next message."
  }
}

Environment Info

Platform: macOS (darwin)

Terminal: iTerm.app

Version: 1.0.59

Feedback ID: 08fb3c9a-4031-4c13-9316-2c9cced75b7e

Errors

Multiple occurrences of the following error:

Error: Language not supported while highlighting code, falling back to markdown.

Stack trace example (repeated):
at hJ (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1491:1184) at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1491:2172 at Array.map (<anonymous>) ...
Logs are truncated to avoid redundancy.
Note

The tool_use/tool_result contract appears to be broken.

Syntax highlighting is also failing due to unsupported languages.

Unsure whether this is due to user error or an issue with the tool/SDK.

Metadata

Metadata

Assignees

No one assigned

    Labels

    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