SwitchEarly access
← All guides
Claude Code

Run multiple Claude Code accounts on one Mac

Give each Claude Code account its own configuration folder. Anthropic documents this: point CLAUDE_CONFIG_DIR at a different folder per account, and each keeps its own settings, session history and sign-in, so both can stay signed in at the same time.

A guide from Switch, an independent Claude Desktop profile manager. Switch is in early access ahead of its public release.

Use one configuration folder per account

By default Claude Code keeps everything for one account in ~/.claude, so logging in as someone else replaces the first login. Anthropic’s documented fix is to give each account its own configuration directory with the CLAUDE_CONFIG_DIR environment variable (Claude Code docs).

Add an alias to ~/.zshrc for each extra account. Your existing login stays on plain claude:

alias claude-work='CLAUDE_CONFIG_DIR=~/.claude-work claude'

Open a new Terminal window and run claude-work. The first time, Claude Code walks you through signing in to that account. After that, claude and claude-work stay signed in to different accounts and can run at the same time in separate windows.

What each folder keeps separate

Each configuration directory has its own settings, session history and claude.ai login or API key. On a Mac, Claude Code stores the login in the Keychain and keys that entry to the directory, so a session with a different CLAUDE_CONFIG_DIR reads a different login.

Project files are different: CLAUDE.md and a repository’s .claude folder belong to the project, so every account sees them. One exception from Anthropic’s docs: separate folders don’t keep two Claude Console sign-ins made without an API key apart, because Claude Code stores that kind of sign-in outside the folder.

Check nothing overrides your login

Some environment variables take priority over a /login sign-in in every folder. If ANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN or CLAUDE_CODE_OAUTH_TOKEN is exported in your shell profile, every account uses it instead, and the API key bills per use rather than through your plan (authentication precedence).

Run /status inside each session to see which account and login method is active. If an API key is winning when you meant to use your subscription, remove the export from ~/.zshrc and open a new window.

Keep skills and MCP servers in step

Because each folder is a full Claude Code setup, skills, plugins and MCP servers you add in one account don’t appear in the other. You can add them again in each folder, or share the ones you choose. See share skills and MCP servers across Claude Code accounts.

Claude Code inside Claude Desktop

If you use Claude Code from Claude Desktop rather than Terminal, Switch applies the same approach for you. Each Switch profile opens its own Claude Desktop, and with Keep coding preferences separate on, its own Claude Code configuration folder. You switch accounts from the Dock or a keyboard shortcut instead of an alias. How Switch handles Claude Code.

Use accounts you’re entitled to

Separate folders are for separate accounts, such as the one your company pays for and your own. Each account keeps its own plan and usage limits. Rotating several accounts to get around limits is a different matter: check Anthropic’s terms before doing anything like that.