[BUG] /login does not auto-open browser in PowerShell/cmd on Windows 11 (works in VS Code integrated terminal)

Resolved 💬 3 comments Opened May 18, 2026 by COOL-ANNZI Closed Jun 16, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet (similar but distinct from #60041 which is about ECONNREFUSED on callback after the browser already opened)
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

What's Wrong?

/login (and claude auth login) no longer auto-opens the default browser in standard PowerShell or cmd on Windows 11. Only the OAuth URL is printed; the browser is never launched. The flow falls back to manual paste mode.

Critically, the exact same Claude Code binary in the VS Code integrated terminal opens the browser correctly — so this is not a system-level URL handler problem; it's specific to the CLI's browser-launching path when running outside VS Code.

What Should Happen?

/login should auto-open the default browser (Edge) with the OAuth authorize URL, as it did up until ~last week.

Steps to Reproduce

  1. Open a new PowerShell 7 (or cmd) window — not the VS Code integrated terminal.
  2. Run claude and then /login (or claude auth login).
  3. Observe: only the URL is printed in the terminal. No browser opens.
  4. Open VS Code, run the same claude/login from its integrated terminal.
  5. Observe: Edge opens automatically with the OAuth URL as expected.

Environment Verification (system URL handler is healthy)

  • Default browser registered correctly: HKCU:\...\http\UserChoiceMSEdgeHTM
  • Start-Process "https://example.com" from the same PowerShell session does open Edge correctly.
  • BROWSER env var is unset (also tested with BROWSER=C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe — no change).
  • No proxy / no custom Anthropic env vars.

So the OS-level URL association works; it appears the CLI's spawn of the browser is silently no-op'ing in non-VS-Code shells.

Is this a regression?

Yes — worked normally until approximately one week before this report.

Claude Code Version

2.1.143

Platform

Anthropic API (Claude Max subscription)

Operating System

Windows 11

Terminal/Shell

PowerShell 7 (also reproduces in cmd.exe). Does NOT reproduce in VS Code integrated terminal.

Additional Information

Likely related to the OAuth flow changes around v2.1.126 ("Pasteable OAuth code... when browser callback cannot reach localhost"). Possibly the CLI is now preemptively skipping the browser-open step in certain shell environments, or a regression broke the spawn helper for non-VS-Code shells.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗