[FEATURE] Multi-account support for switching between subscriptions

Resolved 💬 4 comments Opened Mar 22, 2026 by andrei-newscouk Closed Mar 26, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

I have two Claude subscriptions — a personal one and one through my company. When working on personal projects I want to use my personal account, and when working on company projects I want to use my work account.

Currently, the only way to switch between subscription-based accounts is to /logout and go through the full OAuth login flow again. This adds friction every time I context-switch between personal and work projects, which happens multiple times a day.

The API key workaround (using ANTHROPIC_API_KEY env var) doesn't apply here since both accounts are subscription-based (Pro/Max/Teams), not API-key-based.

Proposed Solution

Account management commands similar to gh auth (GitHub CLI):

  • claude auth list — show all authenticated accounts
  • claude auth switch — interactively pick an account
  • claude auth add — authenticate an additional account without logging out
  • Per-directory default account via settings (e.g., ~/.claude/settings.json):

``json
{
"accountDefaults": {
"~/work/**": "work@company.com",
"~/personal/**": "me@gmail.com"
}
}
``

This way, Claude Code automatically uses the right account based on which project directory I'm in, with the ability to override manually.

Alternative Solutions

  • /logout and re-login each time — works but adds ~10-15 seconds of friction per switch and breaks flow
  • Converting one subscription to API key usage — loses subscription benefits and adds separate billing
  • Running separate OS user profiles — too heavyweight for this use case
  • Using one account in CLI and the other on claude.ai web — limits flexibility

Priority

High - Significant impact on productivity

Feature Category

CLI commands and flags

Use Case Example

  1. I'm working on a company project in ~/work/backend-service using my work subscription
  2. A friend messages me about a bug in our open-source side project
  3. I open ~/personal/oss-project and run claude
  4. Currently: I have to /logout, re-authenticate with my personal account, do the work, then /logout again and re-authenticate with work
  5. With this feature: Claude Code detects I'm in ~/personal/ and automatically uses my personal account — or I just run claude auth switch and pick it from a list

Additional Context

Prior art:

  • gh auth login / gh auth switch (GitHub CLI) — supports multiple accounts natively
  • gcloud config configurations (Google Cloud CLI) — named config profiles with account switching
  • Git itself — per-directory user config via .gitconfig includeIf

Both stored credentials could live in macOS Keychain under separate entries keyed by account email.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗