Use Istari
Multiple accounts
ist account manages several Claude Code accounts from Istari. You can switch without logging in again, continue the same conversation on another account, and never edit your shell rc by hand. Each account is isolated: that is the default, and today the only mode.
In short
ist account add work # register an account (logs in once, installs Istari hooks)
ist account list # see accounts and their auth status
ist account use work # launch an isolated session under that account
claude-work # the same thing, through the managed aliasSet up an account
Do this once per account.
ist account add <name> [--dir <path>]- If the config directory is already logged in, it only registers it. There is no login, and it does not touch that account's
.claude.json. - If it's new, it starts a one-time Claude login. Finish it and exit.
- Either way it installs Istari into that account's directory: hooks, statusline, slash commands and skills. Running it again skips anything already there.
- The default directory is
~/.claude-<name>. Override it with--dir, for example to register your default account:ist account add me --dir ~/.claude.
Hooks are automatic after add. They live in the account's settings.json, so every session under it (terminal, ist account use, the alias or your IDE) has Istari with no extra step.
Daily use
ist account list # accounts, the default, auth status, email
ist account use <name> # an isolated interactive session under <name>
ist account use <name> -- -p "quick question" # pass arguments through to claude
claude-<name> # the managed shell aliasuse needs a real terminal, because it starts an interactive Claude session. From an IDE, launch Claude with that account's config directory, or use the alias in the IDE's terminal.
Continue a conversation on another account
A running Claude session is bound to its account when it starts, so switching means a quick relaunch that resumes the same conversation:
# inside the running session:
!ist account swap <name> # prepares the hand-off and tells you to exit
# exit the session with Ctrl-D or /exit, then:
ist account resume # relaunches the same conversation under <name>- It keeps the same session id and full context, with no login.
- It works from A to B and back to A, because it always copies the newest transcript.
- A swap without exiting isn't possible: Claude Code caches its token at launch and has no way to switch accounts mid-session. The exit and
resumeabove is the supported flow.
When you hit a usage limit
When Claude Code blocks a session with a weekly or five-hour limit, Istari notices and, on your next prompt, prints the hand-off for you with a real account name:
[Istari] Weekly limit hit (resets Jul 30 at 11am). Continue this conversation as raj:
!ist account swap raj → exit → ist account resumeRun those three in order and you are back in the same conversation, under the other account.
It stays silent on purpose in these cases:
| Situation | Behaviour |
|---|---|
| No other account registered | Nothing is printed, not even a suggestion to add one. |
| The only other account isn't logged in | Nothing, because it can't take over. |
| The same limit, on later prompts | Printed once per limit, not on every prompt. |
| A new limit with a different reset time | It tells you again. |
| Text that only looks like a limit | Ignored. Only a real block from the CLI counts. |
It appears on the prompt after the block, because the hook runs when you submit and the refusal comes after that. It can't rescue the session you're in; it gives you the shortest path to continue elsewhere.
Managed shell aliases
ist account aliases # write or refresh the managed alias block in your rc
ist account aliases --print # preview the block and write nothing
ist account aliases --remove # remove the block- Istari owns a marked block (
# >>> istari accounts ... <<<). It backs up your rc to<rc>.istari.bakand never touches lines outside the markers. - The block updates itself when you add or remove an account.
- The default account runs
command claudewithoutCLAUDE_CONFIG_DIR, because setting it explicitly breaks the default account's login. Other accounts runCLAUDE_CONFIG_DIR='<dir>' command claude. - Run
source ~/.zshrcor open a new tab to pick up changes.
Recovery
ist account heal <name> # restore a stubbed .claude.json from its newest backupClaude's .claude.json can be cut down to a stub when two sessions use the same config directory at once, and you may see a login prompt even though the token is fine. heal restores the file from backup in one step, with no login and the token untouched.
Remove an account
ist account remove <name> # unregister; the config directory and login are left aloneOne directory per account
Give every account its own config directory, so nothing overwrites anything. Each directory keeps its own login, made once.
ist account add me --dir ~/.claude-me
ist account add friend --dir ~/.claude-friend
ist account use me # or the alias: claude-meThe default ~/.claude directory stays untouched.
If you change the account in ~/.claude
If you log the default directory in to a different account, nothing breaks and no transcripts are lost, because Istari's hooks don't depend on the account. Two things do happen: the previous account's token in that slot is replaced, and the label in Istari's list goes stale. Fix the labels afterwards:
ist account list # see what ~/.claude holds now
ist account remove <oldname> # drop the stale label
ist account add <newname> --dir ~/.claude # relabel it (no login if already signed in)
ist account aliases # refresh the alias blockA session without Istari
For a clean Claude session with no hooks, feed, statusline or session tracking, while staying logged in, add --no-istari:
ist account use <name> --no-istari
ist account use <name> --no-istari -- -p "…"It runs alongside your normal sessions. It works by loading only project and local settings (claude --setting-sources project,local), which skips Istari. Your login is unaffected. The trade-off is that your other user-level settings, such as the theme, are skipped for that session too.
What is separate and what is shared
| Separate for each account | Shared |
|---|---|
.claude.json, the login, settings.json (hooks) and projects/ (history) | Istari's statusline script and the account list in ~/.istari/accounts.json |
Command reference
| Command | What it does |
|---|---|
ist account add <name> [--dir] | Register and install (log in once if new); updates the aliases |
ist account list | Accounts, the default, auth status and email |
ist account use <name> [--no-istari] [-- …] | Launch an isolated session; --no-istari starts one without Istari |
ist account swap <name> | Inside a session, prepare a hand-off to another account |
ist account resume | After exiting, relaunch the swapped conversation |
ist account heal <name> | Restore a stubbed .claude.json from backup |
ist account aliases [--print|--remove] | Manage the claude-<name> alias block |
ist account remove <name> | Unregister, leaving the login and directory alone; updates the aliases |