Skip to content

Tool Use Blocks Missing Corresponding Tool Result Blocks #1584

@dimfeld

Description

@dimfeld

Bug Description
I interrupted Claude with the Escape key and got the errors below when I tried another command. This seems like it leads to an unrecoverable session. Here's the latest output that I interrupted and the following errors.

⏺ These are TypeScript configuration issues. Let me check the actual compilation in the service level:
  ⎿  Interrupted by user
  ⎿  Interrupted by user
  ⎿  Interrupted by user

> just run turbo run build like you did before, but from the services/import directory so the dependencies get updated
  ⎿  API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.103: `tool_use` ids were found without `tool_result` blocks immediately after:
     toolu_01K4RN4bGD6ZuQesHdMGqtYZ. Each `tool_use` block must have a corresponding `tool_result` block in the next message."}}

> just run turbo run build like you did before, but from the services/import directory so the dependencies get updated
  ⎿  API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.103: `tool_use` ids were found without `tool_result` blocks immediately after:
     toolu_01K4RN4bGD6ZuQesHdMGqtYZ. Each `tool_use` block must have a corresponding `tool_result` block in the next message."}}

Environment Info

  • Platform: macos
  • Terminal: WezTerm
  • Version: 1.0.11
  • Feedback ID: f1511de2-725f-450b-944e-e78518eb9e98

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 JZ (file:///Users/dimfeld/.pnpm/5/.pnpm/@anthropic-ai+claude-code@1.0.11/node_modules/@anthropic-ai/claude-code/cli.js:683:2402)\n    at file:///Users/dimfeld/.pnpm/5/.pnpm/@anthropic-ai+claude-code@1.0.11/node_modules/@anthropic-ai/claude-code/cli.js:582:11763\n    at Q (file:///Users/dimfeld/.pnpm/5/.pnpm/@anthropic-ai+claude-code@1.0.11/node_modules/@anthropic-ai/claude-code/cli.js:526:17069)\n    at LU (file:///Users/dimfeld/.pnpm/5/.pnpm/@anthropic-ai+claude-code@1.0.11/node_modules/@anthropic-ai/claude-code/cli.js:582:10909)\n    at HG (file:///Users/dimfeld/.pnpm/5/.pnpm/@anthropic-ai+claude-code@1.0.11/node_modules/@anthropic-ai/claude-code/cli.js:582:10355)\n    at lO2 (file:///Users/dimfeld/.pnpm/5/.pnpm/@anthropic-ai+claude-code@1.0.11/node_modules/@anthropic-ai/claude-code/cli.js:2042:4758)","timestamp":"2025-06-04T19:43:11.275Z"},{"error":"ShellError: Shell command failed\n    at Object.call (file:///Users/dimfeld/.pnpm/5/.pnpm/@anthropic-ai+claude-code@1.0.11/node_modules/@anthropic-ai/claude-code/cli.js:1547:1326)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async pZ5 (file:///Users/dimfeld/.pnpm/5/.pnpm/@anthropic-ai+claude-code@1.0.11/node_modules/@anthropic-ai/claude-code/cli.js:1889:19078)\n    at async YK1 (file:///Users/dimfeld/.pnpm/5/.pnpm/@anthropic-ai+claude-code@1.0.11/node_modules/@anthropic-ai/claude-code/cli.js:1889:17664)\n    at async dZ5 (file:///Users/dimfeld/.pnpm/5/.pnpm/@anthropic-ai+claude-code@1.0.11/node_modules/@anthropic-ai/claude-code/cli.js:1889:16706)\n    at async hZ5 (file:///Users/dimfeld/.pnpm/5/.pnpm/@anthropic-ai+claude-code@1.0.11/node_modules/@anthropic-ai/claude-code/cli.js:1889:16356)\n    at async oe (file:///Users/dimfeld/.pnpm/5/.pnpm/@anthropic-ai+claude-code@1.0.11/node_modules/@anthropic-ai/claude-code/cli.js:1889:15392)\n    at async oe (file:///Users/dimfeld/.pnpm/5/.pnpm/@anthropic-ai+claude-code@1.0.11/node_modules/@anthropic-ai/claude-code/cli.js:1889:16218)\n    at async oe (file:///Users/dimfeld/.pnpm/5/.pnpm/@anthropic-ai+claude-code@1.0.11/node_modules/@anthropic-ai/claude-code/cli.js:1889:16218)\n    at async oe (file:///Users/dimfeld/.pnpm/5/.pnpm/@anthropic-ai+claude-code@1.0.11/node_modules/@anthropic-ai/claude-code/cli.js:1889:16218)","timestamp":"2025-06-04T20:00:32.431Z"},{"error":"ShellError: Shell command failed\n    at Object.call (file:///Users/dimfeld/.pnpm/5/.pnpm/@anthropic-ai+claude-code@1.0.11/node_modules/@anthropic-ai/claude-code/cli.js:1547:1326)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async pZ5 (file:///Users/dimfeld/.pnpm/5/.pnpm/@anthropic-ai+claude-code@1.0.11/node_modules/@anthropic-ai/claude-code/cli.js:1889:19078)\n    at async YK1 (file:///Users/dimfeld/.pnpm/5/.pnpm/@anthropic-ai+claude-code@1.0.11/node_modules/@anthropic-ai/claude-code/cli.js:1889:17664)\n    at async dZ5 (file:///Users/dimfeld/.pnpm/5/.pnpm/@anthropic-ai+claude-code@1.0.11/node_modules/@anthropic-ai/claude-code/cli.js:1889:16706)\n    at async hZ5 (file:///Users/dimfeld/.pnpm/5/.pnpm/@anthropic-ai+claude-code@1.0.11/node_modules/@anthropic-ai/claude-code/cli.js:1889:16356)\n    at async oe (file:///Users/dimfeld/.pnpm/5/.pnpm/@anthropic-ai+claude-code@1.0.11/node_modules/@anthropic-ai/claude-code/cli.js:1889:15392)\n    at async oe (file:///Users/dimfeld/.pnpm/5/.pnpm/@anthropic-ai+claude-code@1.0.11/node_modules/@anthropic-ai/claude-code/cli.js:1889:16218)\n    at async oe (file:///Users/dimfeld/.pnpm/5/.pnpm/@anthropic-ai+claude-code@1.0.11/node_modules/@anthropic-ai/claude-code/cli.js:1889:16218)\n    at async oe (file:///Users/dimfeld/.pnpm/5/.pnpm/@anthropic-ai+claude-code@1.0.11/node_modules/@anthropic-ai/claude-code/cli.js:1889:16218)","timestamp":"2025-06-04T20:00:42.770Z"},{"error":"ShellError: Shell command failed\n    at Object.call (file:///Users/dimfeld/.pnpm/5/.pnpm/@anthropic-ai+claude-code@1.0.11/node_modules/@anthropic-ai/claude-code/cli.js:1547:1326)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async pZ5 (file:///Users/dimfeld/.pnpm/5/.pnpm/@anthropic-ai+claude-code

Note: Error logs were truncated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:corebugSomething isn't workinghas reproHas detailed reproduction stepsplatform: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