How to Use Work and Personal Claude Code Accounts Safely

How to Use Work and Personal Claude Code Accounts Safely

Aident AI

Separate warm and cool identity cores rest inside two translucent configuration chambers connected by a forked command path.

How to Use Work and Personal Claude Code Accounts Safely

The safest way to use separate work and personal Claude Code accounts on one computer is to launch Claude Code with a different CLAUDE_CONFIG_DIR for each account, then authenticate each clean profile through Claude Code's official /login flow. Anthropic documents that this variable moves the complete user configuration root, including credentials, settings, session history, and plugins.

Do not copy OAuth tokens between profiles or install an account switcher that stores raw credentials for you. A clean profile plus official login gives each account its own state without turning credential files into a shared secret.

What This Setup Separates

A Claude Code profile contains more than a login:

  • Authentication state

  • User settings and permissions

  • Session history

  • Plugins, skills, commands, hooks, and memory

Project-level files under a repository's .claude/ directory remain tied to that project. That is useful for reviewed team configuration, but it also means a work repository can still supply instructions or hooks when opened from a personal profile. Profile separation controls user state. It does not replace repository review, Git identity checks, or your employer's data policy.

This guide is for legitimate personal and organization accounts. It is not a way to evade usage limits, billing rules, or account policies.

Prerequisites

You need:

  1. A current Claude Code installation.

  2. Authorized access to the personal and work accounts you intend to use.

  3. A shell profile you can edit.

  4. A plan for which repositories may be opened with each account.

Before changing anything, see whether another credential source can override interactive login. On macOS or Linux, print names only so secret values do not reach your terminal history:

env | cut -d= -f1 | rg '^(ANTHROPIC_|CLAUDE_CODE_OAUTH_TOKEN|CLAUDE_CODE_USE_)'

On PowerShell:

Get-ChildItem Env: |
  Where-Object Name -Match '^(ANTHROPIC_|CLAUDE_CODE_OAUTH_TOKEN|CLAUDE_CODE_USE_)' |
  Select-Object -ExpandProperty Name

Expected result: no unexpected API key, OAuth token, or cloud-provider override. If one appears, find where it is set before relying on /login. Anthropic warns that an ANTHROPIC_API_KEY can silently take precedence over subscription login.

Step 1: Create Two Empty Profile Directories

On macOS or Linux:

mkdir -p "$HOME/.claude-personal" "$HOME/.claude-work"
chmod 700 "$HOME/.claude-personal" "$HOME/.claude-work"

Expected result:

ls -ld "$HOME/.claude-personal" "$HOME/.claude-work"

Both directories exist and are accessible only to your user. Keep them empty for the first login. Do not copy ~/.claude wholesale, because that would also copy credentials, history, and potentially unreviewed plugins.

On Windows, Claude Code stores the default profile beneath %USERPROFILE%\.claude. The commands below create alternative roots automatically when they first run.

Step 2: Add Explicit Launchers

For zsh, add these aliases to ~/.zshrc. For bash, add them to ~/.bashrc:

alias claude-personal='CLAUDE_CONFIG_DIR="$HOME/.claude-personal" claude'
alias claude-work='CLAUDE_CONFIG_DIR="$HOME/.claude-work" claude'

Reload the file:

source "$HOME/.zshrc"
type claude-personal
type claude-work

Use source "$HOME/.bashrc" on bash. Expected result: type reports two aliases with different absolute profile directories.

For PowerShell, put one shared helper and two small launchers in your $PROFILE:

function Invoke-ClaudeProfile {
  param(
    [Parameter(Mandatory)]
    [string]$Name,
    [string[]]$ClaudeArgs
  )

  $previous = $env:CLAUDE_CONFIG_DIR
  $env:CLAUDE_CONFIG_DIR = Join-Path $HOME ".claude-$Name"
  try {
    & claude @ClaudeArgs
  } finally {
    $env:CLAUDE_CONFIG_DIR = $previous
  }
}

function claude-personal { Invoke-ClaudeProfile "personal" $args }
function claude-work { Invoke-ClaudeProfile "work" $args }

Reload the profile and verify the commands:

. $PROFILE
Get-Command claude-personal, claude-work

The helper keeps the directory contract in one place and restores the calling shell's prior value after Claude Code exits.

Step 3: Authenticate Each Profile Through /login

Start the personal profile:

claude-personal

Inside Claude Code:

  1. Run /login.

  2. Choose the Claude account with subscription option.

  3. Authorize the personal account.

  4. Run /status.

  5. Confirm the displayed account or organization, then exit.

Repeat for work:

claude-work

Choose the authorized Team or Enterprise organization and verify it with /status.

If your personal and organization workspaces share one email address, Anthropic also supports switching between them from the Claude account menu. The separate configuration roots remain useful for terminal sessions because they keep the local credentials, history, settings, and plugins from collapsing back into one profile.

Step 4: Prove the Profiles Are Actually Separate

Run each launcher and check /status. The account or organization must match the launcher name.

Then inspect only the top-level file names:

find "$HOME/.claude-personal" -maxdepth 1 -mindepth 1 -print
find "$HOME/.claude-work" -maxdepth 1 -mindepth 1 -print

Expected result: two independently populated directories. Do not diff or print credential contents.

Create a harmless test session in each profile, exit, then use Claude Code's session picker from the matching launcher. A personal session should not appear in the work profile, and a work session should not appear in the personal profile.

That check matters because a launcher can look correct while a parent environment, wrapper, or copied credential file still points both commands at the same state.

Step 5: Decide What Should Be Shared

Keep account-specific material inside its profile:

  • Credentials and subscription state

  • Personal session history

  • User-level plugins and hooks

  • User-level settings that expose local paths or services

Share only reviewed project configuration through the repository's .claude/ directory. Anthropic documents that project files can define team instructions, settings, skills, commands, and hooks. Treat executable hooks and plugin configuration like code.

If both profiles need the same harmless setting, reproduce the small setting intentionally. Do not solve configuration drift by symlinking entire profile directories, because that defeats the isolation boundary.

Step 6: Keep Provider Credentials Outside Both Profiles

Claude account separation does not protect GitHub, Slack, database, deployment, or billing tokens that you paste into prompts, shell profiles, or MCP configuration.

Aident Loadout keeps connected provider credentials in Vault and exposes task-scoped Actions instead of raw keys. Install or update the public aident CLI once, then verify the broker independently of either Claude profile:

aident account auth status
aident vault vault --action status
aident capabilities search \
  --query "GitHub list repository issues" \
  --limit 5

Copy one exact read-only Action name from search, inspect its schema, and preflight a narrow input:

aident capabilities get --name '<canonical-action-name>'
aident capabilities preflight \
  --name '<canonical-action-name>' \
  --input '<narrow-read-only-input>'

Expected result: both Claude profiles can request the same brokered capability without a provider token being copied into either Claude configuration directory. For the broader pattern, see How to Give AI Agents API Access Without Exposing Keys.

Common Failure Modes

What you see

Likely cause

Fix

Both launchers show the same account

The two launchers resolve to the same directory, or credentials were copied

Check type or Get-Command, remove the copied clean profile, and authenticate it again through /login

/login succeeds but /status shows the wrong billing source

An API key, OAuth token, or cloud-provider environment variable takes precedence

List variable names without printing values, remove the unintended override from its source, restart the shell, and log in again

Work plugins or history are missing

CLAUDE_CONFIG_DIR moves the whole user configuration root

Add only the reviewed settings or plugins that the work profile needs

Personal history appears in work

The same configuration root is being reused

Exit immediately, inspect the launcher definitions, and verify that the two directories are distinct

A repository changes Claude behavior in both profiles

Project-level .claude/ configuration is shared through the repository

Review the repository configuration and hooks before opening it with either account

Git commits use the wrong email

Git identity is independent of Claude account selection

Check git config --show-origin --get user.email before committing and use repository-scoped Git configuration where needed

Why This Works

CLAUDE_CONFIG_DIR changes the root Claude Code uses for credentials, settings, history, and plugins. Starting each directory empty and authenticating through /login creates two independent local identities. /status verifies the effective remote account, while directory inspection verifies the local boundary.

The setup stays safe because it does not move raw tokens between profiles. Project configuration is shared only where you can review it, and external provider access can remain behind a credential broker.

Ready to verify the full boundary? Set up Aident Loadout, preflight one read-only Action, and confirm that neither Claude profile contains the provider token.

Sources

Home

Home

Home

Integrations

Integrations

Integrations

Vault

Vault

Vault

Audit

Audit

Audit

Arana Grande

Arana Grande

Arana Grande

Free

Free

Free

30-day audit summary

30-day audit summary

30-day audit summary

Daily action-call volume and the latest receipts from the Loadout audit trail.

Daily action-call volume and the latest receipts from the Loadout audit trail.

Daily action-call volume and the latest receipts from the Loadout audit trail.

View Audit

View Audit

View Audit

Loadout usage

Loadout usage

Loadout usage

617 action calls in the last 30 days

617 action calls in the last 30 days

617 action calls in the last 30 days

May 19 - Jun 17

May 19 - Jun 17

May 19 - Jun 17

10 active days

10 active days

10 active days

Less

Less

Less

More

More

More

Recent activity

Recent activity

Recent activity

Latest action-call receipts from connected agents

Latest action-call receipts from connected agents

Latest action-call receipts from connected agents

Apr 23, 09:23 AM

Apr 23, 09:23 AM

Apr 23, 09:23 AM

Shopify

Shopify

Shopify

Creates Or Updates An Asset For A Theme

Creates Or Updates An Asset For A Theme

Creates Or Updates An Asset For A Theme

Success

Success

Success

Apr 23, 09:21 AM

Apr 23, 09:21 AM

Apr 23, 09:21 AM

Shopify

Shopify

Shopify

Update Products Param Product Id

Update Products Param Product Id

Update Products Param Product Id

Success

Success

Success

Apr 23, 08:53 AM

Apr 23, 08:53 AM

Apr 23, 08:53 AM

Shopify

Shopify

Shopify

Update Products Param Product Id

Update Products Param Product Id

Update Products Param Product Id

Failed

Failed

Failed

Apr 22, 22:13 PM

Apr 22, 22:13 PM

Apr 22, 22:13 PM

Shopify

Shopify

Shopify

Create Product Image

Create Product Image

Create Product Image

Success

Success

Success

Apr 22, 22:12 PM

Apr 22, 22:12 PM

Apr 22, 22:12 PM

Shopify

Shopify

Shopify

Create Product Image

Create Product Image

Create Product Image

Success

Success

Success

Connected integration coverage

Connected integration coverage

Connected integration coverage

162

162

162

of 753 accessible connected

of 753 accessible connected

of 753 accessible connected

Callable actions

Callable actions

Callable actions

1,126

1,126

1,126

Vault credentials

Vault credentials

Vault credentials

8

8

8

Explore what's possible

Explore what's possible

Explore what's possible

See all Integrations

See all Integrations

See all Integrations

Google Ads

Google Ads

Google Ads

All available Goolge Ads tools via...

All available Goolge Ads tools via...

All available Goolge Ads tools via...

X (twitter)

X (twitter)

X (twitter)

All available X tools via...

All available X tools via...

All available X tools via...

Github

Github

Github

All available Github tools via...

All available Github tools via...

All available Github tools via...

Notion

Notion

Notion

All available Notion tools via...

All available Notion tools via...

All available Notion tools via...

Slack

Slack

Slack

All available Slack tools via...

All available Slack tools via...

All available Slack tools via...

Firecrawl

Firecrawl

Firecrawl

All available Firecrawl tools via...

All available Firecrawl tools via...

All available Firecrawl tools via...

753 integrations are available for loadouts.

753 integrations are available for loadouts.

753 integrations are available for loadouts.

Plug your entire stack into your AI agents.

Plug your entire stack into your AI agents.

Plug your entire stack into your AI agents.

Skip the integration headache. Plug 750+ tools into Claude Code, Codex, and OpenClaw in one go, and let your agents execute today.

Skip the integration headache. Plug 750+ tools into Claude Code, Codex, and OpenClaw in one go, and let your agents execute today.