Claude Code with two accounts
Claude Code keeps its settings and sessions in one folder, ~/.claude, and its login with them: in the Keychain on macOS, in a credentials file in that folder on Linux and Windows. Pointed at another folder, it keeps a second set there, with a login of its own: a profile. A profile per account is the whole trick. Hatcheck adds a short way to run one, a single list of what's in all of them, and what's left of each plan, and it never reads or copies a login.
The variable itself
CLAUDE_CONFIG_DIR names the folder. Set it for one run and that run is a separate Claude Code, which asks you to sign in the first time:
CLAUDE_CONFIG_DIR=~/.claude-work claude # a second Claude Code, with its own login
CLAUDE_CONFIG_DIR=~/.claude-work claude --resume <id> # one of its sessions, later
Plain claude keeps using ~/.claude. On macOS, Claude Code names the profile's Keychain entry after the exact folder string it was given, so spell a profile's path the same way every time: ~/.claude-work and /Users/me/.claude-work would be two logins.
With hatcheck
Install the CLI, with one line in a terminal or with Homebrew. It installs no agent and changes nothing in ~/.claude:
curl -LsSf https://github.com/hatcheck/hatcheck/releases/latest/download/hatcheck-installer.sh | sh
brew install hatcheck/tap/hatcheck # or, with Homebrew; Windows and the other ways: hatcheck.dev/#install
Then cl runs Claude Code with a profile, always spelling its folder ~/.claude-<name> the same way, so the Keychain entry matches every time:
cl work # Claude Code with ~/.claude-work; the first run asks you to sign in
cl home # ~/.claude-home, signed in to the other account
cl work --resume <id> # any claude option works
cd ~/code/api
hatcheck bind work # in this folder, plain cl means cl work
hatcheck # the sessions here from every profile, with the command that resumes each
hatcheck, run in a project folder, lists that folder's recent sessions from every profile, newest first, each with the command that resumes it and what's left of its plan. ~/.claude counts as a profile too, called default.
What's left of each plan, and which to use
hat u # every account's limits: the 5-hour session, the week, and per-model limits such as Fable
hat b # the best account now, of those you may use for this work, and the command that carries the newest session here to it
The numbers come from Claude Code's own /usage, run in each profile with that profile's login; hatcheck reads the snapshot Claude Code saves and never a login. Claude usage limits explains the limits and the bars. hat b is hatcheck best:
$ hatcheck best
Session 3f1c2a9e "Fix flaky login test", the newest started from this folder, is in ~/.claude-a: week 9%, 0.4%/h · 5h 20%.
Best Claude Code account now: ~/.claude-b team max 5x · live
session (5h) 62% ██████▎░░░ █████▍░░░░ resets 8:25pm (in 2h39m)
week (Fable) 48% ████▊░░░░░ ██████░░░░ resets Wed 10:33pm (in 4d4h)
Carry it there with:
hatcheck move b (hatcheck fork b keeps the original)
Then:
2. ~/.claude-a week 9%, 0.4%/h · 5h 20% (where it is) → cl a
Codex: ~/.codex week 64%, 1.3%/h · 5h 80% · cached 50m ago → codex
Advice only: nothing is started, moved or switched. hatcheck usage shows every account's limits.
Carry a session to the other account
When a session started in one account belongs in the other, hatcheck move home carries the newest session started from this folder to ~/.claude-home, after showing what it would do and asking; hatcheck fork home copies it there as a new session and keeps the original. The copy resumes with cl home --resume and the session's id. Nothing switches on its own: hatcheck prints the command, and you run it.
Claude Desktop, too
Claude Desktop keeps one login as well, and the same idea applies: a data folder per account. Two Claude accounts on one Mac has it.
Windows
cl work works in PowerShell too, and the commands hatcheck prints there are in PowerShell's words, so paste them into PowerShell rather than cmd.
What hatcheck never does
It never asks for, reads, copies, refreshes or moves a login: signing in happens in Claude Code itself, in your terminal. It is never between Claude Code and Anthropic, runs nothing in the background, and switches no account on its own. Each rule, with the code that keeps it: rules it keeps.