Skip to content

Missing Tool Result Block for Tool Use ID #4283

@billcache

Description

@billcache

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

Environment Info

  • Platform: darwin
  • Terminal: vscode
  • Version: 1.0.58
  • Feedback ID: 6fc86301-42bc-484a-9dc3-8e66f5c12aaa

Errors

[{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"Your credit balance is too low to access the Anthropic API. Please go to Plans & Billing to upgrade or purchase credits.\"}}\n    at S4.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1296:6428)\n    at HO.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1313:2101)\n    at HO.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1313:5315)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async FPB.A71.maxRetries (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2724:7133)\n    at async A71 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2257:2500)\n    at async FPB (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2724:7002)\n    at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2760:2473","timestamp":"2025-07-23T10:21:33.344Z"},{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n    at genericNodeError (node:internal/errors:984:15)\n    at wrappedFn (node:internal/errors:538:14)\n    at checkExecSyncError (node:child_process:891:11)\n    at execSync (node:child_process:963:15)\n    at F7 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:844:5958)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:756:48658\n    at Q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:653:14408)\n    at LW (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:756:46369)\n    at eK (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:756:45236)\n    at dB (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:756:51284)","timestamp":"2025-07-23T10:21:58.201Z"},{"error":"Error: String not found in file. Failed to apply edit.\n    at gk (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1766:728)\n    at CH0 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1766:104)\n    at Object.renderToolUseRejectedMessage (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2276:1662)\n    at kNB (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2382:1256)\n    at tN (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:65:19804)\n    at h_ (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:42569)\n    at b_ (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:38118)\n    at kT (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:38046)\n    at EL (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:37900)\n    at AV (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:67:34990)","timestamp":"2025-07-23T12:49:43.382Z"},{"error":"Error: 429 {\"type\":\"error\",\"error\":{\"type\":\"rate_limit_error\",\"message\":\"This request would exceed your account's rate limit. Please try again later.\"}}\n    at S4.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1296:6638)\n    at HO.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1313:2101)\n    at HO.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1313:5315)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async YPB.A71.showErrors (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2724:14297)\n    at async A71 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2257:2500)\n    at async YPB (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2724:14148)\n    at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2724:9205\n    at async eU0 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2724:1626)\n    at async wo (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2724:9175)","timestamp":"2025-07-23T13:07:14.015Z"},{"error":"Error: 400 {\"type\":\"er

Note: Error logs were truncated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    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