Skip to content

Missing Tool Result Block for Tool Use IDs #5989

@eltonf

Description

@eltonf

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

Environment Info

  • Platform: darwin
  • Terminal: vscode
  • Version: 1.0.83
  • Feedback ID: eb637f7f-bb89-4a7a-9dbe-6784beb086ed

Errors

[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.22: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01HqfLWiAKQLsniF2fBGF2KD, toolu_01SJzDkeAZER935cpGFptTNk. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"}}\n    at D6.generate (file:///Users/elton/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:942:2414)\n    at sP.makeStatusError (file:///Users/elton/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:959:2101)\n    at sP.makeRequest (file:///Users/elton/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:959:5315)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async KSB.sG1.showErrors (file:///Users/elton/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1875:24578)\n    at async sG1 (file:///Users/elton/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1875:13705)\n    at async KSB (file:///Users/elton/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1875:24429)\n    at async file:///Users/elton/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1875:19524\n    at async cN0 (file:///Users/elton/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1875:5164)\n    at async V01 (file:///Users/elton/.nvm/versions/node/v22.17.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1875:19494)","timestamp":"2025-08-17T21:52:48.063Z"}]

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