Tool Result Block Missing in Async Promise Handling

Status Fixed / completed
Maintainer reply ✓ Yes — blois
Activity 8 comments · opened Jun 5, 2025 · closed Jun 7, 2025
💡 Likely answer: A maintainer (blois, collaborator) responded on this thread — see the highlighted reply below.

Bug Description
I got this message: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
McpError: MCP error -32603: Tool not found: closeAllDiffTabs
at Mc1._onresponse (file:///Users/choongjaelee/.nvm/versions/node/v22.15.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:1358:20090)

Environment Info

  • Platform: macos
  • Terminal: pycharm
  • Version: 1.0.15
  • Feedback ID: 145e170c-4caa-4cf5-8bba-f61a3e802d6e

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 WZ (file:///Users/choongjaelee/.nvm/versions/node/v22.15.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:654:3921)\n    at file:///Users/choongjaelee/.nvm/versions/node/v22.15.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:582:11799\n    at Q (file:///Users/choongjaelee/.nvm/versions/node/v22.15.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:526:17069)\n    at QV (file:///Users/choongjaelee/.nvm/versions/node/v22.15.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:582:10945)\n    at VG (file:///Users/choongjaelee/.nvm/versions/node/v22.15.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:582:10391)\n    at dO2 (file:///Users/choongjaelee/.nvm/versions/node/v22.15.0/lib/node_modules/@anthropic-ai/claude-code/cli.js:2049:4758)","timestamp":"2025-06-05T22:27:39.203Z"}]

View original on GitHub ↗

8 Comments

illusivejosiah · 1 year ago

Same. Getting this in Cursor Terminal and Warp. MacOS. Latest version. Feedback ID: 6f95994a-7bc0-4817-8f56-770a787a42f2

Also see this in status:

IDE Integration • /config
⚠ Error installing Cursor extension: 1: ENOENT
Please restart your IDE and try again.

vmadman · 1 year ago

Same, using IntelliJ (Pycharm). Just started today.

  • Platform: Ubuntu 22.04
  • Terminal: Pycharm
vmadman · 1 year ago

Update: The error seems to have went away after I updated to v1.0.16

illusivejosiah · 1 year ago

IDE Integration • /config
✔ Connected to Cursor extension
⚠ Error installing Cursor extension: 1: ENOENT
Please restart your IDE and try again.
⎿ API Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.129:
tool_use ids were found without tool_result blocks immediately after:
toolu_01PTe6Cdfiqnb2D7on8uXDXU. Each tool_use block must have a corresponding tool_result block
in the next message."}}

Back again. On v1.0.17

blois collaborator · 1 year ago

This should be resolved now (also see https://github.com/anthropics/claude-code/issues/1679)

illusivejosiah · 1 year ago

@blois it is not resolved. It has re-appeard.

illusivejosiah · 1 year ago
github-actions[bot] · 1 year ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.