[BUG] Simultaneous accounts session collision in Claude Code CLI
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?
A recent update to Claude Code has completely broken parallel workflows when using multiple accounts. Previously, it was possible to run simultaneous development tasks using two separate accounts in different terminal windows.
Now, the CLI seems to share a single global state or authentication token across all instances. When I log into a second account in Terminal B, Terminal A silently switches to this second account's identity instead of staying on the first account. This completely corrupts the ongoing context of Terminal A, mixes up account permissions, prevents me from completing the initial task, and messes up my message limits.
What Should Happen?
Different terminal windows/sessions should maintain isolated authentication states. Activating or logging into an account in one terminal should not affect, alter, or hijack the identity/account currently in use by an active Claude Code instance in another terminal.
Error Messages/Logs
Steps to Reproduce
Open Terminal A, authenticate with Account 1, and initiate a long-running development task.
Open Terminal B and authenticate with Account 2 to start a parallel task.
Return to Terminal A: the active session has now silently switched to Account 2's context, disrupting the initial workflow and causing data/context loss.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.80 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗