Two Claude Code accounts on one Mac
Claude Code can run with two accounts at once, and it needs no extra app to do it. It keeps its settings, history and sign-in in a config folder, ~/.claude unless CLAUDE_CONFIG_DIR names another, and on a Mac it keeps a separate Keychain sign-in for each config folder. Give each account a folder of its own and both stay signed in, in two terminals at once.
On this page
In Terminal, with nothing else installed
- Add an alias for the second account to
~/.zshrc:alias claude-work='CLAUDE_CONFIG_DIR=~/.claude-work claude'. - Open a new terminal, run
claude-work, and sign in with/loginusing the work account. Its sign-in is kept for that folder. - Run
claudein another terminal for your own account. Both run at once, each with its own settings, history and sign-in.
Anthropic's own docs suggest this alias. Keep plain claude, with CLAUDE_CONFIG_DIR unset, for your usual account rather than pointing the variable at ~/.claude: Claude Code goes by the path as you wrote it, so an explicit ~/.claude can read as a different, signed-out account.
Where each sign-in is kept
On a Mac, Claude Code keeps its sign-in in your login keychain. With CLAUDE_CONFIG_DIR unset, the item is called Claude Code-credentials. With it set, the name gets a short hash of the folder's path: Claude Code-credentials- and the first 8 hex digits of the SHA-256 of the path. So each config folder has a keychain item of its own, and signing in or out in one never touches another.
To see which item a folder uses: printf %s "$HOME/.claude-work" | shasum -a 256 | cut -c1-8 prints the 8 digits, and Keychain Access finds the item by its name. Deleting a config folder leaves its keychain item behind; delete that in Keychain Access too if you're done with the account.
What each folder keeps
- Separate: the sign-in, settings, CLAUDE.md, skills, plugins, MCP servers, memory and session history.
- Shared: your projects and files, and everything outside the folder: your git identity, SSH keys, gh sign-in and cloud credentials.
- Usage: each account uses its own plan's limits.
Nothing carries over to a new folder by itself, so copy in the settings, skills or MCP servers you want the second account to have, or link them (below).
Folders that pick the account
Typing claude-work in the right place is easy to forget. With Parallex Pro, a folder can pick the account for you: bind ~/work to a workspace, and every claude started inside it uses the workspace's config folder, while claude anywhere else is yours. git, gh and cloud tools switch with it.
- Give a workspace its own Claude Code (and Codex):
parallex workspace persona Acme --item .claude --item .codex. - Bind the folder:
parallex bind ~/work Acme. - Add the hook to
~/.zshrc, once:eval "$(parallex hook zsh)". Thencd ~/work, runclaudeand/loginwith the work account.
Folder binding has the details, bash and fish included. It's part of Pro, which is free for now.
Your setup in both
With Parallex Pro, the second account can use your CLAUDE.md, rules, skills, agents, commands, output styles and plugins, while its sign-in, history, settings and MCP servers stay its own: parallex workspace persona Acme --share-setup on, or Share my Claude setup on a second Claude app. Each shared item is a link to yours, and the account's own version is kept beside it. One Claude setup, every Claude account.
And the menu bar can show how much each account used today and in its 5-hour window, estimated from Claude Code's own logs on your Mac: usage for each account.
The Claude app, and a terminal that's always work
The Claude app, twice. The Claude desktop app has Claude Code built in, and it reads ~/.claude too. A second Claude made from Parallex's Claude template signs in to your other account and gets a Claude Code config of its own, so Claude Code in it signs in as that account. Two Claude accounts on one Mac has the details.
A terminal that's always the work account. Rather than a folder, give work a terminal of its own: a second Ghostty with its own Dock icon and color, with CLAUDE_CONFIG_DIR set in its environment (parallex edit "Ghostty Work" --env CLAUDE_CONFIG_DIR=$HOME/.claude-work). Every claude started in it is the work account. Don't also export the variable in ~/.zshrc, or that one wins. Two Ghostty terminals.
Agents with their own account. An agent workspace gives an AI agent its own Claude Code config, git author, signing key and GitHub token, so its work never runs under yours.
Questions
Can two Claude Code accounts run at the same time?
Yes. With a different CLAUDE_CONFIG_DIR, each session reads its own settings and sign-in, so a work and a personal session can run side by side in two terminals.
Where does Claude Code keep each account's sign-in on a Mac?
In the login keychain, one item per config folder. Your usual ~/.claude uses Claude Code-credentials; a folder named by CLAUDE_CONFIG_DIR uses Claude Code-credentials- followed by the first 8 hex digits of the SHA-256 of its path. That's why the two accounts don't sign each other out.
Do I need Parallex for this?
No. For Claude Code in Terminal, the CLAUDE_CONFIG_DIR alias is all it takes. Parallex helps when you want folders that pick the account, your skills and CLAUDE.md in every account, usage for each, or the Claude desktop app twice.
Why does the second account ask me to sign in again?
Its folder is new, so it has no sign-in yet: run /login once in it. If plain claude asks too, check that CLAUDE_CONFIG_DIR isn't set in your shell for your usual account.
Or in Terminal
curl -fsSL https://parallex.mandip.dev/install | shOr with Homebrew
brew install --cask mandipadk/parallex/parallex