[FEATURE] Multi-account support for switching between subscriptions
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
I have two Claude subscriptions — a personal one and one through my company. When working on personal projects I want to use my personal account, and when working on company projects I want to use my work account.
Currently, the only way to switch between subscription-based accounts is to /logout and go through the full OAuth login flow again. This adds friction every time I context-switch between personal and work projects, which happens multiple times a day.
The API key workaround (using ANTHROPIC_API_KEY env var) doesn't apply here since both accounts are subscription-based (Pro/Max/Teams), not API-key-based.
Proposed Solution
Account management commands similar to gh auth (GitHub CLI):
claude auth list— show all authenticated accountsclaude auth switch— interactively pick an accountclaude auth add— authenticate an additional account without logging out- Per-directory default account via settings (e.g.,
~/.claude/settings.json):
``json``
{
"accountDefaults": {
"~/work/**": "work@company.com",
"~/personal/**": "me@gmail.com"
}
}
This way, Claude Code automatically uses the right account based on which project directory I'm in, with the ability to override manually.
Alternative Solutions
/logoutand re-login each time — works but adds ~10-15 seconds of friction per switch and breaks flow- Converting one subscription to API key usage — loses subscription benefits and adds separate billing
- Running separate OS user profiles — too heavyweight for this use case
- Using one account in CLI and the other on claude.ai web — limits flexibility
Priority
High - Significant impact on productivity
Feature Category
CLI commands and flags
Use Case Example
- I'm working on a company project in
~/work/backend-serviceusing my work subscription - A friend messages me about a bug in our open-source side project
- I open
~/personal/oss-projectand runclaude - Currently: I have to
/logout, re-authenticate with my personal account, do the work, then/logoutagain and re-authenticate with work - With this feature: Claude Code detects I'm in
~/personal/and automatically uses my personal account — or I just runclaude auth switchand pick it from a list
Additional Context
Prior art:
gh auth login/gh auth switch(GitHub CLI) — supports multiple accounts nativelygcloud config configurations(Google Cloud CLI) — named config profiles with account switching- Git itself — per-directory user config via
.gitconfigincludeIf
Both stored credentials could live in macOS Keychain under separate entries keyed by account email.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗