Skip to content

Bug Report #4134

@maior

Description

@maior

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

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 1.0.57
  • Feedback ID: 4fd97131-444b-4fd0-bc5a-c9feca6861c1

Errors

[{"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:983:15)\n    at wrappedFn (node:internal/errors:537:14)\n    at checkExecSyncError (node:child_process:882:11)\n    at execSync (node:child_process:954:15)\n    at D7 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:841:5854)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:753:48942\n    at Q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:653:14408)\n    at $W (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:753:46653)\n    at rK (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:753:45519)\n    at dB (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:753:51568)","timestamp":"2025-07-22T12:56:35.129Z"},{"error":"Error: ENOENT: no such file or directory, open '/proc/version'\n    at Module.readFileSync (node:fs:448:20)\n    at Object.readFileSync (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:659:7096)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:659:8658\n    at Q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:653:14408)\n    at __4 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:753:63371)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-07-22T12:56:35.560Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.52: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_017QzbreAA7dWMH2wi8Dy2kH. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"}}\n    at M4.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1293:6428)\n    at CO.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1310:2101)\n    at CO.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1310:5315)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async HTB.h31.showErrors (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2718:14157)\n    at async h31 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2255:2035)\n    at async HTB (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2718:14008)\n    at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2718:9065\n    at async NU0 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2718:1626)\n    at async Zo (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2718:9035)","timestamp":"2025-07-22T12:56:42.592Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.0: all messages must have non-empty content except for the optional final assistant message\"}}\n    at M4.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1293:6428)\n    at CO.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1310:2101)\n    at CO.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1310:5315)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-07-22T12:57:37.598Z"}]

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