Skip to content

Issue Title: Tool Use Validation Failure: Missing Corresponding Tool Result Blocks This title: - Identifies the specific technical error - Uses precise terminology ("Tool Use Validation") - Highlights the core problem of missing tool result blocks - Is co #1174

@fcoury

Description

@fcoury

Bug Description
Thinking commands are no longer working -

We have a problem as per this image where the content of some of the columns are too wide and overflow. Can you think about common best UX/UI practices to
solve this issue?

[Image #1]
⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.21: tool_use ids were found without tool_result blocks
immediately after: toolu_01KnbzchoTGf1wMBBsA5z9PZ. Each tool_use block must have a corresponding tool_result block in the next message."}}

Environment Info

  • Platform: macos
  • Terminal: WezTerm
  • Version: 0.2.122
  • Feedback ID: 3d99c12d-48a4-4238-91d1-e75c2fa13c3f

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 rB (file:///Users/fcoury/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:603:3513)\n    at file:///Users/fcoury/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:533:14558\n    at D (file:///Users/fcoury/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:491:12878)\n    at a$1 (file:///Users/fcoury/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:533:13806)\n    at GB (file:///Users/fcoury/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:533:13423)\n    at q36 (file:///Users/fcoury/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2037:21268)","timestamp":"2025-05-19T18:47:05.443Z"},{"error":"Error: No logs found at /Users/fcoury/Library/Caches/claude-cli-nodejs/-Users-fcoury-code-paypol/messages\n    at zK4 (file:///Users/fcoury/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:526:3858)\n    at D01 (file:///Users/fcoury/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:526:3607)\n    at vA1 (file:///Users/fcoury/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:526:3787)\n    at Ec1.<anonymous> (file:///Users/fcoury/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2245:574)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async Ec1.parseAsync (file:///Users/fcoury/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:482:4184)\n    at async XE5 (file:///Users/fcoury/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2248:4632)\n    at async WE5 (file:///Users/fcoury/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2244:14978)","timestamp":"2025-05-19T18:47:06.551Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.21: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01KnbzchoTGf1wMBBsA5z9PZ. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"}}\n    at f5.generate (file:///Users/fcoury/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:669:4452)\n    at s8.makeStatusError (file:///Users/fcoury/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:673:7240)\n    at s8.makeRequest (file:///Users/fcoury/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:673:8185)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-05-19T18:47:09.634Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.21: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01KnbzchoTGf1wMBBsA5z9PZ. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"}}\n    at f5.generate (file:///Users/fcoury/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:669:4452)\n    at s8.makeStatusError (file:///Users/fcoury/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:673:7240)\n    at s8.makeRequest (file:///Users/fcoury/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:673:8185)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async Rt2.Ja.showErrors (file:///Users/fcoury/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1536:16534)\n    at async Ja (file:///Users/fcoury/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1536:9981)\n    at async Rt2 (file:///Users/fcoury/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1536:16410)\n    at async Pd1 (file:///Users/fcoury/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1536:42

Note: Error logs were truncated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:apibugSomething isn't workingduplicateThis issue or pull request already existsplatform: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