VSCode Extension: Unhandled Promise Rejection When Refactoring in tmux Terminal
Resolved 💬 3 comments Opened Jun 7, 2025 by client-side96 Closed Jun 10, 2025
Bug Description
Issue: When asking Claude to refactor a file in VSCode from a tmux terminal window in the VSCode terminal panel an error occurs.\
Reproduction:
- Open tmux in VSCode insiders terminal
- /ide and connect to VSCode insiders
- Ask claude: "Add a console.log to function x in file y"
- Error occurs:
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:
Error: command 'type' already exists
at hX2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1376:12108)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async oY5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1921:10075)
at async J (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1921:8929)
- Claude still shows changes in terminal and when accepting changes, the refactor is applied, but the extension doesn't show the diff in the editor panel.
Environment Info
- Platform: macos
- Terminal: tmux
- Version: 1.0.16
- Feedback ID: 22c7b39b-69ac-461b-b151-d9158faac34e
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:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:654:3921)\n at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:582:11794\n at Q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:526:17190)\n at pJ (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:582:10940)\n at iP (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:582:10021)\n at n6 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:582:14133)","timestamp":"2025-06-07T09:32:55.886Z"},{"error":"Error: Failed to check bun permissions\n at MK5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1970:690)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async S1A (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1970:808)\n at async dH1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1980:43)\n at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2272:6475","timestamp":"2025-06-07T09:32:56.402Z"},{"error":"Error: Failed to check bun permissions\n at MK5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1970:690)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async S1A (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1970:808)\n at async dH1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1980:43)\n at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2272:6475","timestamp":"2025-06-07T09:33:00.636Z"},{"error":"Error: command 'type' already exists\n at hX2 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1376:12108)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async oY5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1921:10075)\n at async J (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1921:8929)","timestamp":"2025-06-07T09:33:29.761Z"},{"error":"Error: Failed to check bun permissions\n at MK5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1970:690)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async S1A (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1970:808)\n at async dH1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1980:43)\n at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2272:6475","timestamp":"2025-06-07T09:33:54.568Z"},{"error":"Error: Failed to check bun permissions\n at MK5 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1970:690)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async S1A (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1970:808)\n at async dH1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1980:43)\n at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:2272:6475","timestamp":"2025-06-07T09:33:56.678Z"},{"error":"Error:
Note: Error logs were truncated.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗