Skip to content

Missing Tool Result Block for Tool Use ID #5375

@rodanaya

Description

@rodanaya

Bug Description
I am getting API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.33: tool_use ids
were found without tool_result blocks immediately after: toolu_01WQfwh7MJKmV9YfsFiJ4zxx. Each tool_use
block must have a corresponding tool_result block in the next message."}}

Environment Info

  • Platform: win32
  • Terminal: null
  • Version: 1.0.71
  • Feedback ID: f7cf63a0-1260-42f8-ad8e-94fa43d967d6

Errors

[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.33: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01WQfwh7MJKmV9YfsFiJ4zxx. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"}}\n    at A6.generate (file:///C:/Users/ranay/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1021:2303)\n    at gP.makeStatusError (file:///C:/Users/ranay/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1038:2101)\n    at gP.makeRequest (file:///C:/Users/ranay/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1038:5315)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async LRB.rZ1.showErrors (file:///C:/Users/ranay/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1743:24326)\n    at async rZ1 (file:///C:/Users/ranay/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1743:13393)\n    at async LRB (file:///C:/Users/ranay/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1743:24177)\n    at async file:///C:/Users/ranay/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1743:19164\n    at async Iq0 (file:///C:/Users/ranay/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1743:5200)\n    at async S11 (file:///C:/Users/ranay/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:1743:19134)","timestamp":"2025-08-08T06:13:32.816Z"}]

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:apiarea:corebugSomething isn't workingduplicateThis issue or pull request already existsplatform:windowsIssue specifically occurs on Windows

    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