[FEATURE] Support for multiple accounts / profiles

Open 💬 21 comments Opened Feb 11, 2026 by AlbertoGarau

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:

  1. claude logout
  2. claude login (with the other account)
  3. Work
  4. claude logout
  5. claude login (back to the first account)

Desired workflow:

  1. claude --profile=work (for work projects)
  2. claude --profile=personal (for personal projects)

No logout/login needed after initial setup.

Additional Context

_No response_

View original on GitHub ↗

21 Comments

maxklimen · 4 months ago

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.

Seungwoo321 · 4 months ago

+1 for this feature!

I'm paying $330/month for two Max Plan subscriptions (personal + work accounts).

The current experience is very frustrating:

  1. No per-session account binding - Cannot assign different accounts to different terminal sessions
  2. Global credential sync - Changing account in one session affects ALL other sessions
  3. Mass re-login required - When one session hits its limit, ALL sessions require re-authentication

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.

prodan-s · 4 months ago

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_TOKEN env var is silently ignored on macOS — CC always reads from Keychain
  • CLAUDE_CONFIG_DIR redirects ~/.claude/ but doesn't isolate the Keychain entry (Claude Code-credentials)
  • The Keychain entry is a global singleton — switching accounts affects all terminals

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) make CLAUDE_CODE_OAUTH_TOKEN actually work on macOS (it currently doesn't override Keychain auth). Option (b) would also unblock CI/CD and automation use cases.

goulartfs · 4 months ago

I built an open-source CLI that solves this using CLAUDE_CONFIG_DIR:

npm install -g @synth1s/cloak
cloak create work        # save current session
cloak create home        # save another
cloak switch work        # instant switch, no logout needed

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 work as a one-step shortcut.

https://github.com/synth1s/cloak

brandon-fryslie · 3 months ago

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" />

burakdede · 3 months ago

You already identified the exact mechanism

Alternatively, supporting a CLAUDE_CONFIG_DIR environment variable to point to separate credential directories would also work.

That's precisely what I did with aisw for claude code support. Manages profile directories under ~/.aisw/profiles/claude/<name>/ and sets CLAUDE_CONFIG_DIR via shell hook on switch.

aisw add claude work        # runs claude login with CLAUDE_CONFIG_DIR pointed to profile dir
aisw add claude personal
aisw use claude work        # exports CLAUDE_CONFIG_DIR=~/.aisw/profiles/claude/work

No logout/login after initial setup. Also supports Codex CLI and Gemini CLI.

Docs: https://burakdede.github.io/aisw/

facewindu · 3 months ago

it would be nice if multiple accounts was also possible in Claude Desktop

dr5hn · 3 months ago

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:

\\\`bash
ccm 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\

yamanidev · 3 months ago

As others have mentioned here and in other threads, it can be accomplished with CLAUDE_CONFIG_DIR environment variable. I wrote a 1 minute article about my minimal setup, which requires no dependency, hopefully it could be of help: article

dr5hn · 3 months ago

Quick update - CCM just shipped v4.0 with concurrent sessions support.

You can now run ccm switch --isolated work to 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 --auto will rotate to your next account automatically.

https://github.com/dr5hn/ccm

lionel-panhaleux · 3 months ago

For anyone investigating workarounds: on macOS, credentials are stored in Keychain under service Claude Code-credentials with a fixed account name (your OS username). This means CLAUDE_CONFIG_DIR alone won't isolate auth — both instances hit the same keychain entry.

A --profile flag (or respecting CLAUDE_CONFIG_DIR for credential storage too, e.g. file-based credentials when a custom config dir is set) would solve this cleanly.

JenuelDev · 3 months ago

do we have multiple accounts support for claude code VS Code extension??

somework · 3 months ago

+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):

  1. claude auth add <alias> — register multiple accounts
  2. claude auth switch <alias> — instant switch, no OAuth re-flow
  3. Per-directory binding (.claude/profile or in settings.local.json) — entering a work repo auto-activates the work account
  4. Desktop: account switcher dropdown (like Slack workspaces)

Per-directory auto-switch is the killer feature. I have 5+ repos across 2 accounts. Manual switching per cd is unsustainable. gh CLI doesn't have this either — Claude Code could lead here.

Current workaround: CLAUDE_CONFIG_DIR per 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.

AlbertoGarau · 3 months ago

@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)

somework · 2 months ago

@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)

notej-k · 2 months ago

+1 Would be nice to have a switch option between personal and work related sessions

aferrercrafter · 2 months ago

+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.

mark-stellis · 1 month ago

+1 for this feature. GitHub has this. Why not Claude-Code.

drogers0 · 1 month ago

The root cause is that the Claude Code-credentials keychain item is a global singleton, which is why CLAUDE_CONFIG_DIR alone doesn't isolate auth on macOS. I built aistat to work around exactly that: it gives each account its own keychain item and rewrites the live singleton in place when you switch:

$ aistat switch --to work
switched to work@example.com (uuid 5e9c1a47-3b8f-42d1-a6e0-7c2f9b4d8e13); was personal@example.com

It also reports usage across every stored account, so you can see who has headroom before flipping:

$ aistat -h
Claude usage
- personal@example.com (active) [Max 5x]
  - 5-hour: 92.0% (resets in 4h 53m)
  - 7-day: 71.0% (resets in 2d 5h)
- work@example.com [Max 20x]
  - 5-hour: 4.0% (resets in 4h 12m)
  - 7-day: 12.0% (resets in 5d 9h)

Codex usage
- personal@example.com (active) [Pro]
  - 5-hour: 25.0% (resets in 5h 16m)
  - 7-day: 18.0% (resets in 4d 18h)

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

makhnanov · 1 month ago

Please, @anthropics can you make it?)

yarikleto · 1 month ago

You can use my solution for this https://github.com/yarikleto/claude-profile