Feature Request: Support for multiple Claude Code sessions with different accounts
Status Fixed / completed
Maintainer reply None cached
Workaround ✓ Mentioned in thread ↓
Activity 9 comments · opened Mar 2, 2025 · closed Mar 5, 2025
Problem:
Currently, Claude Code doesn't appear to support running multiple instances with different Anthropic accounts simultaneously. When working across different projects or teams that may require different accounts (e.g., personal vs work accounts), users need to constantly log out and log back in.
Feature Request:
Add support for running multiple Claude Code sessions with different Anthropic accounts simultaneously, such as:
- Allow specifying an account profile when starting Claude Code (e.g.,
claude --profile workorclaude --profile personal) - Store credentials separately for each profile
- Provide visual indication in the terminal of which profile is currently active
- Allow switching between profiles without losing session context
Use Cases:
- Working on multiple projects that require different billing accounts
- Collaborating across personal projects and work projects simultaneously
Additional Context:
The current /login command allows switching accounts, but doesn't support maintaining multiple active sessions simultaneously in different terminals.
9 Comments
Thank you for the suggestion! As an immediate workaround you can use
CLAUDE_CONFIG_DIRenv var to set the directory to keep your profile data in, e.g. you can useCLAUDE_CONFIG_DIR=~/work claudefor work andCLAUDE_CONFIG_DIR=~/personal claudefor personal sessions.I have written a simple bash tool to manage the keys for the default Claude configuration file for multiple projects.
I wanted this not just to separate work/personal but to be able to allocate API costs to different Anthropic Console Workspaces for cost tracking.
Hopefully someone finds this useful.
https://github.com/jonopryor/claude-code-api-key-manager
Doing that Claude Code fails to connect to Jetbrains Plugin. (even if I set the CLAUDE_CONFIG_DIR on my terminal and launch webstorm from there)
Is there a permanent solution? Or something in your roadmap?
I really need that option to switch profiles between work and personal projects
Up, this is useful when i have given max plan from the company but I also have one for myself so I can separate it seamlessly
Hi. Looking for the same as well. This can help me better manage and use claude code without going for vm or separate lappy or logout and login. Thanks
was this completed? I don't see any mention of how to use it
As a workaround, you can expand on @isasmendiagus suggestion:
and add this to your
.bashrcor.zshrc:and access it with
claudeorwclaudefor personal and work accounts, for instance.Remember that user files
settings.jsonandCLAUDE.mdwill be unique for each account. But we can symlink them, I guess.I have this in my .bashrc:
Use it with
-u <name>e.g.:The
<name>defaults topersonal- that is,~/.claude-personal/as the config dir.The only problem is that changing CLAUDE_CONFIG_DIR seems a bit buggy:
I'm surprised there's no better built-in support for this.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.