The usual Claude Code account-switching failure is a state mismatch, not a failed profile selection. The CLI may have selected the right profile while an already-running Claude process, terminal, or editor task still holds the previous environment.
1. Check the Claude Code profile that aisw selected
Run the tool-specific status check and the full verification check from the same terminal where you plan to launch Claude Code. The first command shows the Claude-specific active profile; the second checks whether the live credentials match the saved state.
aisw status --tool claude
aisw verifyIf the active profile is not the one you intended, select it by name and verify again:
aisw use claude work
aisw status --tool claude
aisw verify2. Start a new Claude Code process
Account switching is a boundary for new processes. Save or close the current Claude Code session, then relaunch it after the profile check. This applies when switching in a terminal, a VS Code integrated terminal, or another editor task that starts Claude Code.
aisw use claude personal
aisw verify
claude3. If the terminal still carries the old environment
A shell hook applies profile-specific exports to the current shell. Open a fresh terminal after installing or updating the hook, then repeat the switch and verification commands. Without the hook, aisw use still writes the live credential state, but the current shell may not receive variables such as CLAUDE_CONFIG_DIR.
aisw shell-hook zsh >> ~/.zshrc
source ~/.zshrc
aisw use claude personal
aisw status --tool claude
claude4. Check the Claude storage limitation
Claude Code installations differ in how OAuth state is stored. If the installed build uses a shared live Keychain credential, isolated profile state cannot claim to own that credential independently. aisw reports that limitation instead of masking it. Follow Claude Code's normal sign-in flow and use the supported storage mode for that install.
5. Switch Claude Code accounts in VS Code
Run the switch from VS Code's integrated terminal, then close and relaunch Claude Code. VS Code launches the agent from a shell environment, so the same profile and process rules apply. For a repository that must use a particular work or client account, bind it to a context and enable a workspace guard. The hook can warn or block before Claude Code starts under the wrong setup.
aisw context create client-acme --claude client-acme-claude
aisw workspace bind . --context client-acme
aisw workspace guard --mode strictWhen the switch is working
The reliable sequence is: select the named profile, inspect its tool-specific status, verify the live state, and launch a new process. AI Switcher does not bypass Claude's authentication or usage limits; it makes the local account boundary visible and repeatable.
For the basic account-switching setup, read How to Switch Claude Code Accounts. For two accounts on one computer, see how to use multiple Claude Code accounts.
