Skip to content

Missing Tool Result Block for Tool Use ID #3101

@vivek-agilimed

Description

@vivek-agilimed

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

what happened
⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.85: tool_use ids were found without tool_result blocks immediately after:
toolu_01WnT6GqQBi4MBCTveb8WV1d. Each tool_use block must have a corresponding tool_result block in the next message."}}

Environment Info

  • Platform: darwin
  • Terminal: cursor
  • Version: 1.0.33
  • Feedback ID: 758e4ccf-ef4d-4986-912c-abe577025c7a

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:883:11)\n    at execSync (node:child_process:955:15)\n    at RG (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:700:3921)\n    at file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:622:9014\n    at Q (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:526:17199)\n    at VJ (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:622:8160)\n    at oS (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:622:7241)\n    at TB (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:622:11408)","timestamp":"2025-07-07T05:10:20.102Z"},{"error":"Error: Request was aborted.\n    at Et._createMessage (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1308:6810)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-07-07T05:57:23.865Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.85: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01WnT6GqQBi4MBCTveb8WV1d. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"}}\n    at cQ.generate (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1302:12578)\n    at mz.makeStatusError (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1317:2082)\n    at mz.makeRequest (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1317:5257)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async MN2.c11.showErrors (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1683:22444)\n    at async c11 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1683:12346)\n    at async MN2 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1683:22290)\n    at async file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1683:17419\n    at async le1 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1683:5121)\n    at async Sd (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1683:17389)","timestamp":"2025-07-07T06:19:07.876Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.85: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01WnT6GqQBi4MBCTveb8WV1d. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"}}\n    at cQ.generate (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1302:12578)\n    at mz.makeStatusError (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1317:2082)\n    at mz.makeRequest (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1317:5257)\n    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n    at async MN2.c11.showErrors (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1683:22444)\n    at async c11 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1683:12346)\n    at async MN2 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1683:22290)\n    at async file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1683:17419\n    at async le1 (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1683:5121)\n    at async Sd (file:///usr/local/lib/node_modules/@anthropic-ai/claude-code/cli.js:1683:17389)","timestamp":"2025-07-07T06:29:27.234Z"}]

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:apiarea:corearea:toolsbugSomething isn't workingduplicateThis issue or pull request already existshas 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