claude-code - 💡(How to fix) Fix [FEATURE] Support multiple authenticated accounts / per-project account switching for subscription users [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#56232Fetched 2026-05-06 06:33:37
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
labeled ×1
RAW_BUFFERClick to expand / collapse

Preflight Checklist

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

Problem Statement

Problem:

Claude Code only supports a single authenticated account via OAuth. Developers working across multiple organisations (e.g. personal + work accounts) must constantly log out and log back in when switching projects. Unlike API key users who can set ANTHROPIC_API_KEY per project, subscription users have no equivalent workflow.

Example

I maintain two projects:

  • Personal project (personal subscription)
  • Work project (Team subscription)

Switching between them requires re-authentication. Worse, OAuth silently uses the active browser session, making it easy to bill the wrong account without noticing.

Why this matters

This isn’t just inconvenient. it creates real risk:

  • Incorrect billing between personal/work accounts
  • Potential breaches of employment or client agreements
  • Confidential data tied to the wrong organisation
  • No visibility when OAuth silently selects the wrong account

Proposed Solution

I'd like to be able to do one of the following:

  • Named account profiles: run claude auth add --profile personal , claude auth add --profile work, then a per-project setting
    (.claude/settings.json) that specifies which profile to use. Zero friction once set up.
  • Per-project auth override — allow .claude/settings.json or .claude/settings.local.json to specify an account/org, prompting login if that account isn't already cached.
  1. Allow claude auth switch at minimum, a fast account-switcher that doesn't require a full browser OAuth round-trip each time.

Anyhow - the used account should be accessible to the user with request like claude auth --current_user

Alternative Solutions

No response

Priority

High - Significant impact on productivity

Feature Category

CLI commands and flags

Use Case Example

I maintain two projects:

  • Personal-project (personal subscription)
  • Work-project (Team subscription)

I'm logging in the Personal account and working in that personal-project. I switch the work-project on a different window/terminal and logging in to my claude Work account. When switching back to the Personal-account terminal, the account silently switches to the work-account Critical issue is the silent switch The current possible solution is a logout/login in the personal account, and another login/logout when switching back to work on the Work project. That's a lot of friction.

Additional Context

No response

extent analysis

TL;DR

Implementing named account profiles or a per-project auth override could resolve the issue of silently switching between accounts.

Guidance

  • Consider adding a --profile flag to the claude auth add command to support multiple account profiles.
  • Introduce a per-project setting in .claude/settings.json to specify the account profile to use.
  • Allow users to switch between accounts using a claude auth switch command, which could prompt for login if the account isn't cached.
  • Display the currently used account with a command like claude auth --current_user to increase visibility and prevent silent switches.

Example

claude auth add --profile personal
claude auth add --profile work

Then, in .claude/settings.json:

{
  "profile": "personal"
}

Notes

The proposed solution requires changes to the CLI commands and flags, which may involve updates to the underlying authentication mechanism.

Recommendation

Apply a workaround by using the proposed --profile flag and per-project settings until a more robust solution is implemented, as this could mitigate the issue of silent account switching and improve productivity.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [FEATURE] Support multiple authenticated accounts / per-project account switching for subscription users [1 participants]