Claude Multi-Account SwitcherQuickly switch between Claude accounts (subscriptions) in Claude Code inside VS Code, with live usage limits for all your accounts at a glance. WhyYou have several Claude subscriptions. When one account runs out of usage (the 5-hour or weekly window), switch Claude Code to another account with a single click — no manual logout and re-login. Features
Requirements
How it works
Token handling (why you no longer need to re-authorize daily)Claude Code's OAuth refresh tokens are single-use: every refresh returns a new refresh token
and invalidates the old one. When two programs hold copies of the same login and one of them
refreshes without telling the other, the other one gets
Do not use
|
| Command | Description |
|---|---|
Claude: Save current account as profile |
saves the currently logged-in account |
Claude: Add another account (isolated login) |
logs in to another account without touching the current one and saves it |
Claude: Switch account |
QuickPick with usage limits |
Claude: Refresh usage limits |
forces a refresh |
Claude: Say Hi on account |
warms up inactive saved accounts via claude -p |
Claude: Open independent account window |
opens this project in a new VS Code window scoped to one account |
Claude: Log in from terminal (replaces the current account) |
opens claude auth login for the current config dir, or falls back to browser authorization when CLI is unavailable |
Claude: Authorize in browser (without CLI) |
completes OAuth authorization in the default browser |
Claude: Reauthorize account profile |
opens isolated login for a saved profile without touching the active account |
Claude: Complete profile reauthorization |
imports the completed isolated login into that same profile |
Claude: Undo last switch |
restores the previous account from .bak |
Claude: Remove / Rename account profile |
manage profiles |
Settings
| Key | Default | Description |
|---|---|---|
claudeSwitcher.pollIntervalSeconds |
240 |
auto-refresh interval (min 180) |
claudeSwitcher.autoReloadAfterSwitch |
false |
auto-reload the window after switching |
claudeSwitcher.credentialsPath |
"" |
override the path to .credentials.json |
claudeSwitcher.warnThresholdPercent |
80 |
warning threshold (% → red bar) |
claudeSwitcher.claudeCommand |
claude |
CLI command used for CLI login and Say Hi; set the full path if VS Code cannot find it |
claudeSwitcher.sayHiModel |
haiku |
model alias passed to claude -p |
claudeSwitcher.sayHiPrompt |
Hi |
prompt used by Say Hi |
claudeSwitcher.sayHiTimeoutSeconds |
120 |
Say Hi timeout |
Troubleshooting Say Hi
If Say Hi reports that claude is not recognized, the VS Code extension process cannot find the
Claude Code CLI. Try these in order:
- Run
where claudein PowerShell or CMD. - If it is found, restart VS Code so the extension host gets the refreshed PATH.
- If it is not found, install Claude Code CLI. On Windows PowerShell, the official installer is:
irm https://claude.ai/install.ps1 | iex
- If the command exists but VS Code still cannot see it, set
claudeSwitcher.claudeCommandto the full path, for exampleC:\Users\you\AppData\Roaming\npm\claude.cmdor the path returned bywhere claude.
Parallel VS Code windows
Use Claude: Open independent account window or the Window button on an account card.
The extension writes the saved account credentials to a per-account config directory, generates a
.code-workspace file for the current folder/workspace, and opens it in a new VS Code window.
The default Claude Code login file is global, so two regular VS Code windows share the same active account. Independent windows avoid that by setting both:
{
"claudeCode.environmentVariables": [
{
"name": "CLAUDE_CONFIG_DIR",
"value": "C:\\Users\\you\\.claude-user2"
}
],
"claudeSwitcher.credentialsPath": "C:\\Users\\you\\.claude-user2\\.credentials.json"
}
Open one generated window per account you want to run. The extension refuses to open a second active window for the same saved profile: two Claude Code sessions in different config directories would each try to spend the same single-use refresh token.
Security and disclaimers
- This extension does not collect telemetry, analytics, account identifiers, prompts, credentials, tokens, usage data, or any other personal data.
- No login data is sent to the extension author, publisher, marketplace backend, or any custom third-party server controlled by this extension.
- Saved profile secrets are stored in VS Code's encrypted SecretStorage.
- Claude Code itself requires local
.credentials.jsonfiles. For account switching, Say Hi, and independent windows, the extension writes credentials only to local Claude Code config directories on your machine, including isolated per-accountCLAUDE_CONFIG_DIRfolders under the extension's global storage. - Credentials are never intentionally logged. Protect your machine and OS user account, because anyone with local filesystem access to your user profile may be able to read Claude Code credential files.
- Network requests made by the extension go only to Anthropic endpoints needed for token refresh,
usage-limit checks, and identifying which account a login belongs to (
/api/oauth/profile, the same endpoint Claude Code calls after login). Say Hi is executed through the local Claude Code CLI, which communicates with Anthropic as Claude Code normally does. - This tool is for managing your own accounts.
- The usage endpoint and the token-refresh flow are unofficial and may change or stop working on Anthropic's side.
- Currently the file-based
.credentials.jsonmodel is supported (Windows/Linux). The macOS Keychain is not supported yet.
Development
npm install
npm run watch # build in watch mode
# press F5 in VS Code -> Extension Development Host
npm run build:vsix # build the .vsix package
License
MIT