← Notes

Two concurrent Claude Code profiles on Mac

Claude Code keeps all its state in one directory, ~/.claude, by default. It is one login per machine. Use CLAUDE_CONFIG_DIR and point this environment variable somewhere else and Claude Code treats that directory as a fully separate installation, with its own login:

CLAUDE_CONFIG_DIR="$HOME/.claude-personal" claude

The following will create a bare second profile with stock defaults:

mkdir -p ~/.claude-personal
echo "alias claude-personal='CLAUDE_CONFIG_DIR=\"\$HOME/.claude-personal\" claude'" >> ~/.zshrc
source ~/.zshrc
claude-personal    # then /login

Where credentials actually live

The one part that isn't obvious: there is no credentials file on macOS. Claude Code stores the OAuth token in the Keychain, and the service name it uses is derived from the config directory path:

Config dir Keychain service name
~/.claude (default) Claude Code-credentials
any other path Claude Code-credentials-<hash>

This is why two profiles never evict each other's login: each one gets its own Keychain entry, addressed by a hash of its own path. One consequence worth knowing: renaming a profile directory logs it out, since the hash changes and Claude Code looks for a Keychain entry that no longer exists. Pick the directory name once.

Note: if you want to copy the settings from your original Claude profile, just copy-pasting settings.json, hook scripts, and plugin manifests won't work because they store absolute paths back to the original profile. Instead, ask a Claude agent in the new profile to copy the settings that you want.