[BUG] [Windows] VS Code extension fails with exit code 3 after Windows password change - Bun ENOTCONN error"
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?
Windows 10
Extensión 2.0.10
Error "code 3" causado por Bun crash
El CLI independiente (2.0.11) funciona perfectamente
[Windows] VS Code extension fails with exit code 3 after Windows password change - Bun ENOTCONN error"
Environment
Platform: Windows 10
VS Code Extension Version: 2.0.10 (anthropic.claude-code-2.0.10-win32-x64)
Bundled Binary Version: Uses Bun v1.2.23
Claude Code CLI Version (npm): 2.0.11 ✅ Works correctly
Terminal: PowerShell
VS Code Version: [Your version - check Help > About]
Bug Description
The Claude Code VS Code extension fails to start with exit code 3 after changing the Windows user password. The bundled binary crashes with a Bun ENOTCONN error, while the npm-installed CLI (version 2.0.11) works perfectly in the terminal.
Steps to Reproduce
- Have Claude Code extension installed and working on Windows
- Change Windows user account password
- Open VS Code
- Try to use Claude Code extension
- Extension shows error: "Error: Claude Code process exited with code 3"
Expected Behavior
The extension should either:
- Re-authenticate automatically
- Prompt for new authentication
- Continue working with stored credentials
Actual Behavior
The extension crashes immediately with exit code 3. The VS Code extension logs show:
c:\DESARROLLOS\PYTHON\Comparador_ordenes,
permission mode: default, version: 2.0.10,
c:\Users\angel.plata.vscode\extensions\anthropic.claude-code-2.0.10-win32-x64\resources\native-binary\claude.exe
[error] Error from Claude (on channel kc20rglq2z): Error: Claude Code process exited with code 3
Root Cause
When executing the bundled binary directly:
& "$env:USERPROFILE\.vscode\extensions\anthropic.claude-code-2.0.10-win32-x64\resources\native-binary\claude.exe" --version
c:\DESARROLLOS\PYTHON\Comparador_ordenes,
permission mode: default, version: 2.0.10,
c:\Users\angel.plata.vscode\extensions\anthropic.claude-code-2.0.10-win32-x64\resources\native-binary\claude.exe
[error] Error from Claude (on channel kc20rglq2z): Error: Claude Code process exited with code 3
## Root Cause
When executing the bundled binary directly:
```powershell
& "$env:USERPROFILE\.vscode\extensions\anthropic.claude-code-2.0.10-win32-x64\resources\native-binary\claude.exe" --version
The binary crashes with:
============================================================
Bun v1.2.23 (cf136713) Windows x64 (baseline)
...
panic(main thread): Unexpected error
ENOTCONN: Transport endpoint is not connected (open())
oh no: Bun has crashed. This indicates a bug in Bun, not your code.
Full error output: [Bun crash report link provided in output]
Important Notes
The npm CLI works perfectly: Running claude from PowerShell (version 2.0.11) works without any issues
macOS is not affected: The same extension works fine on macOS (no password change occurred there)
Workaround exists: Enabling "Claude-code: Use Terminal" setting makes the extension work by using the CLI instead of the bundled binary
Workaround
Enable the "Use Terminal" option in VS Code settings:
Open Settings (Ctrl+,)
Search for: claude-code.useTerminal
Enable "Launch Claude in the terminal instead of the native UI"
Restart VS Code
This makes the extension use the working npm CLI instead of the broken bundled binary.
Root Cause Analysis
The issue appears to be:
Bun 1.2.23 bug on Windows: The bundled binary uses Bun 1.2.23 which has a known issue with connection endpoints
Credential invalidation: Windows password change may have invalidated stored credentials or permissions
Credential Manager interaction: The Bun binary cannot properly access Windows Credential Manager after the password change
Suggested Fixes
Short-term: Update bundled binary to use newer Bun version without the ENOTCONN bug
Medium-term: Improve credential handling to gracefully recover from password changes
Long-term: Add better error messages that guide users to the workaround or re-authentication
Additional Context
The extension version 2.0.10 was released on 2025-10-09
This affects Windows users who change their OS password after installing the extension
The bundled binary appears to be more sensitive to permission/credential issues than the npm-installed version
Related Issues
Potentially related to credential management on Windows
May be connected to Bun runtime issues on Windows with file system access
Is this a critical issue?
Not critical since a workaround exists, but it significantly impacts user experience for Windows users who change passwords.

### What Should Happen?
The Claude Code extension should continue working normally after a Windows password change.
Specifically:
1. The bundled binary should successfully launch and connect to Claude's services
2. If credentials are invalidated by the password change, the extension should detect this and prompt for re-authentication
3. The extension should NOT crash with exit code 3
The extension should behave like the npm CLI version (2.0.11), which works perfectly after the password change.
### Error Messages/Logs
```shell
2025-10-09 15:51:48.161 [info] Claude code extension is now active?
2025-10-09 15:51:48.161 [info] MCP Server running on port 51766 (localhost only)
2025-10-09 15:52:00.283 [info] New WS connection from: /
2025-10-09 15:52:00.283 [info] MCP server connected to transport
2025-10-09 15:52:00.283 [info] [DiagnosticStreamManager] Started streaming diagnostics
2025-10-09 15:52:00.283 [info] Registered diagnostic client: client_0
2025-10-09 16:11:20.838 [info] [DiagnosticStreamManager] Notifying 1 clients about diagnostics change for 1 files
2025-10-09 16:11:30.490 [info] [DiagnosticStreamManager] Notifying 1 clients about diagnostics change for 1 files
2025-10-09 16:11:31.093 [info] AuthManager initialized
2025-10-09 16:11:31.677 [info] [DiagnosticStreamManager] Notifying 1 clients about diagnostics change for 1 files
2025-10-09 16:11:31.685 [info] Received message from webview: {"type":"request","requestId":"ki5qnd8bop8","request":{"type":"init"}}
2025-10-09 16:11:31.704 [info] Getting authentication status
2025-10-09 16:11:31.704 [info] OAuth tokens found in secure storage
2025-10-09 16:11:31.704 [info] Auth status: method=claudeai
2025-10-09 16:11:31.768 [info] Received message from webview: {"type":"request","requestId":"fnm3tlkadbg","request":{"type":"rename_tab","title":"Claude Code"}}
2025-10-09 16:11:31.768 [info] Received message from webview: {"type":"request","requestId":"re18c3kizym","request":{"type":"get_claude_state"}}
2025-10-09 16:11:31.892 [info] Loading config cache by launching Claude...
2025-10-09 16:11:31.892 [info] Spawning Claude with SDK query function - cwd: c:\DESARROLLOS\PYTHON\Comparador_ordenes, permission mode: default, version: 2.0.10, c:\Users\angel.plata\.vscode\extensions\anthropic.claude-code-2.0.10-win32-x64\resources\native-binary\claude.exe, resume: undefined
2025-10-09 16:11:31.892 [info] Received message from webview: {"type":"request","requestId":"yb9t3xdebp9","request":{"type":"get_current_selection"}}
2025-10-09 16:11:31.893 [info] Received message from webview: {"type":"request","requestId":"pome269gie","request":{"type":"get_asset_uris"}}
2025-10-09 16:11:31.894 [info] Received message from webview: {"type":"request","requestId":"6f0dczxol3s","request":{"type":"list_sessions_request"}}
2025-10-09 16:11:31.894 [info] Received message from webview: {"type":"request","requestId":"6qqxkmvlm25","request":{"type":"list_sessions_request"}}
2025-10-09 16:11:31.895 [info] Received message from webview: {"type":"request","requestId":"hh004je5srv","request":{"type":"list_sessions_request"}}
2025-10-09 16:11:31.895 [info] Received message from webview: {"type":"request","requestId":"6xaooja6nig","request":{"type":"rename_tab","title":"Claude Code"}}
2025-10-09 16:11:31.895 [info] Received message from webview: {"type":"launch_claude","channelId":"dt9k3qsrdwc","cwd":"c:\\DESARROLLOS\\PYTHON\\Comparador_ordenes","model":"default","permissionMode":"default"}
2025-10-09 16:11:32.025 [info] Launching Claude on channel: dt9k3qsrdwc
2025-10-09 16:11:32.026 [info] Spawning Claude with SDK query function - cwd: c:\DESARROLLOS\PYTHON\Comparador_ordenes, permission mode: default, version: 2.0.10, c:\Users\angel.plata\.vscode\extensions\anthropic.claude-code-2.0.10-win32-x64\resources\native-binary\claude.exe, resume: undefined
2025-10-09 16:11:32.026 [warning] Failed to load sessions from c:\DESARROLLOS\PYTHON\Comparador_ordenes: Error: ENOENT: no such file or directory, scandir 'C:\Users\angel.plata\.claude\projects\c--DESARROLLOS-PYTHON-Comparador-ordenes'
2025-10-09 16:11:32.026 [warning] Failed to load sessions from c:\DESARROLLOS\PYTHON\Comparador_ordenes: Error: ENOENT: no such file or directory, scandir 'C:\Users\angel.plata\.claude\projects\c--DESARROLLOS-PYTHON-Comparador-ordenes'
2025-10-09 16:11:32.027 [warning] Failed to load sessions from c:\DESARROLLOS\PYTHON\Comparador_ordenes: Error: ENOENT: no such file or directory, scandir 'C:\Users\angel.plata\.claude\projects\c--DESARROLLOS-PYTHON-Comparador-ordenes'
2025-10-09 16:11:33.092 [info] Closing Claude on channel: dt9k3qsrdwc
2025-10-09 16:11:33.092 [error] Error from Claude (on channel dt9k3qsrdwc): Error: Claude Code process exited with code 3
2025-10-09 16:11:36.518 [info] [DiagnosticStreamManager] Notifying 1 clients about diagnostics change for 1 files
Steps to Reproduce
Just change user password on windows 10
Claude Model
None
Is this a regression?
I don't know
Last Working Version
2.0.10
Claude Code Version
2.0.10
Platform
Other
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗