claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

Tool Result Block Missing in Async Promise Handling

Open tim-watcha opened this issue 6 months ago • 3 comments

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"}]

tim-watcha avatar Jun 05 '25 22:06 tim-watcha

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.

illusivejosiah avatar Jun 06 '25 00:06 illusivejosiah

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

  • Platform: Ubuntu 22.04
  • Terminal: Pycharm

vmadman avatar Jun 06 '25 00:06 vmadman

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

vmadman avatar Jun 06 '25 02:06 vmadman

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

illusivejosiah avatar Jun 07 '25 19:06 illusivejosiah

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

blois avatar Jun 07 '25 20:06 blois

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

illusivejosiah avatar Jun 08 '25 01:06 illusivejosiah

Image

illusivejosiah avatar Jun 08 '25 01:06 illusivejosiah

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.

github-actions[bot] avatar Aug 09 '25 14:08 github-actions[bot]