[BUG] An exception is thrown whenever Claude tries to present a code change in IDE for approval
Resolved 💬 4 comments Opened Jun 6, 2025 by jbrowning Closed Jun 6, 2025
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: 1.0.16 (Claude Code)
- Operating System: macOS 15.5 (24F74)
- Terminal: Windsurf Terminal + Claude Code Extension
Bug Description
An exception is thrown whenever Claude tries to present a code change in Windsurf for approval:
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:///Users/jeff/.asdf/installs/nodejs/22.13.1/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:///Users/jeff/.asdf/installs/nodejs/22.13.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1921:10075)
at async J (file:///Users/jeff/.asdf/installs/nodejs/22.13.1/lib/node_modules/@anthropic-ai/claude-code/cli.js:1921:8929)
Steps to Reproduce
- Open Windsurf
- Start Claude in integrated Terminal (IDE Connected)
- Prompt Claude to make a change
- Observe Claude performing solution steps
- Crash is shown when Claude attempts to present code changes for user approval
Expected Behavior
An editor tab opened by Claude presenting a diff of its proposed code changes.
Actual Behavior
The exception message and no diff presented.
Additional Context
<!-- Add any other context about the problem here, such as screenshots, logs, etc. -->
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗