[FEATURE] Support for multiple accounts / profiles
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 a work account (managed by my company) and a personal account. Currently I need to run claude logout / claude login every time. I want to switch between them, which is tedious and time-consuming.
Proposed Solution
A flag like --profile or --user to switch between accounts:
claude --profile=work
claude --profile=personal
Each profile would store its own credentials separately, so login is only needed once per profile.
Alternative Solutions
Alternatively, supporting a CLAUDE_CONFIG_DIR environment variable to point to separate credential directories would also work.
Priority
Low - Nice to have
Feature Category
CLI commands and flags
Use Case Example
As a developer, I use Claude Code at work on company projects with a company-managed account, and at home for personal side projects with my own personal account — both on the same machine.
Currently my workflow is:
- claude logout
- claude login (with the other account)
- Work
- claude logout
- claude login (back to the first account)
Desired workflow:
- claude --profile=work (for work projects)
- claude --profile=personal (for personal projects)
No logout/login needed after initial setup.
Additional Context
_No response_
21 Comments
Running two separate paid subscriptions just because there's no profile support. Web switching is manual, mobile has no workaround at all. This is pushing me toward other tools for separate use. Named profiles with per-profile connector configs would fix this.
+1 for this feature!
I'm paying $330/month for two Max Plan subscriptions (personal + work accounts).
The current experience is very frustrating:
I investigated implementing a workaround using
CLAUDE_CONFIG_DIR, but since credentials are stored in macOS Keychain globally (not per config directory), true multi-account support requires official implementation.This is critical for developers who have both personal and work subscriptions on the same machine.
Concrete use case: I'm on a Team plan through my org (which has Remote Control disabled), and I have a personal Max subscription for Remote Control. On macOS, there's no way to run both simultaneously:
CLAUDE_CODE_OAUTH_TOKENenv var is silently ignored on macOS — CC always reads from KeychainCLAUDE_CONFIG_DIRredirects~/.claude/but doesn't isolate the Keychain entry (Claude Code-credentials)Current workaround: A Keychain swapper script (
security delete-generic-password+security add-generic-password) that saves/restores tokens per profile. Running sessions survive the swap (CC loads auth into memory at startup), so you can have one terminal on Team and launch a second on Personal — but you can't start new sessions while the swap is active.What would fix this: Either (a)
--profile <name>flag that reads from a named Keychain entry, or (b) makeCLAUDE_CODE_OAUTH_TOKENactually work on macOS (it currently doesn't override Keychain auth). Option (b) would also unblock CI/CD and automation use cases.I built an open-source CLI that solves this using
CLAUDE_CONFIG_DIR:Each account gets its own isolated directory. Sessions, tokens, MCP servers, and settings are fully preserved across switches. Supports concurrent sessions in different terminals.
Shell integration adds
claude -a workas a one-step shortcut.https://github.com/synth1s/cloak
Claude already writes separate keychain entries if you use
CLAUDE_CONFIG_DIR.<img width="524" height="46" alt="Image" src="https://github.com/user-attachments/assets/09db321c-c90d-4e73-bdc0-80cc208ca7e6" />
You already identified the exact mechanism
That's precisely what I did with
aiswforclaude codesupport. Manages profile directories under~/.aisw/profiles/claude/<name>/and setsCLAUDE_CONFIG_DIRvia shell hook on switch.No logout/login after initial setup. Also supports Codex CLI and Gemini CLI.
Docs: https://burakdede.github.io/aisw/
it would be nice if multiple accounts was also possible in Claude Desktop
Until this lands natively, CCM handles multi-account management as a standalone tool.
The feature I've found most useful is project-to-account bindings with a shell hook:
\
\\`bashccm bind ~/Work team-account
ccm bind ~/Personal personal-account
eval "\$(ccm hook)" # add to .zshrc
Now cd ~/Work auto-switches to your team account
\
\\`Also includes session cleanup (9 targets), environment snapshots, permissions audit, and health diagnostics. Single bash script, no Node/Python needed.
Install: \
curl -fsSL https://raw.githubusercontent.com/dr5hn/ccm/main/install.sh | bash\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: articleQuick update - CCM just shipped v4.0 with concurrent sessions support.
You can now run
ccm switch --isolated workto create a CLAUDE_CONFIG_DIR-based profile, so you can have different accounts in different terminals at the same time. No more logout/login dance.It also has auto rate-limit switching now - if your 5-hour quota is getting close,
ccm watch --threshold 85 --autowill rotate to your next account automatically.https://github.com/dr5hn/ccm
For anyone investigating workarounds: on macOS, credentials are stored in Keychain under service
Claude Code-credentialswith a fixed account name (your OS username). This meansCLAUDE_CONFIG_DIRalone won't isolate auth — both instances hit the same keychain entry.A
--profileflag (or respectingCLAUDE_CONFIG_DIRfor credential storage too, e.g. file-based credentials when a custom config dir is set) would solve this cleanly.do we have multiple accounts support for claude code VS Code extension??
+1 — this is a daily pain point for me.
My use case: I'm a hired developer with my own side projects. I constantly switch between my personal account (side projects) and my organization account (work). Currently this means full logout/login cycle, losing session context every time.
What I'd love to see (CLI + Desktop):
claude auth add <alias>— register multiple accountsclaude auth switch <alias>— instant switch, no OAuth re-flow.claude/profileor insettings.local.json) — entering a work repo auto-activates the work accountPer-directory auto-switch is the killer feature. I have 5+ repos across 2 accounts. Manual switching per
cdis unsustainable.ghCLI doesn't have this either — Claude Code could lead here.Current workaround:
CLAUDE_CONFIG_DIRper terminal, but it's fragile (doesn't work in VS Code per #34888, broken on Linux per #47661) and doesn't cover Desktop at all.@somework tries "cloak" created by @goulartfs . I'm using it for my work/home accounts. It is a very good.
(meanwhile, we are waiting antropic solution xd)
@AlbertoGarau one the most problem for this - tooling around claude. Most of tools and plugins(that's not brings by /plugin) are uses strict ~/.claude directory in docs and toolings.
But really thanks for this tool - it is helpful)
+1 Would be nice to have a switch option between personal and work related sessions
+1 Same problem, switching would be a life-saving. I would be using way more Claude if I could control the credentials used at the project level. Today I need to stop working on one or another because of the fear of using my work account for a personal project, witch are not related at all in the slightest. Controlling the profile, I would have terminals open for both kinds of projects running in the background, as intended. I don't even upgrade my account because of that, I can't efficiently manage my agents working on stuff because I need to be watching incurring in the work / personal mix.
+1 for this feature. GitHub has this. Why not Claude-Code.
The root cause is that the
Claude Code-credentialskeychain item is a global singleton, which is whyCLAUDE_CONFIG_DIRalone doesn't isolate auth on macOS. I builtaistatto work around exactly that: it gives each account its own keychain item and rewrites the live singleton in place when you switch:It also reports usage across every stored account, so you can see who has headroom before flipping:
cloak/aisw/ccm are more polished on the Claude-only side; aistat's niche is being one binary that also switches Codex and reports Copilot, with JSON output by default so statuslines, hooks, and agent routers can consume it.
https://github.com/drogers0/aistat
Please, @anthropics can you make it?)
You can use my solution for this https://github.com/yarikleto/claude-profile