Two Claude Code accounts on one laptop
I’ve got a personal Max subscription and a seat on a company Team plan, and both get used from this laptop, sometimes in the same hour. For months I just ran /login when I needed to switch. It works fine. It’s also worse than it looks, because the account isn’t the only thing that changes.
Everything Claude Code remembers about you lives in ~/.claude:
| Path | What it is |
|---|---|
settings.json | permissions, hooks, status line, enabled plugins |
CLAUDE.md | user-level instructions loaded into every session |
.claude.json | the live account record, MCP server config, per-project state |
projects/ | full session transcripts, per project |
history.jsonl | prompt history |
plugins/, skills/ | installed extensions |
sessions/, tasks/, plans/ | in-flight work |
Log out and back in as someone else and that’s all still the same directory. You’ve changed the name on the filing cabinet without getting a second cabinet.
The setup
CLAUDE_CONFIG_DIR overrides where Claude Code looks for that directory, so give each account its own and point at it from a shell function. Mine, in ~/.zshrc:
# Claude Code: two accounts (personal + work)
claude-personal() { CLAUDE_CONFIG_DIR="$HOME/.claude" command claude "$@"; }
claude-work() { CLAUDE_CONFIG_DIR="$HOME/.claude-work" command claude "$@"; }
# Safety net: bare `claude` reminds you to pick a profile
claude() { echo "Use claude-personal or claude-work"; }
command claude is doing real work there. Drop it and the function calls itself forever.
That third line is the one I’d argue for hardest, and it’s the one people leave out. Your fingers already know how to type claude, and if that keeps working it’ll quietly resolve to whatever the default directory is, which for me is the personal one. So client work would land on my personal plan and I wouldn’t notice for a week. Breaking the bare command means the mistake is impossible rather than merely unlikely.
Each function opens its own browser login the first time. After that they both stay signed in. I haven’t typed /login since.
What the two directories look like a while later
The interesting part isn’t the config, it’s what shows up in each one on its own.
My work profile has a policy-limits.json and a usage-data/ directory. The personal profile has neither. That’s Team plan administration being pushed down to the seat, and it only exists where the seat lives. Under a single shared directory, org policy would have been applying to my weekend projects too.
Going the other way, the personal profile has grown chrome/, ide/, daemon/ and jobs/ directories that the work one doesn’t have, because that’s where I try things out. I didn’t plan either of those splits. They just happened, which is sort of the point: the directories end up being an honest record of what each account was actually used for.
Things that bit me
There’s a ~/.claude.json sitting in your home directory, next to ~/.claude/, left over from an older layout. Mine is 71 KB and completely inert. The one that matters is ~/.claude/.claude.json, 50 KB. I spent a while poking at the wrong file trying to work out why a setting wasn’t applying, so: check which one you’ve opened.
Shell functions only cover you when you’re typing in an interactive shell. The IDE extension, cron, CI, anything that execs the binary directly, all of it goes to the default config directory no matter which function you last ran. If any of that is part of your workflow you need to set CLAUDE_CONFIG_DIR there separately. This is the leakiest part of the whole approach and I don’t have a tidy answer for it.
MCP servers with an interactive OAuth flow need authorizing once per profile. Linear and Atlassian in my case. That’s correct behaviour, and it’s also a slightly embarrassing inventory of how many integrations you’d accumulated without noticing.
And when in doubt, /status prints the active account and plan. Reading the email address takes two seconds and beats reasoning about which command you typed.
Worth it?
One account, no, this buys you nothing.
Two accounts and a switch more than once a week, it’s a five minute change. Mostly it removes small annoyances rather than real problems: work billed to the wrong plan, a session transcript you can’t find because it’s in the other identity, hitting a limit on the personal account while a perfectly good Team seat sits idle. I’d been putting up with all three for months before I bothered.