Feature Request: Named account profiles for quick switching between multiple claude.ai accounts
Feature Request
Problem:
Users who have multiple claude.ai accounts (e.g., personal and work) currently have no way to switch between them without going through a full browser-based /login OAuth flow each time. There is no profile or session management system.
Requested Feature:
Add named account profile support so users can switch accounts from the command line, for example:
claude login --profile work # logs in and saves as 'work' profile
claude login --profile personal
claude --profile work # launch with work account
claude --profile personal # launch with personal account
Or a simpler shorthand like /login <profile-name> within the interactive session.
Current Workaround:
Manually swapping ~/.claude.json files — fragile and not user-friendly.
Why this matters:
Many developers maintain separate accounts for different contexts (personal projects, employer, client work). Forcing a full browser re-authentication every time is a significant friction point.
Environment:
- macOS (credentials stored in Keychain)
- Claude Code CLI
Showing cached comments. Read the full discussion on GitHub ↗
7 Comments
Built exactly this — named profiles with instant switching:
Shell integration adds a one-step shortcut:
Sessions, tokens, MCP servers, settings — all preserved per profile. 700+ downloads in the first day.
https://github.com/synth1s/cloak
As others have mentioned here and in other threads, it can be accomplished with
CLAUDE_CONFIG_DIRenvironment variable. I wrote a 1 minute article about my minimal setup, which requires no dependency, hopefully it could be of help: articleHi,
I ran into the same problem and there are a lot of tools out there for macOS or Linux that already tackle this problem.
Sadly there was no good tooling to manage Anthropic accounts on Windows... so I built this:
https://github.com/countzero/windows_switch_claude_account
<img width="1018" height="547" alt="Image" src="https://github.com/user-attachments/assets/c8d044fd-0a07-43f3-8400-38646969f2aa" />
Maybe this helps someone :wink:
No browser
/loginneeded. I builtaistatto keep each account in its own keychain item and rewrite the liveClaude Code-credentialsitem in place, so the nextclaudeinvocation just picks up the switch:Usage reporting is the other half — it lists every stored account so you can see who has room:
cloak and windows_switch_claude_account are more featureful for Claude alone; aistat's angle is one binary that also reports and switches Codex, with JSON output for statuslines by default.
https://github.com/drogers0/aistat
+1 — concrete use case: I'm a product designer who ships in code for two different clients, and I brought the Claude Code workflow to both on the design part. Each client has its own Claude account (different emails). Today switching means a full logout and browser login every time I change project — and sometimes I'd simply like to run two sessions in parallel, one per client, which a single logged-in account can't do. Both accounts are already paid — this is purely a workflow gap. A profile switcher (like
gh auth switchor Google's account menu) would remove the friction. TheCLAUDE_CONFIG_DIRworkaround helps in the terminal, but the desktop app doesn't support it (#25762).Adding the desktop-app dimension to this, since the most recent comment touches on it.
I have two accounts on the same email — a business (Team) seat and a personal plan — and I use the Claude desktop app for chat, not only the CLI. Toggling profiles from the account menu breaks an in-flight conversation.
Worth being precise about the failure mode, because it differs from how #68441 described it. The conversation is not lost. It survives on the original profile, and switching back shows it fully intact. What's broken is the generation: the interrupted response never resumes. The conversation just sits there stopped, and I have to manually ask it to continue. So it's an orphaned turn with no resume, not data loss — and there's still no way to carry a conversation across profiles, or to keep both accounts live at once.
Why I'm posting here rather than opening a dedicated issue: #68441 asked for precisely this (conversation continuity across Team → Personal in the desktop app) and was closed as
invalid/ not-planned — "doesn't seem to be related to Claude Code." That may be right for this repo's scope, but the practical effect is that desktop-app profile switching has no venue at all, so the profile-management request here is the nearest live thread.Three things that would resolve it, in priority order:
CLAUDE_CONFIG_DIRhonoured by the desktop app (#25762) — the terminal workaround described in this thread doesn't reach the desktop app.Both accounts are paid; this is purely a workflow gap.
Adding the piece that isn't in this thread yet, because it explains why none of the tools posted above can do what @RajeshGoradia and @alexandraapituru are asking for.
Everything linked here —
cloak,aistat,windows_switch_claude_account, the plainCLAUDE_CONFIG_DIRrecipe — is a switcher. They rewrite one shared thing (theClaude Code-credentialsKeychain item, or which config dir is active) so the nextclaudeinvocation comes up as a different identity. That's the right design for the CLI and they do it well. But it means one account is live at a time by construction, and none of it reaches the desktop app, which is a separate Electron app with its own profile directory and doesn't readCLAUDE_CONFIG_DIR(#25762).For "both live at once" you need isolation rather than switching — a second copy of the official app with its own
--user-data-dir, which Electron treats as a fully separate profile:That gives you a second window with its own history, settings and connectors. Then sign-in splits by platform, and this is the part that surprised me:
claude://…sso-callbackdeep link, and the protocol handler starts a freshClaude.exewith no--user-data-dir. Claude also holds no single-instance lock. So the callback lands in the default profile instead of the window you started the login from. That break happens outside the profile, which is why a per-profile data dir alone can't fix it.Practical upshot on Windows: the free recipe above gets you isolated windows, but the second one may never finish signing in — specifically for SSO and Google. Email + password is fine.
@RajeshGoradia — your option 1 is exactly what isolation gives you, and it does dissolve the orphaned-turn problem, because you never switch. Worth flagging that your option 3 wouldn't get you there though:
CLAUDE_CONFIG_DIRis the CLI's config, so honouring it wouldn't give the desktop app profiles.Disclosure: I package this — https://deckspace.dev/claude-accounts/?src=gh-27359 ($14 one-time, Mac + Windows, unofficial, not affiliated with Anthropic, full source in the download, 7-day refund). The part that took real work was routing those Windows callbacks back to the profile that asked for them. Rather than take my word for it: @weineran posted his own results over in #18435 after using it with a personal Google account and his work SSO — https://github.com/anthropics/claude-code/issues/18435#issuecomment-5028823644
To be clear about scope: if you're on macOS, or you sign in with email + password, the recipe above is free and it works — use that, or one of the tools already linked in this thread. The Windows SSO callback is the only thing I'd claim is genuinely different.
All of it is duct tape over a missing feature, though. Native profiles in the app is what this thread actually wants — #18435 is the biggest live thread on that if anyone wants to add weight to it.