Skip to content

Missing Tool Result Block for Tool Use ID toolu_01BFX9m1YmC5UoetsCDqPfQu #3902

@yunqiqiliang

Description

@yunqiqiliang

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

Environment Info

  • Platform: darwin
  • Terminal: vscode
  • Version: 1.0.55
  • Feedback ID: 9b27337a-e318-469f-a9b4-3b69de8cdad2

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: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 q5 (file:///Users/liangmo/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:727:4693)\n    at file:///Users/liangmo/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:640:41282\n    at Q (file:///Users/liangmo/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:542:14406)\n    at PF (file:///Users/liangmo/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:640:39067)\n    at $X (file:///Users/liangmo/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:640:37933)\n    at RB (file:///Users/liangmo/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:640:43902)","timestamp":"2025-07-18T05:43:11.665Z"},{"error":"Error: Command failed: security delete-generic-password -a $USER -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 q5 (file:///Users/liangmo/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:727:4693)\n    at NY0 (file:///Users/liangmo/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:640:42394)\n    at wY0 (file:///Users/liangmo/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:640:42268)\n    at N3A (file:///Users/liangmo/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1763:2567)\n    at bB1.startOAuthFlow (file:///Users/liangmo/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1763:3733)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-07-18T05:43:24.357Z"},{"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 q5 (file:///Users/liangmo/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:727:4693)\n    at file:///Users/liangmo/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:640:41282\n    at Q (file:///Users/liangmo/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:542:14406)\n    at PF (file:///Users/liangmo/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:640:39067)\n    at $X (file:///Users/liangmo/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:640:37933)\n    at RB (file:///Users/liangmo/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:640:43902)","timestamp":"2025-07-18T05:43:24.483Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.109: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01BFX9m1YmC5UoetsCDqPfQu. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"}}\n    at B6.generate (file:///Users/liangmo/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1179:6425)\n    at p$.makeStatusError (file:///Users/liangmo/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1196:2101)\n    at p$.makeRequest (file:///Users/liangmo/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:1196:5315)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async P9B.F91.showErrors (file:///Users/liangmo/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:2598:14125)\n    at async F91 (file:///Users/liangmo/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:2140:1696)\n    at async P9B (file:///Users/liangmo/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:2598:13976)\n    at async file:///Users/liangmo/.npm-global/lib/node_modules/@anthropic-ai/claude-code/cli.js:2598:9065\n    at async hIA (file:///Users/liangmo/.npm-global/lib/node_modules/@anthropic-ai/claude-code/c

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