Skip to content

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

Description

@adstastic

Environment

  • Platform (select one):
    • Anthropic API
    • AWS Bedrock
    • Google Vertex AI
    • Other:
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:authbugSomething isn't workinghas reproHas detailed reproduction stepsplatform:macosIssue specifically occurs on macOS

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions