[Bug] Persistent login prompts despite repeated auth logout/login cycles
Bug Description
I'm intermittently and repeatedly prompted to /login again mid-session, even though I've fully run claude auth logout and claude auth login and confirmed the login succeeded. This started right after I was added to a Team organization — my account now has both a Personal Pro account and a Team account under the same email, and I explicitly selected the Team account during login.
The prompt reappears at unpredictable points during an active session (not just at the start of a new terminal/session), which suggests the session's auth/token state is being invalidated or is flip-flopping between the two accounts rather than a normal expiry.
Steps to Reproduce
- Have an email with both a Personal Pro subscription and a Team org membership.
- Run
claude auth logout, thenclaude auth loginand select the Team account. - Use Claude Code normally in a session.
- At a random point mid-session (no fixed time interval observed), Claude Code prompts to
/loginagain, even though auth was never explicitly invalidated.
Expected Behavior
Once logged into the Team account, the session should remain authenticated as Team until an explicit logout, token expiry, or org-side revocation — it should not spontaneously fall back to re-prompting for login mid-session.
Actual Behavior
Repeated, unpredictable re-prompts to log in again, despite claude auth logout + claude auth login cycles completing successfully each time.
Suspected Cause
Possible auth-state confusion/race between the Personal Pro and Team credentials for the same email — e.g. the client may be caching or overwriting the wrong account's token, or a background refresh is picking the wrong account.
Environment / Debug Info
- Platform: win32 (Windows 11)
- Terminal: windows-terminal
- Claude Code version: 2.1.259 (commit 9b549c8d1c72)
- Install method: native (
C:\Users\holmes0527\.local\bin\claude.exe) - Auto-updates: enabled, channel
latest - Feedback ID: 6246ebf2-b285-4889-adc0-28a86ba83cad
claude auth statusoutput when the session is (currently) working correctly:
``json``
{
"loggedIn": true,
"authMethod": "claude.ai",
"apiProvider": "firstParty",
"analyticsDisabled": false,
"projectsDirectory": "C:\\Users\\<user>\\.claude\\projects",
"email": "<redacted>",
"orgId": "<redacted>",
"orgName": "<redacted>",
"subscriptionType": "team"
}
(Note: this looks correct when checked right after logging in — the problem is that mid-session, Claude Code still prompts to log in again despite this reporting a healthy Team-authenticated state.)
- Account setup: one email with two subscriptions — Personal Pro and Team — Team was selected explicitly at login.
claude doctorreports no installation issues; Remote Control is disabled by org policy (unrelated).
Errors
[]