Skip to content

[BUG] Login expired persists after full credential wipe, keychain clear, and reinstall - /login never initiates OAuth flow #80605

Description

@Voltojules

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

What's Wrong?

Claude Code returns "Login expired · Please run /login" on every invocation.
Running /login does not initiate any OAuth flow no browser window opens and
no login method selection menu is shown. The error appears immediately after
the workspace trust prompt is confirmed.

The state persists even after all local credentials have been removed, which
suggests the CLI is not falling back to a fresh login flow when no stored
credential exists.

Actual Behavior

The expired-login error is returned unconditionally, with no path to
re-authenticate through the CLI.

Environment

  • OS: macOS TAHOE 26.5.1
  • Claude Code version: 2.1.218
  • Shell: zsh
  • Auth method: claude.ai subscription login (no API key, no cloud provider)
  • Request ID: dont have

What Should Happen?

Expected Behavior

With no stored credentials present, claude should initiate the browser-based
OAuth login flow rather than reporting an expired login.

Error Messages/Logs

Login expired · Please run /login

Steps to Reproduce

Steps to Reproduce

  1. Run claude in any directory
  2. Confirm the workspace trust prompt
  3. Error appears: "Login expired · Please run /login"
  4. Run /login - no OAuth flow starts, same error returns

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.218

Claude Code Version

2.1.218

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Troubleshooting Already Attempted

  • npm update -g @anthropic-ai/claude-code - completed successfully
  • claude logout
  • rm -f ~/.claude/.credentials.json
  • rm -rf ~/.claude/cache
  • security delete-generic-password -s "claude-code"
  • Verified no relevant environment variables are set:
    env | grep -i -E "ANTHROPIC|CLAUDE" returns nothing
    (no CLAUDE_CODE_OAUTH_TOKEN, ANTHROPIC_API_KEY, or ANTHROPIC_AUTH_TOKEN)
  • Started from a project directory rather than home directory
  • Fresh terminal session after each change
  • Reinstalled with --allow-scripts after npm blocked the postinstall script
    (@anthropic-ai/claude-code@2.1.218) - no change
  • Tested on a separate network (mobile hotspot) - no change

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions