[BUG] OAuth login fails with "Internal server error" (status 500) on Windows — Claude Max subscription

Resolved 💬 4 comments Opened Apr 7, 2026 by bobec83 Closed May 20, 2026

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?

Title: [BUG] OAuth login fails with "Internal server error" (status 500) on Windows — Claude Max subscription

---

Preflight checklist

  • [x] I have searched existing issues and this hasn't been reported (or it keeps occurring after being marked as duplicate)
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code (v2.1.92)

---

What's wrong?

Claude Code fails to authenticate via OAuth on a Windows machine using a Claude Max subscription. The browser opens the authorization page, the user approves — but Claude Code returns either:

OAuth error: timeout of 15000ms exceeded

or:

OAuth error: Request failed with status code 500

The browser then shows "Authorization failed — Internal server error" at claude.ai/oauth/authorize. Clicking "Try again" does not resolve the issue.

---

Steps to reproduce

  1. Open Claude Code in VS Code terminal (PowerShell) on Windows
  2. Run claude → "Not logged in" appears
  3. Run /login → select "Claude.ai Subscription"
  4. Browser opens claude.ai/oauth/authorize?... with redirect to localhost:50xxx/callback
  5. User is logged in to claude.ai
  6. Browser shows "Authorization failed — Internal server error"
  7. Claude Code terminal shows timeout or status 500 error

---

Expected behavior

OAuth flow completes successfully, Claude Code logs in and shows the active session with Claude Max subscription.

---

Environment

  • Claude Code version: v2.1.92
  • Subscription: Claude Max (Opus 4.6, 1M context)
  • OS: Windows 11, PowerShell terminal
  • VS Code: latest
  • Network profile: Public (GPO-managed firewall, BlockInbound policy)
  • redirect_uri: http://localhost:50xxx/callback
  • client_id: 9d1c250a-e61b-44d9-88ed-5944d1962f5e

---

Additional context

  • Issue persists after clearing %USERPROFILE%\.claude cache
  • Issue persists after changing Windows network profile from Public to Private
  • The same account works fine on a different machine (office workstation)
  • Workaround: using ANTHROPIC_API_KEY env variable bypasses OAuth and works
  • status.anthropic.com shows "All Systems Operational" during the failures
  • This appears related to: #36004, #10715

What Should Happen?

OAuth flow completes successfully. Claude Code logs in and displays the active session with Claude Max subscription (Opus 4.6), without any timeout or server error.

Error Messages/Logs

Error Messages/Logs:
OAuth error: timeout of 15000ms exceeded
OAuth error: Request failed with status code 500
Authorization failed — Internal server error
(shown in browser at claude.ai/oauth/authorize)

Steps to Reproduce

Steps to Reproduce:

  1. Open Claude Code in VS Code terminal (PowerShell) on Windows 11
  2. Run claude → shows "Not logged in • Please run /login"
  3. Run /login → select "Claude.ai Subscription"
  4. Browser opens claude.ai/oauth/authorize with redirect_uri=http://localhost:50xxx/callback
  5. User is already logged in to claude.ai (wpiaskowski@gmail.com)
  6. Browser shows "Authorization failed — Internal server error"
  7. Claude Code terminal shows either timeout (15000ms) or status 500 error
  8. Clicking "Try again" in browser does not help
  9. Issue persists after clearing %USERPROFILE%\.claude cache
  10. Issue persists after changing Windows network profile from Public to Private

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

version: v2.1.92

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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