How to tell which account Claude Code is using
Run /status in Claude Code to see the account, or claude auth status in a terminal. The config folder a session starts with decides the login. Here is how.
Run /status inside Claude Code. It opens Settings on the Status tab and shows version, model, account and connectivity, per the commands reference. To check from outside a session, run claude auth status in your terminal. Which account you get depends on the configuration folder Claude Code was started with.
Inside a session: /status
/status answers "who am I signed in as right now". It is also where you find out whether a login or an API key is actually in use. The authentication docs say that when both a login and an API key are configured, /status marks the credential that is not in use. If your account line looks right but you are seeing API charges, look for the API key row; Anthropic's error reference points there for a "Credit balance is too low" message on a subscription. See why an API key overrides your subscription.
In version 2.1.210 or later /status also shows a Login row when your saved claude.ai login has expired, with the organization and email it belonged to. The difference between this command and /usage is in /status vs /usage.
Outside a session: claude auth status
claude auth --help on Claude Code 2.1.322 lists three subcommands: login, logout and status ("Show authentication status"). There is no account switcher among them. status takes --json, which is the default, and --text:
claude auth status --text
The CLI reference documents a few parts of the JSON. authMethod is one of none, claude.ai, oauth_token, api_key, api_key_helper or third_party. configDirectory names the configuration folder in use (Claude Code v2.1.268 or later). And the command exits with code 0 if you are logged in and 1 if not.
In Claude Code 2.1.322 the JSON also carries fields such as loggedIn and apiProvider, and for a claude.ai login email, orgName, subscriptionType and planTier. Those are not in the documentation, so they may change between versions. The email is personal data, so be careful where you paste the output.
This is the quickest way to confirm the account for a given folder without starting a session. The exit code also makes it useful in a shell script that should stop when nobody is signed in.
The folder decides the account
By default Claude Code keeps its settings and session history under ~/.claude, and on a Mac it stores the login in the macOS Keychain. The CLAUDE_CONFIG_DIR environment variable overrides that folder. Anthropic's docs describe this as the way to stay signed in to several accounts: "To stay signed in to multiple accounts at once, such as work and personal accounts, give each account its own configuration directory." Each directory has its own settings, session history and claude.ai login or API key.
CLAUDE_CONFIG_DIR=~/.claude-work claude
So "which account am I using" really means "which configuration folder did this session start with". The project folder you are working in has nothing to do with it. Two terminals can be on two different accounts at the same moment. The setup is explained in Claude Code multiple accounts on a Mac and what CLAUDE_CONFIG_DIR does.
To check a particular folder from outside a session:
CLAUDE_CONFIG_DIR=~/.claude-work claude auth status --text
As for the Keychain, the authentication docs say that with CLAUDE_CONFIG_DIR set, Claude Code keys the Keychain entry to that directory too, so a session with a different folder reads a different entry. Users have reported older versions sharing one entry between folders (issue 20553); the current docs describe separate entries.
Several credentials, one winner
More than one credential can exist at once. The docs give this order of precedence:
- Cloud provider variables (Bedrock, Vertex, Foundry)
ANTHROPIC_AUTH_TOKENANTHROPIC_API_KEYapiKeyHelperCLAUDE_CODE_OAUTH_TOKEN- Anthropic profile and federation credentials
- Subscription OAuth from
/login
The subscription login is the default for Pro, Max, Ultra, Team and Enterprise users, but a credential higher on the list takes over when it is present. Two details from the same page: in an interactive session an ANTHROPIC_API_KEY is used once you approve it (in -p mode it is always used), and a profile from the ant CLI ranks at number 6 only when you name it in ANTHROPIC_PROFILE. So an account line that shows your email does not by itself prove your requests are billed to that plan. Check /status for the credential in use.
When a work seat shows the wrong plan
If a Team or Enterprise seat gives you trouble, Anthropic's Help Center says that if Claude Code reports that Pro, Max or Ultra is required while you hold a Team or Enterprise seat, you selected the wrong login method: run /login again and pick the account tied to your work email. For claude.ai on the web, an individual and a Team account sharing one email can be switched from your initials in the bottom left, per the login help article.
If the account is wrong
/login inside Claude Code signs in again for the current folder. Users have reported that after running /login in one session, other open sessions on the same folder show the new account but keep their old usage figures until each runs /login (issue 98437). That is a user report, not documented behaviour; the reported workaround is to run /login in each of those sessions too.
Claude Code has no built-in account switcher on the version we checked; a feature request is open (issue 30031). More in switching accounts without logging out.
Each account should be one you hold yourself. Anthropic's Consumer Terms say: "You may not share your Account login information, Anthropic API key, or Account credentials with anyone else. You also may not make your Account available to anyone else." For Team plans, the Help Center says: "Each seat is for one named individual." Several accounts make sense for cases that really are separate, such as a personal plan plus a work seat, or accounts in separate organisations.
One panel for all signed-in accounts
If you have several folders, checking each by hand gets old. Headroom is a free menu bar app, independent and not made or endorsed by Anthropic, with one row per Claude Code account signed in on your Mac: the email, the status, and the session and weekly percentages. It finds every folder in your home folder named .claude or starting with .claude- that holds a signed-in account. It reads the sign-in Claude Code already saved on your Mac and never sends a prompt. Download Headroom.