Developers who use both a company-managed Claude Code account and a personal Claude Pro or Max subscription can avoid constant login switching by leveraging the CLAUDE_CONFIG_DIR environment variable. By creating separate directories (e.g., ~/.claude-work and ~/.claude-personal) and setting up shell aliases, each profile maintains its own independent authentication, conversation history, memories, MCP servers, hooks, and settings. Both sessions can run simultaneously in different terminals, and the same approach works on Windows via PowerShell scripts.

4m read timeFrom fireup.pro
Post cover image
Table of contents
Why Developers Need Multiple Claude Code AccountsHow Claude Code Stores Its ConfigurationCreate Separate Configuration DirectoriesCreate Convenient AliasesRunning Two Claude Code Sessions SimultaneouslyWhat Is Kept Separate?Windows UsersOptional: Monitor Account UsageWhen Should You Use This Setup?Final Thoughts

Questions this post answers

How do I use multiple Claude Code accounts without logging out and back in each time?

Set the CLAUDE_CONFIG_DIR environment variable to a different directory for each account before launching Claude Code. Create separate directories like ~/.claude-work and ~/.claude-personal, then add shell aliases such as `alias claude-work="CLAUDE_CONFIG_DIR=$HOME/.claude-work claude"`. Each directory acts as a fully independent installation with its own authentication, history, memories, MCP servers, hooks, and settings. Both profiles can run simultaneously in separate terminals. Developers juggling work and personal Claude Code accounts find workflow tips like this on daily.dev.

What data does Claude Code store in its configuration directory?

Claude Code stores authentication credentials, conversation history, memories, MCP server configuration, hooks, project settings, and preferences in its configuration directory, which defaults to ~/.claude. Because all of this lives in one directory, pointing CLAUDE_CONFIG_DIR at a different path creates a fully isolated environment with none of the data shared between profiles. Teams separating work and personal AI coding environments track Claude Code tips on daily.dev.

110 Impressions