/logout /login missing
Bug Description /login /logout are missing and not able to switch accounts
Environment Info
- Platform: macos
- Terminal: Apple_Terminal
- Version: 1.0.11
- Feedback ID: e49a0d8a-314d-4cae-9e07-900200f7655b
Errors
[{"error":"Error: 429 {\"type\":\"error\",\"error\":{\"type\":\"rate_limit_error\",\"message\":\"This request would exceed your account's rate limit. Please try again later.\"}}\n at Y5.generate (file:///Users/polymathpubhouse/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1367:12782)\n at Jw.makeStatusError (file:///Users/polymathpubhouse/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1382:2082)\n at Jw.makeRequest (file:///Users/polymathpubhouse/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1382:5257)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-06-05T01:21:25.683Z"},{"error":"Error: Command failed: security find-generic-password -a $USER -w -s \"Claude Code\"\nsecurity: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.\n\n at genericNodeError (node:internal/errors:983:15)\n at wrappedFn (node:internal/errors:537:14)\n at checkExecSyncError (node:child_process:882:11)\n at execSync (node:child_process:954:15)\n at JZ (file:///Users/polymathpubhouse/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:683:2402)\n at file:///Users/polymathpubhouse/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:582:11763\n at Q (file:///Users/polymathpubhouse/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:526:17069)\n at iP2 (file:///Users/polymathpubhouse/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:2269:9363)\n at ZE (file:///Users/polymathpubhouse/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:142:19803)\n at WT (file:///Users/polymathpubhouse/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:144:42551)","timestamp":"2025-06-05T01:21:27.061Z"},{"error":"Error: 429 {\"type\":\"error\",\"error\":{\"type\":\"rate_limit_error\",\"message\":\"This request would exceed your account's rate limit. Please try again later.\"}}\n at Y5.generate (file:///Users/polymathpubhouse/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1367:12782)\n at Jw.makeStatusError (file:///Users/polymathpubhouse/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1382:2082)\n at Jw.makeRequest (file:///Users/polymathpubhouse/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1382:5257)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)\n at async ve.showErrors (file:///Users/polymathpubhouse/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1654:20326)\n at async ve (file:///Users/polymathpubhouse/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1654:12078)\n at async bz2 (file:///Users/polymathpubhouse/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1654:20189)\n at async file:///Users/polymathpubhouse/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1654:16876\n at async Ro1 (file:///Users/polymathpubhouse/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1654:5204)\n at async fd (file:///Users/polymathpubhouse/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1654:16846)","timestamp":"2025-06-05T01:21:28.297Z"},{"error":"Error: 429 {\"type\":\"error\",\"error\":{\"type\":\"rate_limit_error\",\"message\":\"This request would exceed your account's rate limit. Please try again later.\"}}\n at Y5.generate (file:///Users/polymathpubhouse/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1367:12782)\n at Jw.makeStatusError (file:///Users/polymathpubhouse/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1382:2082)\n at Jw.makeRequest (file:///Users/polymathpubhouse/.claude/local/node_modules/@anthropic-ai/claude-code/cli.js:1382:5257)\n at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","timestamp":"2025-06-05T01:23:14.701Z"}]
Facing similar issue.
was just having the same bug. do you happen to have an anthropic API key in as an environment variable (whether you selected to use it or not)? because what fixed it for me is commenting out my anthropic api key in my zshrc
Yes, correct. ANTHROPIC_API_KEY. Thanks for the pointers. I still need it for non-claude code usage. Temporarily removed the env and run claude again will show the prompt to relogin. Seems like /login and /logout is available once I'm logged in via subscription, but missing when the API key is present.
You can resolve this by temporarily unsetting the environment variable:
unset ANTHROPIC_API_KEY
claude
This will disable API key-based auth for the session and trigger the CLI to show the interactive login prompt (/login).
I've been hit by this also. Thinking about it, it is a big issue. I'm using ANTHROPIC_API_KEY for a ton of other stuff so managing it is a lot of trouble. Moreover there is no mention in the welcome message about if I'm using the API key or my subscription which makes this issue very problematic.
I think the only solution is to make using both seamless:
- Always have the /login command available
- Clearly state if you're logged in
- If hitting a limit offer to switch to pay-as-you-go
Looks like I've made some wrong assumptions. When the API key is there, the /login /logout commands are missing but the subscription is used if already logged in.
Consolidating this one onto #1582 - apologies for the multiple redirects.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.