Skip to content

Instantly share code, notes, and snippets.

@jonathan-beebe
Created August 22, 2026 01:27
Show Gist options
  • Select an option

  • Save jonathan-beebe/dfe365d61de8726cd652222a41ec0573 to your computer and use it in GitHub Desktop.

Select an option

Save jonathan-beebe/dfe365d61de8726cd652222a41ec0573 to your computer and use it in GitHub Desktop.
Running multiple claude accounts

Running multiple claude accounts

  1. Create a separate Claude configuration directory and copy your existing setup into it:

    mkdir -p ~/.claude-accounts/work
    cp -a ~/.claude/. ~/.claude-accounts/work/

    This gives your work account its own settings, skills, status line, history, etc.

  2. Create the launcher:

    mkdir -p ~/.local/bin
    nano ~/.local/bin/claude-work

    Contents:

    #!/bin/zsh
    
    export CLAUDE_CONFIG_DIR="$HOME/.claude-accounts/work"
    export CLAUDE_SECURESTORAGE_CONFIG_DIR="$HOME/.claude-accounts/work"
    
    exec claude "$@"

    Then:

    chmod 700 ~/.local/bin/claude-work
  3. Launch it:

    claude-work

    Claude Code presents the normal browser login:

    1. Claude account with subscription
    2. Anthropic Console account
    3. 3rd-party platform
    

    Choose 1 and authenticate with the second Claude Max account.

  4. The important part is CLAUDE_SECURESTORAGE_CONFIG_DIR.

    CLAUDE_CONFIG_DIR separates the Claude Code filesystem state:

    ~/.claude/
    ~/.claude-accounts/work/

    CLAUDE_SECURESTORAGE_CONFIG_DIR causes Claude Code to use a separate macOS Keychain credential for that configuration. The OAuth token is therefore not copied into the new directory; it remains in Keychain.

  5. For account-local resources such as your status line, use $CLAUDE_CONFIG_DIR:

    "statusLine": {
      "type": "command",
      "command": "python3 \"$CLAUDE_CONFIG_DIR/statusline.py\""
    }

    That successfully allowed the copied Skin Clique configuration to find its own statusline.py.

  6. We did not use the custom Keychain token / CLAUDE_CODE_OAUTH_TOKEN approach. That was the path that failed: Claude launched but still presented the login selector.

    Your final architecture is therefore:

    ~/.claude/
        Personal Claude Code configuration
              │
              └── macOS Keychain credential A
    
    ~/.claude-accounts/
    └── skin-clique/
        ├── settings.json
        ├── statusline.py
        ├── skills/
        └── ...
              │
              └── macOS Keychain credential B
    

    And you can run:

    claude
    

    for Account A and:

    claude-work
    

    for Account B simultaneously, even in separate macOS Spaces.

    For another account, repeat the same pattern with a new directory and a new CLAUDE_SECURESTORAGE_CONFIG_DIR value, then authenticate that instance once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment