claude-code - 💡(How to fix) Fix [BUG] Claude Code VS Code Extension crashes on Windows 11 with error 3221225477 [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#55563Fetched 2026-05-03 04:50:10
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
0
Author
Timeline (top)
labeled ×4commented ×2

Error Message

  1. Get error: "localhost refused" + exit code 3221225477

Error Messages/Logs

  1. Error appears: "Die Website ist nicht erreichbar" (ERR_CONNECTION_REFUSED)
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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:

  1. Open VS Code
  2. Click Claude Code icon or run Ctrl+Shift+P → Claude Code
  3. Click "Authorize" on OAuth page
  4. 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:

  1. The OAuth authorization page should open
  2. After clicking "Authorize", the local callback server should start successfully
  3. The OAuth redirect should complete without errors
  4. 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

  1. Install Claude Code v2.1.126 in VS Code
  2. Open VS Code
  3. Click the Claude Code icon in the Activity Bar (left sidebar) OR: Press Ctrl+Shift+P → type "Claude Code" → Enter
  4. Wait for the OAuth authorization page to load
  5. Click the "Autorisieren" (Authorize) button
  6. Observe: Browser redirects to http://localhost:59065/callback
  7. Error appears: "Die Website ist nicht erreichbar" (ERR_CONNECTION_REFUSED)
  8. 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

extent analysis

TL;DR

The OAuth callback server in Claude Code fails to start with exit code 3221225477 when used in VS Code, suggesting a potential issue with the local server setup or port allocation.

Guidance

  • Verify that no other processes are using port 59065, as this could cause the callback server to fail.
  • Check the VS Code configuration and extensions for any potential conflicts with the Claude Code extension.
  • Ensure that the system's firewall and antivirus settings are not blocking the callback server, even though the firewall is mentioned as disabled.
  • Consider testing the Claude Code extension in a different environment or with a different version to isolate the issue.

Example

No specific code example can be provided without further details on the implementation, but checking for port usage can be done using command-line tools like netstat on Windows.

Notes

The issue seems specific to the VS Code extension and not the terminal mode, which suggests an integration or configuration issue rather than a problem with Claude Code itself. The lack of error logs or detailed system information limits the ability to provide a precise fix.

Recommendation

Apply workaround: Try changing the port used by the OAuth callback server if possible, or investigate further into VS Code extension configurations that might interfere with the server's operation. This is recommended because the issue appears to be related to the environment or configuration rather than a bug in Claude Code itself.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING