I do client work across several Claude Code accounts, so I built a tool to stop logging in and out
Description and use
hatswap lets you keep multiple Claude Code accounts signed in, switch between them without re‑login, pin client folders, isolate histories, and hand off tasks to Codex, saving time and improving security.
Problem
Frequent login and logout between multiple Claude Code accounts wastes time and disrupts workflow.
Outcome
hatswap eliminates repetitive login steps, keeps account credentials isolated, allows seamless account switching, folder pinning, private histories, and efficient handoffs to Codex, saving time and reducing errors.
Workflow
- Install hatswap via curl and install.sh
- Add client accounts with
hatswap add <name>(browser opens for sign‑in) - List accounts with
hatswap listto see default and added accounts - Switch to another account during a session with
! hatswap switch <name>or/switch <name> - Pin a client folder to an account with
hatswap pin <name>soclaudeuses that account in that directory - Make an account private with
hatswap add <name> --privateto keep its history separate - Hand a task to Codex with
hatswap handoff codexwhich creates a handoff brief - Refresh a long session with
hatswap refreshorhatswap refresh --editto start a new session seeded with a brief
Evidence
I was spending more time switching logins than writing code.
hatswap gives each account its own CLAUDE_CONFIG_DIR under ~/.claude-accounts/<name>, so each one keeps its own login
It never reads, copies or touches your credentials. Every sign‑in is done by Claude Code itself.
hatswap refresh # same account, fresh session, seeded with the brief
- Record date: 2026-10-12T18:41:20.610Z