Feature request: Per-project account switching for claude.ai subscription users
Summary
Support configuring different claude.ai subscription accounts on a per-project basis, similar to how apiKeyHelper works for API key users.
Use case
Many users have both a personal claude.ai subscription and a company subscription. Today, switching between accounts requires manually running /login every time you switch projects. There is no way to bind a specific account to a project directory.
Example scenario: A developer has:
- Personal claude.ai account for personal/open-source projects
- Company claude.ai account (e.g. tied to their work email) for work projects
They want ~/Code/work-project to always use the company account and all other projects to use the personal account — without manual /login switching.
Proposed solution
Allow a project-level setting in .claude/settings.json to specify which logged-in account to use:
{
"account": "piotr.marciniak@arrive.com"
}
Claude Code would:
- Keep multiple authenticated sessions (already partially supported via
/login) - Check the project-level
accountsetting when launching in a directory - Automatically activate the matching session — or prompt the user to log in with that account if not yet authenticated
Alternatives considered
apiKeyHelper— only works for API key users, not subscription users- Manual
/loginswitching — error-prone and disruptive to workflow direnv+ANTHROPIC_API_KEY— not applicable to subscription auth
Additional context
This is a common workflow in tools like git (per-repo user config), aws-vault (per-profile credentials), and gcloud (per-project configurations).
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗