[BUG] Claude Code VS Code Extension crashes on Windows 11 with error 3221225477
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?
Version: 2.1.126
OS: Windows 11 (10.0.26200.0)
System: x64-based PC, Intel i7-1355U
Problem:
When trying to start Claude Code in VS Code, the OAuth callback server fails to start with exit code 3221225477. Terminal mode works fine, but VS Code Extension doesn't.
Steps to reproduce:
- Open VS Code
- Click Claude Code icon or run Ctrl+Shift+P → Claude Code
- Click "Authorize" on OAuth page
- Get error: "localhost refused" + exit code 3221225477
Expected: OAuth server starts, callback succeeds
Actual: Process exits with 3221225477, terminal shows "localhost refused"
Additional:
- Terminal mode works:
npx @anthropic-ai/claude-code chat✅ - VS Code Extension doesn't work ❌
- Hyper-V deactivated, Firewall disabled, ports free
What Should Happen?
When I click the Claude Code icon in VS Code or run the command to start Claude Code:
- The OAuth authorization page should open
- After clicking "Authorize", the local callback server should start successfully
- The OAuth redirect should complete without errors
- Claude Code should open and be ready for use
Currently: The localhost callback server crashes with exit code 3221225477 instead.
Error Messages/Logs
Steps to Reproduce
- Install Claude Code v2.1.126 in VS Code
- Open VS Code
- Click the Claude Code icon in the Activity Bar (left sidebar)
OR: Press Ctrl+Shift+P → type "Claude Code" → Enter
- Wait for the OAuth authorization page to load
- Click the "Autorisieren" (Authorize) button
- Observe: Browser redirects to http://localhost:59065/callback
- Error appears: "Die Website ist nicht erreichbar" (ERR_CONNECTION_REFUSED)
- VS Code shows notification: "Claude Code process exited with code 3221225477"
Expected: OAuth callback succeeds, Claude Code opens
Actual: Process crashes, localhost connection refused
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.126
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗