Skip to content

Stuck after laptop is closed and opened #2232

@islamaliev

Description

@islamaliev

Bug Description
Claude Code was working, then I accidentally closed my laptop (flapped) and opened after few minutes again. Then I got this (also tried to make it continue the work):\

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

> continue
  ⎿  internal/request/graphql/schema/generate_encrypted_test.go (file://):
  ⎿    ✘ [Line 73:6] undefined: strings [[object Object]] (compiler)
  ⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.205: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01GEeptjpVKnJgpPSthhL4Lb. Each 
    `tool_use` block must have a corresponding `tool_result` block in the next message."}}

Environment Info

  • Platform: darwin
  • Terminal: vscode
  • Version: 1.0.25
  • Feedback ID: 87c5d4ce-955d-4a0b-99ab-71e59cb2b41a

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 __node_internal_genericNodeError (node:internal/errors:865:15)\n    at checkExecSyncError (node:child_process:890:11)\n    at execSync (node:child_process:962:15)\n    at wZ (file:///Users/islam/.nvm/versions/node/v18.20.3/lib/node_modules/@anthropic-ai/claude-code/cli.js:659:3921)\n    at file:///Users/islam/.nvm/versions/node/v18.20.3/lib/node_modules/@anthropic-ai/claude-code/cli.js:582:8863\n    at Q (file:///Users/islam/.nvm/versions/node/v18.20.3/lib/node_modules/@anthropic-ai/claude-code/cli.js:526:17199)\n    at IX (file:///Users/islam/.nvm/versions/node/v18.20.3/lib/node_modules/@anthropic-ai/claude-code/cli.js:582:8009)\n    at NS (file:///Users/islam/.nvm/versions/node/v18.20.3/lib/node_modules/@anthropic-ai/claude-code/cli.js:582:7090)\n    at T6 (file:///Users/islam/.nvm/versions/node/v18.20.3/lib/node_modules/@anthropic-ai/claude-code/cli.js:582:11202)\n    at iK1 (file:///Users/islam/.nvm/versions/node/v18.20.3/lib/node_modules/@anthropic-ai/claude-code/cli.js:1668:5452)","timestamp":"2025-06-17T08:41:36.756Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.205: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01GEeptjpVKnJgpPSthhL4Lb. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"}}\n    at h6.generate (file:///Users/islam/.nvm/versions/node/v18.20.3/lib/node_modules/@anthropic-ai/claude-code/cli.js:1300:12578)\n    at Sw.makeStatusError (file:///Users/islam/.nvm/versions/node/v18.20.3/lib/node_modules/@anthropic-ai/claude-code/cli.js:1315:2082)\n    at Sw.makeRequest (file:///Users/islam/.nvm/versions/node/v18.20.3/lib/node_modules/@anthropic-ai/claude-code/cli.js:1315:5257)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async GE2.E11.showErrors (file:///Users/islam/.nvm/versions/node/v18.20.3/lib/node_modules/@anthropic-ai/claude-code/cli.js:1668:22049)\n    at async E11 (file:///Users/islam/.nvm/versions/node/v18.20.3/lib/node_modules/@anthropic-ai/claude-code/cli.js:1668:12215)\n    at async GE2 (file:///Users/islam/.nvm/versions/node/v18.20.3/lib/node_modules/@anthropic-ai/claude-code/cli.js:1668:21895)\n    at async file:///Users/islam/.nvm/versions/node/v18.20.3/lib/node_modules/@anthropic-ai/claude-code/cli.js:1668:17115\n    at async ft1 (file:///Users/islam/.nvm/versions/node/v18.20.3/lib/node_modules/@anthropic-ai/claude-code/cli.js:1668:5163)\n    at async Xu (file:///Users/islam/.nvm/versions/node/v18.20.3/lib/node_modules/@anthropic-ai/claude-code/cli.js:1668:17085)","timestamp":"2025-06-18T06:45:21.736Z"},{"error":"Error: 400 {\"type\":\"error\",\"error\":{\"type\":\"invalid_request_error\",\"message\":\"messages.205: `tool_use` ids were found without `tool_result` blocks immediately after: toolu_01GEeptjpVKnJgpPSthhL4Lb. Each `tool_use` block must have a corresponding `tool_result` block in the next message.\"}}\n    at h6.generate (file:///Users/islam/.nvm/versions/node/v18.20.3/lib/node_modules/@anthropic-ai/claude-code/cli.js:1300:12578)\n    at Sw.makeStatusError (file:///Users/islam/.nvm/versions/node/v18.20.3/lib/node_modules/@anthropic-ai/claude-code/cli.js:1315:2082)\n    at Sw.makeRequest (file:///Users/islam/.nvm/versions/node/v18.20.3/lib/node_modules/@anthropic-ai/claude-c

Note: Error logs were truncated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:apiarea: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