[BUG] Login expired persists after full credential wipe, keychain clear, and reinstall - /login never initiates OAuth flow
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?
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
- Run
claudein any directory - Confirm the workspace trust prompt
- Error appears: "Login expired · Please run /login"
- 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 successfullyclaude logoutrm -f ~/.claude/.credentials.jsonrm -rf ~/.claude/cachesecurity 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-scriptsafter npm blocked the postinstall script
(@anthropic-ai/claude-code@2.1.218) - no change
- Tested on a separate network (mobile hotspot) - no change
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗