Switch the Claude Code
extension in VS Code between several Claude accounts, for example a personal and a work account,
from a button in the status bar.
Unofficial. This extension is not made, endorsed or supported by Anthropic.
Requirements
- Windows (x64).
- VS Code 1.94 or later with the Claude Code extension (
anthropic.claude-code) installed.
Tested with Claude Code 2.1.332.
- Claude Code running in its chat panel (side bar or editor tab), not in terminal mode
(
claudeCode.useTerminal set to false).
How to use
Click Claude: <account> at the right end of the status bar. The menu has:
| Item |
What it does |
| personal, work, ... |
Switch to that account. New Claude Code chats use it. |
| Restart Claude chats on this account... |
Make the chats that are already open use the selected account (see below). |
| Add a new account... |
Create an account and log in to it. |
| Delete an account... |
Sign an account out and delete its folder. Not offered for personal. |
The button is orange while an account other than personal is selected.
Adding an account
- Click the button, then Add a new account....
- Enter a name, for example
work (lowercase letters, digits and dashes).
- A terminal opens with a Claude login for that account. Sign in with that account in the browser.
Log in only through this terminal login. Signing in from the Claude Code chat's own sign-in
screen always saves the login to the personal account, whichever account is selected.
Switching an open chat
A chat that is already open keeps running on the account it started with. After you switch,
a notification offers:
- Restart Claude chat: ends only the Claude chat processes in this window. Your chat stays open
on the same conversation; send your next message and it continues on the new account. Editors,
terminals and other extensions are not touched.
- New conversation: starts a new chat on the new account.
Restarting stops any reply that is in progress. Run /status in the chat to check which account it uses.
Commands
| Command |
|
Claude: Switch Account |
Opens the button's menu. |
Claude: Add Account |
Same as Add a new account.... |
Claude: Delete Account |
Same as Delete an account.... |
Claude: Restart Chats on Current Account |
Restarts the open chats on the selected account. |
Claude: Log In Again to Current Account |
Opens the terminal login for the selected account, for example when its login has expired. |
How it works
- Each account has its own Claude config folder:
personal is %USERPROFILE%\.claude, any other
account <name> is %USERPROFILE%\.claude-<name>.
- Switching sets or removes
CLAUDE_CONFIG_DIR in your user setting claudeCode.environmentVariables.
Claude Code passes it to every new claude.exe it starts. Other entries in that setting are kept.
- A new account folder links
ide, projects, skills and plugins to the personal folder,
so all accounts share conversation history, IDE integration, skills and plugins. settings.json
is copied, so later changes to it are not shared.
- Deleting an account removes those links first and never deletes anything in the
personal folder.
- Restarting a chat sends its
claude.exe a Ctrl+Break so it exits cleanly; if it is still running
after 5 seconds it is ended forcibly, and the chat may then show "process exited with code 1"
(click Restart in the chat).
The extension makes no network requests of its own and stores nothing outside the folders and the
setting described above.
Limitations
- The selected account applies to the whole of VS Code, not per workspace: Claude Code only reads
claudeCode.environmentVariables from user settings.
- Remote windows (Remote-SSH, WSL, Dev Containers) are not supported: there Claude Code runs on the
remote machine.
- Windows only.
Uninstalling
Switch to personal first (or delete the CLAUDE_CONFIG_DIR entry from claudeCode.environmentVariables
in your user settings.json), then uninstall the extension. Account folders %USERPROFILE%\.claude-<name>
are left in place; delete them from the menu before uninstalling if you no longer need them.
License
MIT