Preflight Checklist
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
claude in 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 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
Preflight Checklist
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
What Should Happen?
Expected Behavior
With no stored credentials present,
claudeshould initiate the browser-basedOAuth login flow rather than reporting an expired login.
Error Messages/Logs
Steps to Reproduce
Steps to Reproduce
claudein any directory/login- no OAuth flow starts, same error returnsClaude 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"env | grep -i -E "ANTHROPIC|CLAUDE"returns nothing(no CLAUDE_CODE_OAUTH_TOKEN, ANTHROPIC_API_KEY, or ANTHROPIC_AUTH_TOKEN)
--allow-scriptsafter npm blocked the postinstall script(@anthropic-ai/claude-code@2.1.218) - no change