Skip to content

Missing Tool Result Block for Tool Use ID toolu_01A8wrpnrzpDf5x2vcAVc5VX #2903

@jwaes

Description

@jwaes

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

Environment Info

  • Platform: linux
  • Terminal: vscode
  • Version: 1.0.40
  • Feedback ID: fc2132bc-daeb-4ef3-88d2-edfd4ff75e34

Errors

[{"error":"RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stdout maxBuffer length exceeded\n    at __node_internal_captureLargerStackTrace (node:internal/errors:496:5)\n    at new NodeError (node:internal/errors:405:5)\n    at Socket.onChildStdout (node:child_process:490:14)\n    at Socket.emit (node:events:517:28)\n    at Socket.emit (node:domain:489:12)\n    at addChunk (node:internal/streams/readable:368:12)\n    at readableAddChunk (node:internal/streams/readable:337:11)\n    at Readable.push (node:internal/streams/readable:278:10)\n    at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)","timestamp":"2025-07-03T06:19:09.375Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.37: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01A8wrpnrzpDf5x2vcAVc5VX. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"}}\n    at J5.generate (file:///home/jaco/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1315:12578)\n    at Tq.makeStatusError (file:///home/jaco/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1332:2100)\n    at Tq.makeRequest (file:///home/jaco/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1332:5311)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async WM2.zA1.showErrors (file:///home/jaco/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1701:23051)\n    at async zA1 (file:///home/jaco/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1701:12633)\n    at async WM2 (file:///home/jaco/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1701:22899)\n    at async file:///home/jaco/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1701:18023\n    at async EAA (file:///home/jaco/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1701:5121)\n    at async su (file:///home/jaco/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1701:17993)","timestamp":"2025-07-03T06:24:58.856Z"}]

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:apiarea:corebugSomething isn't workingduplicateThis issue or pull request already existshas reproHas detailed reproduction stepsplatform:linuxIssue specifically occurs on Linux

    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