A developer run multiple Claude Code accounts on one Mac
Vibor Cipan documented a shell configuration method for macOS engineers running two or three concurrent Claude Code sessions without logging out of accounts.
By Dillip Chowdary • Nov 15, 2026 • Source: twitter.com
In this post
Vibor Cipan released an implementation pattern enabling engineers to run multiple Claude Code accounts concurrently on macOS, as detailed in twitter.com's report. The workflow addresses Anthropic's current tooling limitation where neither the Desktop client nor the CLI offers a native account switcher. Rather than logging out between personal and work repositories, engineers can redirect configuration directories to maintain active authentication sessions side by side.
This guide explains how to establish isolated configuration folders, write shell execution functions, maintain separate macOS Keychain credentials, and coordinate multi-account terminal sessions alongside the desktop application. It is designed for developers managing corporate, personal, and client claude.ai profiles on one machine.
01Configuration directory isolation for parallel sessions
Anthropic stores command-line client credentials, active preferences, and prompt history inside a single default user directory. Lacking a native account switcher, alternating between work and personal repositories requires repeated manual logins. Cipan resolved this by creating an isolated directory at $HOME/.claude-b and targeting it with the standard CLAUDE_CONFIG_DIR environment variable during process invocation.
Under this architectural separation, macOS isolates stored credentials directly within Keychain Services based on the designated configuration directory path. Each independent profile maintains its own cryptographic authentication entry. This operating system integration ensures active authentication tokens for different accounts never collide or overwrite one another during background session renewals.
02Account separation and credential state comparison
Developers relying on unmanaged local setups previously endured constant browser roundtrips and token revocation when switching account contexts. Explicit path targeting provides persistent credential segregation across multiple terminal shells without requiring separate macOS user profiles. The setup operates reliably across two separate claude.ai accounts and scales to three accounts through identical directory mapping.

| Parameter | Single Default Setup | Multi-Directory Setup |
|---|---|---|
| Active CLI Accounts | 1 account | 2 to 3 accounts |
| Config Directory Paths | 1 path (~/.claude) | 2 to 3 paths (.claude-b, .claude-c) |
| Account Switch Overhead | Manual logout and web login | 0 seconds via shell function |
| Keychain Credential Records | 1 shared record | 1 isolated record per path |
While standard web logins achieve complete separation, the isolation boundary does not extend to keyless authentication modes configured through the Claude Console. Cipan noted that separate directories fail to isolate two Console sign-ins relying on keyless authentication. Engineers deploying this technique must authenticate secondary profiles through standard claude.ai subscription workflows rather than unisolated Console tokens.
Advertisement
Tech Pulse Daily
Get tomorrow's pulse first
Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.
03Desktop client coexistence and third account scaling
A core benefit of directory isolation is running the Claude Desktop client and command-line sessions in parallel. In Cipan's deployment, the desktop application remains permanently signed into Account A, while the CLI operates under Account B via the custom wrapper. Both stay signed in simultaneously without triggering session invalidation or unexpected logouts.
Developers can also execute the secondary command-line interface directly inside the built-in terminal embedded within the Claude Desktop application itself. Furthermore, this pattern scales to a third workspace at $HOME/.claude-c with a matching shell function. Although adding a fourth account should follow the identical structural pattern, testing confirmed stable concurrent operation across three separate accounts on the same machine.
04Shell startup functions and execution commands
Setting up the environment begins by installing or updating the core command-line utility from npm, creating the storage folder, and registering a custom shell function within the user startup script. Adding the wrapper to ~/.zshrc ensures the custom directory flag passes to every sub-command while leaving the primary claude binary unmodified.
npm install -g @anthropic-ai/claude-code
claude update
mkdir -p "$HOME/.claude-b"
claude-b() {
CLAUDE_CONFIG_DIR="$HOME/.claude-b" command claude "$@"
}
claude-b auth login --claudeai
claude-b auth status
claude-b
/model claude-fable-5-1
/model fable
claude-b --model fable
claude-b config set -g model fableOnce the shell restarts, the engineer logs in via an incognito browser window to prevent selecting the primary active account. Running claude-b auth status outputs the authenticated user email alongside the explicit configDirectory path pointing to .claude-b. This visual confirmation ensures that configuration modifications, prompt histories, and API consumption route to the intended account profile before executing complex development tasks.
05Filesystem access risks and coordinator handoff limits
Isolating configuration directories does not restrict filesystem permissions because both processes execute under the same macOS user account. Both CLI sessions retain read and write access to the same local git repositories and files. Cipan cautions developers to divide project tasks cleanly to avoid conflicting file edits between concurrent sessions.
Developers sharing rules and skills across accounts should link specific files individually such as CLAUDE.md rather than copying the entire folder. To maintain continuity when context windows fill up, Cipan structures handoffs through written notes and brief files. He added an automated wrapper shortcut attaching to the highest-numbered coordinator session, avoiding manual queries for session identifiers.
A developer run multiple Claude Code accounts FAQ
Can I run more than two Claude Code accounts on macOS with this setup?
Yes, testing confirmed three concurrent accounts by establishing a third directory at $HOME/.claude-c with a matching shell function. While a fourth account should follow the identical pattern, it has not been validated.
Does directory isolation prevent concurrent sessions from editing the same files?
No, separating configuration directories only isolates credentials and logs. Both processes execute under the same macOS user account, meaning both retain access to the same local git repositories.
Can this method separate multiple Claude Console keyless accounts?
No, this workflow targets claude.ai accounts. Configuration directory separation does not isolate two Claude Console sign-ins that rely on keyless authentication methods.
Sources
Author
Dillip Chowdary
Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.
Related on Tech Bytes
Advertisement