[BUG] VS Code Extension crashes repeatedly on macOS - Extension host terminated unexpectedly
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
## Bug Description
Claude Code VS Code extension (v2.0.50) crashes repeatedly within seconds of
activation, causing constant "Extension host terminated unexpectedly" popups.
## Environment
- OS: macOS 14.6 (Darwin 24.6.0)
- VS Code Version: [Run
code --versionto get this] - Claude Code Extension Version: 2.0.50
- Claude Code CLI Version: [Run
claude --version] - Node Version: [Run
node --version] - Account Type: Claude Max
- Model: Sonnet 4.5
## Steps to Reproduce
- Install Claude Code extension from marketplace
- Open VS Code in project directory
- Extension activates automatically
- Extension host crashes within 10-20 seconds
- VS Code auto-restarts extension
- Crash repeats indefinitely
## Expected Behavior
Extension should activate and remain stable
## Actual Behavior
Extension crashes repeatedly with "Extension host terminated unexpectedly 3
times within the last 5 minutes" error
## Extension Host Logs
[Attach the full logs you provided]
## Additional Context
- CLI works perfectly without issues
- Tried uninstalling/reinstalling extension
- Tried removing extension cache
- Only Claude Code extension shows this behavior
- No other extensions are causing conflicts
## Workaround
Disabled extension and using CLI exclusively
## Request
Please investigate why the VS Code extension crashes on macOS while the CLI
remains stable.
Code Version:
1.106.2
1e3c50d64110be466c0b4a45222e81d2c9352888
arm64
What Should Happen?
The Claude Code VS Code extension should:
- Activate successfully without crashing
- Remain stable and responsive
- Allow users to access Claude Code features via VS Code UI (inline chat,
sidebar, etc.)
- Not cause repeated "Extension host terminated unexpectedly" errors
Expected behavior matches the CLI experience - stable, reliable, no crashes.
What actually happens (instead)
The Claude Code VS Code extension:
- Activates initially
- Crashes within 10-20 seconds
- Triggers "Extension host terminated unexpectedly 3 times within the last 5
minutes" error
- Auto-restarts and crashes again
- Creates an infinite crash-restart loop
- Makes VS Code unusable due to constant error popups
The extension never stabilizes enough to be functional.
These detailed descriptions will help the Anthropic team reproduce and
diagnose the issue. The key point is highlighting the contrast between the
stable CLI and the crashing extension (same version).
Error Messages/Logs
Steps to Reproduce
- Install Claude Code extension from VS Code marketplace (v2.0.50)
- Open VS Code in any project directory (e.g., ~/dev/brandmine-hugo/crm)
- Extension activates automatically on startup
- Within 10-20 seconds, "Extension host terminated unexpectedly" error
appears
- Click "Restart Extension Host" or dismiss the error
- Extension re-activates
- Crashes again within 10-20 seconds
- Cycle repeats indefinitely (crashed 3+ times in logs)
Note: Claude Code CLI (same version 2.0.50) works perfectly via terminal
without any crashes.
Claude Model
Sonnet (default)
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.0.50 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗