SSD Nodes Learn Hosting plans →
How to do am Matt ConnorBy Matt Connor

Claude Code wit more than one account: how to do am

Run personal and work Claude accounts for Claude Code wit CLAUDE_CONFIG_DIR. See where login dey stay, how /status show am, and wetin Anthropic policy allow.

The short answer

To run Claude Code wit more than one account for one computer, give each account im own config folder. You do am wit the CLAUDE_CONFIG_DIR environment variable. Anthropic docs talk say each folder get im own settings, im own session history, and im own claude.ai login or API key. So your personal account and your work account no go mix.

This guide show you the alias wey the docs use, where each login dey stay, and how to check which account dey work. E also show how to log in for VPS wey no get browser. At the end, e show wetin the Anthropic Usage Policy talk about many accounts, because some kind of use fit cause ban.

How to set up Claude Code for multiple accounts wit CLAUDE_CONFIG_DIR

The docs example na one shell alias. Put am for ~/.bashrc if you dey use Bash, or for ~/.zshrc if you dey use Zsh:

alias claude-work='CLAUDE_CONFIG_DIR=~/.claude-work claude'

After this, claude-work go use your work account. Plain claude go still use your personal account for the default folder. Load the file for the shell wey you dey use now, then check say the alias dey:

source ~/.bashrc
type claude-work

For Bash, type claude-work suppose print claude-work is aliased to plus the line wey you write. For Zsh, the line na claude-work is an alias for. If e print not found, the alias no enter the file wey your shell dey read. Check the file name again.

Now run the new alias for the first time:

claude-work

The folder ~/.claude-work new, so Claude Code go carry you pass login and setup again, like new install. Log in wit your work account for here. Your personal login no go change, because e dey another folder.

You fit add more aliases the same way. One alias, one folder, one account. Example: claude-client wit ~/.claude-client. Name each folder after the account, so you no go forget which one be which.

The docs show only Bash and Zsh. If you dey use fish or PowerShell, you go need write your own version, and we no test am here.

Where Claude Code dey keep each login

When you sabi where the login dey stay, e go easy to fix am when something no work.

  • On Linux, the default login file na ~/.claude/.credentials.json, wit file mode 0600. That mode mean na only your user fit read am.
  • On Windows, the file dey %USERPROFILE%\.claude\.credentials.json.
  • On macOS, Claude Code dey keep the login for the Keychain.

When you set CLAUDE_CONFIG_DIR, the .credentials.json file go stay inside that folder instead. For macOS, the Keychain entry go dey tied to that folder. So session wey get different CLAUDE_CONFIG_DIR go read different Keychain entry. Na why the same alias work for Mac too.

One macOS case dey. If the Keychain refuse the write, for example Keychain wey lock when you enter the Mac through SSH, Claude Code go write the login to .credentials.json file instead. If CLAUDE_CONFIG_DIR dey set, that fallback file still go inside that folder.

On Linux, check the file after you log in wit claude-work:

ls -l ~/.claude-work/.credentials.json

Healthy result go start wit -rw-------. If you see No such file or directory, the login never finish for that folder, or the alias no set the variable when you run am.

The one case wey separate folders no fit separate

The docs name one exception. Claude Console get one kind of sign-in wey no use API key. If you do that keyless sign-in two times, for two Console accounts, separate folders no go keep dem apart. Na because Claude Code dey store that kind of sign-in outside the config folder. The keyless Console sign-in need Claude Code v2.1.242 or later. Check your version wit:

claude --version

Normal claude.ai login for Pro, Max, Team and the other subscription plans no get this problem. If you need two Console accounts side by side, use the kind wey get API key, because the docs talk say each folder dey hold im own login or API key.

How you go know which account dey work now?

Inside Claude Code, type this command:

/status

E go open the Settings screen for the Status tab. The docs talk say this tab show version, model, account and connectivity. Read the account part before you start serious work, most especially after you change alias or folder. You fit run /status even while Claude dey answer.

If one login and one API key both dey configured, /status go mark the one wey Claude Code no dey use. That one important, because an API key fit take over from your subscription without you notice. The next section explain why.

Which login dey win when Claude Code see many?

Claude Code fit see many credentials at the same time. The docs give one fixed order. The one wey dey higher for the list dey win:

  1. Cloud provider variables
  2. ANTHROPIC_AUTH_TOKEN
  3. ANTHROPIC_API_KEY
  4. apiKeyHelper
  5. CLAUDE_CODE_OAUTH_TOKEN
  6. Anthropic profile and federation credentials
  7. The subscription login wey you do wit /login

Number 7 na the default for Pro, Max, Ultra, Team and Enterprise users. So anything wey dey higher fit cover your subscription.

The common trap na ANTHROPIC_API_KEY. If e dey your environment, Claude Code go use the key instead of your subscription, even for Team and Enterprise plans. That usage go bill as API usage, no be your plan. For interactive mode, Claude Code go ask you one time to approve or decline the key, and e go remember your answer. To change am later, use the "Use custom API key" toggle inside /config. For non-interactive mode (-p), Claude Code go always use the key if e dey.

Check which of these variables dey your shell. This command print only the names, no be the secret values:

env | grep -oE '^(ANTHROPIC_API_KEY|ANTHROPIC_AUTH_TOKEN|CLAUDE_CODE_OAUTH_TOKEN|CLAUDE_CONFIG_DIR)='

If nothing print, none of them dey set. To go back to your subscription for this shell, remove the key:

unset ANTHROPIC_API_KEY

Then run /status again to confirm which method dey active. If the key come back when you open new terminal, one of your shell files dey set am. Find the line:

grep -n 'ANTHROPIC_API_KEY' ~/.bashrc ~/.profile ~/.zshrc 2>/dev/null

If you never sure whether API billing or subscription go cheaper for how you work, read Claude API versus subscription cost before you decide which one go win.

/login and /logout: wetin each one dey do

/login dey sign you in to your Anthropic account. Anthropic support article for Pro and Max talk say you fit run /login inside Claude Code to switch from Console pay-as-you-go to your subscription plan.

/logout dey sign you out. E also reset the first-launch setup. So the next time you run claude, e go carry you pass login and setup again. If you see the welcome screens again after /logout, na normal.

If CLAUDE_CODE_OAUTH_TOKEN dey set and you run /login, Claude Code go switch the current session to the new login. But new sessions go still read the variable, because e dey number 5 and /login dey number 7. To keep the new login for new sessions, remove the variable from your shell profile, and from any settings file wey fit set am, like your user settings.

For the alias setup, you no need /logout and /login every time you wan change account. Just run the other alias. That way cleaner, because each folder don already hold im own login.

Wetin happen to your conversation if you switch account for middle?

Straight answer: the docs wey we read no talk about am. The authentication page only talk say Claude Code "switches the current session to the new login" for the CLAUDE_CODE_OAUTH_TOKEN case. The sessions page talk say Claude Code dey save sessions all the time to local transcript files, and you fit come back to one wit --continue, --resume or /resume. E no talk anything about changing account.

So test am yourself before you trust am wit important work. Switch account, run /resume, and see wetin show. Remember one thing: the docs talk say each config folder get im own session history. So expect say session wey you start wit claude-work go dey the claude-work history, no be for plain claude. If you wan understand how resume dey pick sessions, read how Claude Code resume and session history work.

Log in for VPS wey no get browser: claude setup-token

Normal login dey open browser. Many VPS no get browser at all. For this case the docs give claude setup-token. E dey generate OAuth token wey last one year.

This na how e work. The command open the same browser authorization flow as /login. After you approve for the browser, the token print for your terminal. The command no dey save the token anywhere. You copy am, then set am as CLAUDE_CODE_OAUTH_TOKEN wherever you wan use Claude Code.

The flow need browser, so the simple way na to run am for your laptop wey get browser:

claude setup-token

Then for the VPS, put the token inside the shell wey you wan use. read -rs dey collect the token without showing am for screen, and without putting am inside your shell history:

read -rs CLAUDE_CODE_OAUTH_TOKEN
export CLAUDE_CODE_OAUTH_TOKEN
claude

After the first line, paste the token and press Enter. Nothing go show, and na so e suppose be. When Claude Code open, run /status to see which account dey active.

The docs list some limits for this token:

  • You need Pro, Max, Ultra, Team or Enterprise plan.
  • The token fit make model requests only. E no fit start Remote Control sessions, and e no fit fetch claude.ai connectors. MCP servers wey you configure locally still go work.
  • Bare mode no dey read CLAUDE_CODE_OAUTH_TOKEN. If your script pass --bare, use ANTHROPIC_API_KEY or apiKeyHelper instead.
  • E dey number 5 for the order above, so e dey win any /login wey dey that machine.

Treat the token like password, because anybody wey hold am fit use your plan till e expire. No paste am for chat, and no commit am to git.

Two accounts for tmux on one VPS

Variable wey you export dey live only for that shell and the programs wey e start. So each tmux window fit carry different account. Example: window 1 run plain claude wit your personal login, window 2 run claude-work. Or each window get im own token from read -rs.

Open new named window for the work account like this:

tmux new-window -n work

Inside that window, run claude-work, then /status. Run /status for each window before you start, so you no go spend the wrong account. If you never set up Claude Code inside tmux before, follow run Claude Code on a VPS inside tmux first.

Anthropic allow multiple accounts? Wetin the Usage Policy talk

To hold more than one account no be the problem by itself. The problem na why you hold dem. The Anthropic Usage Policy, wey start to work on Nov 12, 2026, get one part wey dem call "Do Not Abuse Our Platform". E forbid you to:

Coordinate malicious activity across multiple accounts, or create multiple accounts, to avoid detection, circumvent product guardrails, or generate identical or similar inputs that otherwise violate our Usage Policy.

E also forbid you to:

Circumvent a ban through the use of a different account, such as the creation of a new account, use of an existing account, or providing access to a person or entity that was previously banned.

And another line forbid you to:

Intentionally bypass or interfere with capabilities, restrictions, or guardrails established within our products, including by circumvention of the account sign-up or log-in process

Read the first line well. E no ban multiple accounts in general. E ban to create dem "to avoid detection", or to dodge guardrails. The page no ban to hold personal account and work account.

The second line clear pass. If Anthropic ban your account, opening new one, or using another person account, na another violation. That one include account wey you buy from vendor. The right road na the appeal. The Anthropic article on safeguards warnings and appeals explain am: banned Free, Pro, Max or Ultra users fit still log in to export their data or delete the account, and the appeal form dey after you log in for claude.ai.

This guide no go show you how to stack accounts to run pass usage limits. If you dey think about that, read the "restrictions" line above well first. Sharing one account wit other people na separate question, and whether you fit share one Claude Pro account answer am.

Personal Pro plus work Team: the clean way

The clean pattern na one personal account plus one work seat. Anthropic support article 9267400 talk say you fit get personal account and organization account tied to the same email address. For the Claude app, you dey switch between dem from one menu for the lower left. Chats and projects dey stay under the email wey you use log in, and migration no fit move chats from one email to another.

For Claude Code, use the alias pattern. Plain claude for your personal Pro, claude-work for your Team seat. Each one get im own folder and im own login.

Usage limits dey follow each account. As of 16 November 2026, the Team plan page talk say usage limits on Team plans dey per member, no be for the whole team, and Claude Code dey inside the Standard seat. For Pro and Max, the limits dey shared between Claude and Claude Code, so chat for claude.ai and work for Claude Code dey count against the same limits. Pro and Max get one five-hour session limit plus one weekly limit. The full picture dey for how Claude usage limits work, and the Team side dey for Claude Team plans for small business.

Wetin second account go cost you

As of 16 November 2026, the Claude pricing page show Pro at $20 per month if you pay monthly. If you pay for one year, e na $200 once, about $17 per month. Claude Code dey inside Pro.

The Team plan page show these US prices, without tax:

  • Standard seat: $25 per member per month billed monthly, or $20 per month billed annually.
  • Premium seat: $125 per member per month billed monthly, or $100 per month billed annually.

If you dey Nigeria and you pay wit naira card, second Pro na another $20 every month for your card. The naira amount dey change, so we no print naira figure here. Check wetin Claude Code cost for different countries before you add the second subscription.

The Claude Desktop app nko?

The Claude Code Desktop docs wey we read talk about sign in and sign out. We no see any account switcher, and we no see any documented way to run two accounts side by side for Desktop. Check the Desktop docs yourself in case e don change. For now, if you need two accounts at the same time, use the CLI wit the aliases above.

FAQ

How I fit use two Claude accounts for Claude Code on the same computer?

Give each account im own config folder wit CLAUDE_CONFIG_DIR. Add alias claude-work='CLAUDE_CONFIG_DIR=~/.claude-work claude' to ~/.bashrc or ~/.zshrc, open new terminal, and run claude-work. E go ask you to log in for the new folder. Plain claude keep your personal login. Run /status inside each one to confirm the account.

Why Claude Code dey use my API key instead of my Pro plan?

ANTHROPIC_API_KEY dey higher than the /login subscription for the Claude Code credential order. So if the variable dey your environment, the key go win, and the usage go bill as API usage. Run unset ANTHROPIC_API_KEY, then check /status. If you don approve the key before, change am wit the "Use custom API key" toggle inside /config.

Anthropic go ban me if I get personal account and work account?

The Usage Policy wey start on Nov 12, 2026 no ban holding more than one account. E ban to create multiple accounts "to avoid detection" or to dodge guardrails, and to use different account to "Circumvent a ban". Personal account plus work Team seat, each for im own work, no be any of these. Anthropic support also talk say personal and organization accounts fit dey on the same email.

How I go log in to Claude Code for VPS wey no get browser?

Run claude setup-token for computer wey get browser. E open the same browser flow as /login and print one token wey last one year. E no save the token anywhere. For the VPS, set am as CLAUDE_CODE_OAUTH_TOKEN inside the shell, then run claude. The token fit make model requests only, so Remote Control and claude.ai connectors no go work wit am, and --bare mode no dey read am.

Dis article help you?