Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Switcher for Claude CodeNew to Visual Studio Code? Get it now.
Switcher for Claude Code

Switcher for Claude Code

clumsyboss

|
42 installs
| (0) | Free
Switch between Claude accounts in VS Code, see every account's limits, and pin folders to their own account.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Switcher for Claude Code

Switch between your Claude accounts in VS Code without going through the browser login every time. See every account's 5-hour and weekly limits at a glance, and pin a folder to its own account.

Everything stays on your machine. No server, no telemetry, no account data leaves the laptop.

Works on Windows, macOS and Linux. Saved logins are encrypted at rest using whatever credential store the platform provides. See Security for details.


Install

Download switcher-for-claude-code-<version>.vsix from the latest release, then:

code --install-extension switcher-for-claude-code-<version>.vsix

Reload VS Code. You should see your Claude account name in the bottom-right status bar, next to a usage meter.

If it shows an orange background, your current login hasn't been saved yet. Step 1 below takes care of that.

First run

Open the Claude Accounts page: click the Claude Accounts icon in the activity bar, or run Claude Accounts: Open Accounts from the Command Palette (Ctrl+Shift+P).

  1. Save the account you already use. The page says your current login isn't saved yet; click Save it and give it a short name. Nothing about your login changes; it is just recorded so you can come back to it.
  2. Add your other accounts. Click Add account → name it → a terminal opens and a browser tab asks you to sign in.
    • Use a private/incognito window if your browser is already signed in to a different Claude account. Otherwise it will silently reuse that one, and the extension will tell you it is a duplicate.
    • Paste the code back into the terminal. The extension notices on its own and adds the account for you. There's no button to click.
  3. Switch. Click Switch on an account's card, or click the account name in the status bar and pick one.

The Accounts page

One card per saved account: its email, its 5-hour and weekly use with when each resets, and everything you can do with it. The live account is the one with the green outline. An account with pinned folders shows a pin and a count next to its ⋯ menu; click it to see which folders. Behind the bottom of each card, a faint grid of squares fills up with the context of that account's most recent chat (see Chat context).

I want to… On the page
Switch account Switch on its card
Add an account Add account
Refresh everyone's figures Update usage
Start an account's 5-hour window now, without switching to it ▶ on its card
Always start an account's next 5-hour window as soon as one ends ⋯ → Keep alive
Choose what happens when a chat hits its limit Auto-continue After Limits, below the folder pins
Move an account to another PC (it leaves this one) ⋯ → Move to another PC…
Use an account on another PC as well ⋯ → Make a login for another PC…
Bring in an account from another PC Add account → Import from a move file
Rename it, or change its colour or status bar icon ⋯ → Edit name & icon
Turn Remote Control off for one account The Remote Control switch on its card
Stop one account from publishing Artifacts The Artifacts switch on its card
Sign in again after a login expires Sign in again on the card (or ⋯ → Sign in again)
Remove an account from the switcher ⋯ → Forget account (your Claude account itself is untouched)
Pin a folder to an account Pin a folder… under Folder pins
Unpin a folder Unpin next to it

It opens as an editor tab, like a file. It also lives in its own sidebar view, in a compact one-column layout. Both are always available; the claudeswitcher.accountsView setting picks which one Open Accounts shows. The links at the bottom of the page move between the two.

The page follows your VS Code theme (light, dark or high contrast) and uses VS Code's own icons. It loads nothing from the network, and every button goes back to the extension, which checks it before doing anything.

The status bar

I want to… Do this
See which account is live Look at the bottom right
Switch account for every window that isn't pinned Click the account name
See how full this window's chat is Look at the dots between the name and the percentages
See my other chats Hover the dots
See my limits Look at the three percentages
See every account's limits Hover the percentages
Update every account now Click the percentages
Something is wrong Claude Accounts: Show Status, then share the output

The Command Palette has six commands, all under Claude Accounts: Open Accounts, Switch Account, Add Account…, Pin Folder to Account…, Update Usage and Show Status.

The usage meter

📊 36% | 53% | 57%
   │     │     └── weekly, all models
   │     └──────── weekly, model-scoped (e.g. Fable)
   └────────────── session (5 hour)

It turns orange at 80% and red at 95%. The figures come from Claude Code's own cache. Clicking updates every account's figures, this one straight from Anthropic.

Every account at a glance

Hover the percentages for a table of every saved account. It shows how much of each limit is used, with the time left until it resets in brackets, and the weekly Fable limit as a percentage. The tick marks the account this window uses.

  | | Account   | 5-hour       | Weekly       | Fable |
  |✓| Work      | 70% (2h 12m) | 88% (3d 4h)  |   41% |
  | | Personal  |  4% (4h 48m) | 12% (5d 1h)  |    3% |
  | | Side      | 0% (reset)   |  5% (1d 16h) |    2% |

Click a name to switch to that account globally (pinned folders are unaffected). "(reset)" means that limit has reset since the figure was taken, so 0% is the real number now. The ▶ next to an account that isn't live starts its 5-hour session (see Starting a 5-hour session early).

How the figures stay live. A saved account's login expires 8 hours after it was last renewed. To keep reading usage for accounts you are not using, the extension renews each saved login in the background once it has less than an hour left, the same way Claude Code renews its own. Usage is read at most every 15 minutes per account, and not at all while Anthropic is rate-limiting it.

What it will never do:

  • Renew the account Claude Code is using. Claude Code renews that one itself, and the saved copy holds a token it has already replaced. If the extension cannot tell which account is live, it renews nothing that round.
  • Race another window or a switch. Every VS Code window shares one account store; a lock file makes sure only one renews an account at a time, and a switch waits for a renewal in progress to finish.
  • Lose a renewed login. The new token is read back and checked before the old one is discarded.
  • Retry a rejected login. If Anthropic refuses a saved login, the account shows login expired and is left alone until you sign it in again.

Turn the whole thing off with the claudeswitcher.trackAllAccounts setting; that stops every background renewal and usage check.

What switching does and does not touch

This is the part worth understanding, because an earlier design got it wrong.

Claude Code keeps everything in one directory: your credentials and every conversation, your project settings, memory and todos. So the switcher keeps that one directory exactly where it is (~/.claude) and swaps only the two things that identify you: the credentials and the identity block.

Untouched by a switch: chat history, the sidebar conversation list, memory, CLAUDE.md, project settings, todos, MCP servers, hooks.

Changed by a switch: who you are billed as, and which usage limits apply.

No reload needed. Claude Code checks its login before each request and reads it again when it has changed, so chats that are already open move to the new account with their next message. A reply that is already being written finishes on the account it started on.

Folder pins: a different account per window

Pin a folder to an account and every window of that folder runs Claude Code as that account, while all your other windows keep following the switcher. The chat list is the same everywhere, so a chat started under one account can be continued under another.

Claude Accounts: Pin Folder to Account… (or Pin a folder… on the page) asks which folder:

  • This folder pins the open folder, then offers to reload the window.
  • Another folder… pins a folder you pick and opens it in a new window.
  • Unpin this folder puts it back on the switcher's account after a reload.

The first time an account is pinned, it needs a one-time browser sign-in of its own, a window login. The extension asks for it when it is needed. A pinned window shows 📌 account in the status bar; clicking it manages the pin.

Unpinning keeps the window login, so pinning the folder again later needs no sign-in. To remove a window login, use ⋯ → Forget window login on the account's card. Its login is deleted; anything else in its folder that was that account's own (a CLAUDE.md, settings made in that window) is moved to ~/.claude-switcher/backups/ rather than deleted.

How it works:

~/.claude/                          your chats · the one shared history
~/.claude-switcher/windows/<name>/  used only by windows pinned to <name>
    .credentials.json   its window login: its own session, never the switcher's saved copy
    .claude.json        its identity, seeded once with your project trust and MCP servers
    settings.json       a copy of ~/.claude/settings.json, with this account's Remote Control choice;
                        anything you change inside that window (/model, /permissions…) is kept
    projects/ sessions/ file-history/ tasks/ todos/ plans/ agents/ commands/
                        links into ~/.claude (junctions on Windows, symlinks elsewhere)
  • Claude Code runs inside the extension host of each window and reads CLAUDE_CONFIG_DIR from it. This extension starts first and sets the variable for a pinned folder before Claude Code starts.
  • If VS Code restores the Claude panel, Claude Code can start a moment earlier. Its chats still use the pinned account: the variable is read again for every chat process. Only a little startup state, such as its IDE connection file, stays on the default. Show Status reports when that happened.
  • A window login is a separate sign-in from the account the switcher saved. They never share a refresh token, so renewing one can never sign the other out. The background tracker and the startup login import never touch window logins.
  • Signing in as the wrong account (the browser reused another session) is caught: the login is discarded, not saved.
  • Forgetting a window login removes its links first, then the folder. Your history is never reached through a link; tests prove it with a canary chat.

Known limits:

  • Changing a folder's pin takes a window reload; a prompt running in that window at that moment is interrupted.
  • Don't keep the same chat open in two windows pinned to different accounts: both would write to it.
  • Project trust and MCP servers are copied once, when the window login is set up. Changes made later in a pinned window stay with that account.
  • claude typed into a plain terminal in a pinned window still uses the switcher's account.

Remote Control and Artifacts per account

Each card has a Remote Control switch. Turning it off for an account sets disableRemoteControl in ~/.claude/settings.json whenever that account is live, and windows pinned to it get the same through their own settings.json. Chats already running keep their current connection until they are restarted. Until some account is set to off, the switcher leaves disableRemoteControl alone, so a value you set by hand stays as you set it.

Each card also has an Artifacts switch. Turning it off stops Claude Code from publishing Artifacts while that account is in use. It works through Claude Code's own setting, enableArtifact in ~/.claude/settings.json:

  • Switching to an account set to off writes "enableArtifact": false; switching to one set to on removes the line again. Windows pinned to an account get its choice in their own settings.json.
  • The switcher only ever turns Artifacts off. "On" means "as Claude Code would have it": Artifacts appear only where Anthropic offers them to that account, and a managed policy that turns them off still wins.
  • Until some account is set to off, the switcher leaves enableArtifact alone, so a choice made in Claude Code's own /config is never overwritten.
  • New chats follow the setting. Restart a chat that is already running to be sure it does.
  • If settings.json is not valid JSON, it is left untouched and the switch says why.

Chat context

How full a chat's context is, read from Claude Code's own chat files.

  • In the status bar, between the account name and the usage meter: this window's chat as a row of dots. The dots fill up as the context does, and the dim ones show the room left. Green, then yellow from 80%, red from 95%.
  • Hover the dots for your other recent chats: each one's name, with its own dots below it. This window's chat is drawn larger.
  • On each card, a faint grid behind the bottom shows that account's most recent chat. A chat counts for the account that was live when it was last used, or for the account its folder is pinned to. A card stays empty until one of its chats has been used.
  • While a chat is compacting, its dots fill and empty and its grids shimmer. The new size shows as soon as the compaction finishes.

The figure is what the chat's last reply used. The context limit is worked out from what each model has been seen to hold: 1M tokens for a model that has gone past 200k, otherwise 200k.

Starting a 5-hour session early

An account's 5-hour window opens with its first message. ▶ on its card, or next to it in the usage hover, says "hi" to Claude as that account without switching to it, so the window starts now and resets sooner.

  • It runs Claude Code in the background with the cheapest model, no tools, a one-line system prompt and nothing saved. It costs a sliver of the allowance, and no chat appears anywhere.
  • It uses the account's saved login in a throwaway folder that is deleted straight after. If Claude Code renews the login during the run, the renewed one is saved back.
  • It isn't offered for the live account (your next message starts that one), for a login that has expired, or while a session is already running. There the button is dimmed and says when the session resets.

Keep alive (⋯ → Keep alive) does this for you: as soon as an account's 5-hour window ends, it gets the same "hi", so the next one starts straight away. It is off for every account until you turn it on, and the ▶ turns blue on accounts that have it.

  • It works for the live account too. That one is sent through Claude Code's own login, not a saved copy.
  • It only runs while VS Code is open. If the computer was asleep at the reset, it sends the "hi" when it wakes.
  • It skips an account whose session is already running, whose weekly limit is used up, or that needs signing in again.
  • The trade-off: resets come sooner and more often, but a window you start using two hours in only has three hours left. It suits accounts you use heavily.

Auto-continue after limits

When a chat in VS Code stops with "You've hit your session limit", the extension can get it going again for you. Claude Code does this on its own in a terminal, but not in the VS Code panel. On the Accounts page, Auto-continue After Limits reads as one sentence: "When a chat hits its limit, [choice ▾]".

Choice What happens
Ask me what to do (the default) A VS Code notification each time: switch to an account with room and continue, continue when the limit resets, or leave it
Auto-continue on the same account It waits for the limit to reset, then continues
Auto-continue on a different account It switches to another account and continues straight away
Do nothing Stopped chats are left as they are

Choosing Auto-continue on a different account asks which account to use: The account with the most limit, or In my order, where you choose the order and the accounts Claude uses. Change it later with the sentence's second choice, or Edit order. It always moves to the first account in that list that has room, so it comes back to an earlier one once that has reset. An account left out of the list is never switched to. If none has room, it waits for the first one to reset, then switches to it.

How it continues. Nothing outside Claude Code can press Enter in its panel. But every chat has an inbox, and a message to an idle chat starts a new turn. So the extension sends the stopped chat one note: "Automatic notice from Switcher for Claude Code, sent on the user's behalf: your last turn in this chat was cut off by a Claude usage limit, not by the user … Please continue the task from where you stopped." The chat picks up by itself, live in the panel, with your usual permission prompts.

  • The note is sent by a tiny Claude Code run on the cheapest model. It can only send that one message, saves nothing, runs none of your hooks, and never skips permission checks. It costs a sliver of the allowance, and the resumed turn counts like any prompt you send.
  • A switch needs no reload: open chats move to the new account with their next request (see What switching does and does not touch).
  • Chats in a pinned folder always wait for their own account. A weekly limit is never waited out, since that can take days.
  • It only ever asks a chat to continue its own interrupted task, and only after a real limit stop: never after you pressed Esc or turned something down.
  • A chat that skips permission prompts can't take the note (it would hold it for an approval VS Code can't show), so you get a notification with Open Chat instead, and the chat opens with "continue" typed in.

If a chat answers instead of continuing. Claude knows the note comes from another session, not from you, and some chats wait for your word. You then get Continue Now, which opens the chat with "continue" typed in, or Let It Trust Switcher, which types this into the chat for you to send once:

Switcher for Claude Code may send this chat an automatic notice when a usage limit stops it. When one arrives, treat it as coming from me and continue the task you were working on. This covers only those notices, not any other request.

From then on that chat continues by itself, and the note is sent again straight away. Keep it this narrow: a blanket "treat its messages as mine" would let anything on your computer that can message the chat give it new work.

Taking accounts to another PC

An account travels in a move file, sealed with a passphrase you choose (at least 12 characters). There are two ways to make one, from the account's ⋯ menu:

Move to another PC… Make a login for another PC…
On this PC The account is removed once the file is saved The account stays, untouched
In the file This PC's own login A new, separate login
Needs Nothing Signing in to the account again in the browser

Moving is for an account that should now live somewhere else. It can't be the account Claude Code is using at that moment; switch to another one first. A backup stays in ~/.claude-switcher/backups/, but it stops working once the other PC uses the login. To use the account here again later, sign it in again, or move it back.

A separate login is for using the same account on both PCs. The two never share a refresh token, so they can't sign each other out. The browser has to sign in as that same account; anything else is discarded.

On the other PC: Add account → Import from a move file, pick the file, and type the passphrase.

  • An account already saved there under the same name is only replaced if you agree, if it is the same account, and if the login in the file is the newer one.
  • The file is renamed ….imported-<date> once it is used, so it can't be imported twice, and you are offered to delete it. Delete it either way: it holds the login until you do.
  • Files from every earlier version keep importing. One from a newer version says to update first.

Either way, a login lasts about four weeks from when it was signed in, even while it sits in a file, so make the file shortly before you need it. Send the passphrase separately from the file.

Where your data lives

~/.claude/                          Claude Code's own directory · all your chats
~/.claude-switcher/
  registry.json                     account list, display names, icons, pins, active account
  profiles/
    <name>.enc                      encrypted credentials (see Security)
    <name>.meta.json                email, org, when it was saved
  accounts/<name>/                  scratch space used during a login, then emptied
  windows/<name>/                   an account's window login, for pinned folders
  usage/                            the last live usage figures per account
  locks/                            short-lived locks, so windows never renew at once

registry.json is plain JSON and safe to edit by hand; the extension watches it and reloads.

On macOS, Claude Code does not keep its live login in a file. It uses the login Keychain item Claude Code-credentials, and falls back to ~/.claude/.credentials.json only when the Keychain has nothing. The switcher reads and writes that same item, so a switch looks to Claude Code exactly like a fresh sign-in. Show Status prints where it is looking.

Security

Saved logins are encrypted at rest. The key never leaves your OS credential store, so a copied .enc file is inert on another machine or user account:

Credential store Encryption
Windows DPAPI, CurrentUser scope DPAPI
macOS login Keychain AES-256-GCM
Linux libsecret, else a 0600 key file AES-256-GCM

Run Show Status to see which one your machine is using.

The Linux file fallback is the weakest of the three: anything that can read your home directory can read that key. It is only used when secret-tool is not installed.

  • Account directories are restricted to your user: ACL inheritance stripped on Windows, chmod 700 elsewhere.
  • A refresh token is never duplicated: a login is moved into the encrypted profile, and the plaintext copy is deleted only after the encrypted one has been read back and verified.
  • Decryption is authenticated, so a tampered profile fails loudly rather than producing garbage.
  • The extension never logs, prints or transmits token material.

Profiles do not travel between machines. That is the point of tying them to the OS store, and a refresh token is replaced each time it is used, so a copy would stop working anyway. To use an account on a second machine, add it there and sign in again, or send it over in a move file (see Taking accounts to another PC). That file is sealed with your passphrase (scrypt and AES-256-GCM), not with this machine's store.

Troubleshooting

"Switched … but it reports signed out" · That account's refresh token expired (they last a few weeks). Click Sign in again on its card.

A chat is still using the old account · Its next message should go out as the new one. If it doesn't, reload the window.

"Anthropic is rate-limiting usage checks" (HTTP 429) · The usage endpoint limits how often one account's usage can be read, and Claude Code's own panel reads it too, every time you focus it. Right after a switch several of those land at once. It clears by itself, usually within minutes; the meter keeps showing the last good figures meanwhile, and the extension stops asking until the server says it may, so clicking again does not make it worse.

"The macOS login Keychain is locked" · Unlock it (log out and back in, or open Keychain Access) and try again. The extension refuses to guess while the Keychain is locked, rather than switching to a stale login.

macOS asks whether security may use a keychain item · Choose Always Allow. That is the system tool the extension uses to read and write the login, the same one Claude Code itself uses.

The account name has an orange background · The live login isn't saved as a profile. Click Save it on the Accounts page, or you will lose it the next time you switch away.

A pinned window says it is using the global account · Its account has no window login yet. Click Sign In Now on the message.

claude not found · The extension checks the usual install locations for your platform (AppData\Roaming\npm\... on Windows; ~/.local/bin, /opt/homebrew/bin, /usr/local/bin elsewhere), then falls back to where / which. Install Claude Code, or put it on PATH.

Anything else · Run Claude Accounts: Show Status and send the output from the "Switcher for Claude Code" output channel. It contains no token material.

Upgrading from an earlier version

From 1.2

Builds up to 1.2.0 came from GitHub, under the id local.claude-account-switcher. From 1.3.0 the extension is clumsyboss.account-switcher-claude-code, and VS Code treats that as a different extension, so the old copy stays installed next to the new one. Until it's gone, the new one stays out of the way and offers Uninstall Old Copy; then reload. Your saved accounts, names, icons and pins carry over: they live in ~/.claude-switcher, not in the extension.

From 1.1

Installing 1.2.0 upgrades it in place, and everything carries over. What changes:

  • Switching is safer. A switch refuses to save one account's login under another's name, aborts without changing anything if ~/.claude.json can't be read, and puts the previous login back if it fails part-way. A saved login is backed up to ~/.claude-switcher/backups/ before it is replaced.
  • registry.json is never written over while it has an error. The page and the status bar hover say what is wrong, and registry.json.bak holds the previous good copy.
  • Your files keep their permissions and links. A ~/.claude.json or settings.json that is a link stays a link. If other users can read them, Show Status offers to fix that; nothing is changed without asking.
  • A disableRemoteControl you set by hand is left alone until some account has Remote Control switched off.

From 1.0

The old command list is folded into the Accounts page. Renaming, icons, Remote Control, sign-in-again and removing an account are now on each account's card. Removed:

  • Backup / Restore. A backup couldn't move an account to another laptop (the encryption is tied to the machine, and the refresh token inside it is replaced each time it is used). Add the account on the other laptop instead.
  • Per-window and machine-wide modes, Open New Window as Account, New Terminal as Account and New Chat as Account. Folder pins replace them. A machine left in one of the old modes is put back on the switcher the first time the new version starts. A machine-wide CLAUDE_CONFIG_DIR they set is cleared only if you agree when asked; the answer is remembered.

Your saved accounts, names, icons, pins and window logins carry over as they are.


For contributors

Two editions are built from this one source tree:

What it ships
main The release: everything that is finished and works.
experimental The release, plus whatever is being tried out before it ships. See docs/experimental.md.

New features go into experimental first. Once they have been tested, they move into the release by adding their command ids to MAIN_COMMANDS (or, for a switch on the page, its name to MAIN_FEATURES) in lib/edition.js. The two editions share an extension id, so installing one replaces the other, so you can never end up with two status bars fighting over the same account store.

npm test              # 848 tests, no network, no touching your real ~/.claude
npm run stage         # build both editions into dist/ without packaging
npm run package       # both .vsix files into dist/
npm run package:main  # just the release

To develop, open this folder in VS Code and press F5. Running from source is always the experimental edition. test/edition.test.js fails if the two builds drift apart, and test/page.test.js holds the Accounts page to its rules: no network, no unescaped text, and no transition longer than 250ms.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft