VS Code extension hangs and crashes with exit code 3 on Windows ARM64 (double-spawn + Bun alignment panic)
Bug Description
Claude Code VS Code extension hangs during normal use and becomes completely unresponsive (stop button doesn't work). Eventually crashes with "Claude Code process exited with code 3".
Environment
- OS: Windows 11 ARM64 (10.0.26200)
- VS Code Extension: v2.1.49 (
win32-arm64) - Bundled Bun: v1.3.10
- Binary:
claude.exefromanthropic.claude-code-2.1.49-win32-arm64
Symptoms
- Extension hangs mid-session — no output, UI frozen
- Stop button has no effect
- Eventually crashes with exit code 3
- Works fine in terminal (
claudeCLI) — only affects the VS Code extension panel
Root Causes Found in Logs
1. Double process spawn
The extension spawns two identical Claude processes simultaneously on the same channel:
09:37:35.214 Spawning Claude with SDK query function - cwd: c:\Users\julva\Documents\
09:37:35.215 Spawning Claude with SDK query function - cwd: c:\Users\julva\Documents\
2. Lock file contention
The two processes immediately conflict:
[ERROR] Failed to save config with lock: Error: Lock file is already being held
3. Duplicate plugin loading
Both processes simultaneously clone git repos (superpowers from github.com/obra/superpowers.git, atlassian from github.com/atlassian/atlassian-mcp-server.git) and load all 7 plugins, 20 skills, and 4 commands in parallel — doubling startup work and I/O.
4. Bun ARM64 crash on interrupt
When the user attempts to stop the hung session, Bun panics:
panic(thread 8804): incorrect alignment
oh no: Bun has crashed. This indicates a bug in Bun, not your code.
Bun crash report: https://bun.report/1.3.10/W_11423d3cmgkgEuhogCwmzrfwwijkBgsjufCYKERNEL32.DLLg0jCCSntdll.dlloqi1BA0eNrLzEvOLypKTS5RSMzJTM/LTc0rAQBMcwep
5. MCP server error
MCP server "claude-vscode" Failed to fetch tools: MCP error -32601: Method not found
Steps to Reproduce
- Install Claude Code VS Code extension on Windows 11 ARM64
- Open a project folder
- Start a Claude Code session in the VS Code panel
- Send a message that triggers skill/plugin loading
- Session hangs and becomes unresponsive
- Attempting to stop results in exit code 3
Workaround
Using "Run in terminal" mode in VS Code settings avoids the issue, as does using the CLI directly.
Expected Behavior
- Only one Claude process should be spawned per session
- The extension should not hang during normal operation
- The stop button should work when the session is unresponsive
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗