[BUG] OAuth token expired → /login times out, no recovery path

Resolved 💬 2 comments Opened Apr 7, 2026 by Sreyorn 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?

Bug Report: OAuth token expired → /login times out, no recovery path

Environment

  • OS: macOS
  • Claude Code version: [run claude --version and fill in]
  • Auth method: Claude Pro subscription (OAuth)

Expected behavior

  • The login flow should complete successfully after browser authorization
  • At minimum, claude login and claude logout should work without requiring a valid token, since their entire purpose is to obtain or reset one
  • There should be a reliable manual code entry fallback when the browser redirect fails

What Should Happen?

What's wrong

Once the OAuth token expires, there is no way to recover from within Claude Code itself.

  1. Any command returns: API Error: 401 — OAuth token has expired. Please obtain a new token or refresh your existing token.
  2. Running /login opens the browser flow but times out: OAuth error: timeout of 15000ms exceeded
  3. Running claude login / claude auth login in a fresh terminal has the same result
  4. ~/.claude/.credentials.json does not exist as a standalone file to delete
  5. Deleting ~/.claude entirely and re-running claude login still times out
  6. There is no manual code entry fallback when the redirect fails

Error Messages/Logs

Steps to Reproduce

  1. Use Claude Code normally until OAuth token expires
  2. Run any command → 401 error
  3. Run /login or claude login → browser opens (or URL is shown)
  4. Complete authorization in browser
  5. Terminal never receives the callback → OAuth error: timeout of 15000ms exceeded

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.92 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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