[BUG] /login with pasting auth code doesn't work

Resolved 💬 2 comments Opened Aug 6, 2025 by adstastic Closed Aug 6, 2025

Environment

  • Platform (select one):
  • [x] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • Claude CLI version: 1.0.69
  • Operating System: macOS 15.5 24F74
  • Terminal: iTerm2 Build 3.5.14

Bug Description

/login from another machine (copying the URL and pasting the code) appears to work, but the CLI keeps showing the Missing API key · Run /login status message, and when sending messages Invalid API key · Please run /login.

Steps to Reproduce

  1. Update claude code
  2. Run claude
  3. See status message `Missing API key · Run /login
  4. Run /login
  5. Select Claude account with subscription
  6. Copy URL
  7. Load URL in an authenticated browser
  8. Click Authorize
  9. Copy auth code
  10. Paste into claude code
  11. See Login successful. Press Enter to continue...
  12. Press Enter
  13. Return to message box, with status message Missing API key · Run /login## Expected Behavior

I expect this to work as it has in the past.

Actual Behavior

The logged out state persists despite several attempts.
Logging in via browser (not copy/paste token) works, but I am authenticating claude on a server where I don't want to auth my Google account for logging in to Anthropic.

View original on GitHub ↗

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