[FEATURE] Multi-account support in VSCode extension
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Summary
The Claude Code VSCode extension does not support switching between multiple Claude accounts, making it impossible to use a second account when the first one hits its usage quota.
Motivation
Power users who rely heavily on Claude Code for coding sessions often exhaust the usage quota of a single Claude Pro account within a day. A common workaround is to maintain two separate Claude Pro accounts and switch between them. This works well in the terminal via CLAUDE_CONFIG_DIR, but the VSCode extension always uses a single fixed account with no way to switch.
Current behavior
- The terminal CLI supports multiple accounts via the
CLAUDE_CONFIG_DIRenvironment variable (e.g.CLAUDE_CONFIG_DIR=~/.claude-acc2 claude) - The VSCode extension reads from its own config directory (
~/.claude-code-gui/) and does not respectCLAUDE_CONFIG_DIR - The only way to switch accounts in the extension is to manually
/logoutand re-authenticate, which is disruptive
Expected behavior
The VSCode extension should allow users to:
- Add and save multiple Claude accounts
- Switch between accounts from the extension UI (e.g. a dropdown in the Account & Usage panel)
- Optionally: show remaining quota per account so users know when to switch
Workaround
Currently using terminal aliases as a partial workaround:
alias claude-a="claude"
alias claude-b="CLAUDE_CONFIG_DIR=~/.claude-acc2 claude"
This works in the terminal but the VSCode extension always stays on the primary account.
Environment
- OS: macOS
- Claude Code VSCode extension
- Plan: Claude Pro (multiple accounts)
Proposed Solution
The CLI already handles multiple accounts cleanly via CLAUDE_CONFIG_DIR. The VSCode extension could adopt a similar approach:
- Account profiles — Allow users to register multiple accounts in the extension settings, each mapped to a separate config directory (e.g.
~/.claude,~/.claude-acc2) - Account switcher UI — Add a dropdown or button in the existing Account & Usage panel to switch the active account without requiring a full logout/login flow
- Quota awareness — Display remaining session and weekly quota for each saved account, so users know when to switch
- Respect
CLAUDE_CONFIG_DIR— As a simpler short-term fix, the extension could read theCLAUDE_CONFIG_DIRenvironment variable from the workspace or shell environment, consistent with how the CLI already works
The last point (respecting CLAUDE_CONFIG_DIR) would be the lowest-effort change and would immediately unblock users who already manage multiple accounts via the terminal.
Alternative Solutions
No response
Priority
High - Significant impact on productivity
Feature Category
Configuration and settings
Use Case Example
No response
Additional Context
No response
the multi-account-as-quota-pool pattern shows up everywhere right now (cursor threads, windsurf, the t3code issue floating around) and it's almost always a symptom of one missing thing: a real-time read of where each account actually sits against the rolling 5h and weekly window before you switch. without that, rotation just round-robins into accounts that are already cooling down. the headers anthropic returns on every /v1/messages call (anthropic-ratelimit-unified-5h-utilization, 7d-utilization) are the same numbers claude.ai/settings/usage shows, so the switcher should key off those per CLAUDE_CONFIG_DIR, not off a 429 after the fact. otherwise you're trading one mid-refactor stall for a slightly later one.
This is an important feature for me too. If have a company claude account and personal account I might like to use one for one project and another for another project in the same IDE - multi account support is important even for compliance to company policies. The same applies for the claude-extension for vscode and for the claude agent in the cli.
Yes, the same as said above. I have a work account, and need to set up a personal account, but being able to switch between them is critical for my use.
Same as above. Being able to easily switch between two accounts would be a great addition to the extension.
I have the same concern. I have a personal account and a company provided one. I want a good machanism to switch between these two in Visual Code IDE.
FYI my work-around was to use Claude privately but get Github Copilot from work since we have a choice. That way I can cleanly keep things separate. But would prefer to also use Claude for work.
Furthermore changing the account per context would be nice. So multiple sessions can use different accounts in parallel.
That's something the current workarounds can not provide easily.
Furthermore changing the account per context would be nice. So multiple sessions can use different accounts in parallel.
That's something the current workarounds can not provide easily.
it is possible with the “work around” I mentioned above by using a different provider entirely
You are a genius @lsmith77 but a lot of people (like me) have non-copilot claude only for both accounts
I can confirm a second, concrete multi-profile failure in the current VS Code extension.
Environment
- macOS
- VS Code 1.129.1 arm64
- Anthropic Claude Code extension 2.1.217
The extension bundle resolves exactly one Claude root:
process.env.CLAUDE_CONFIG_DIR ?? path.join(os.homedir(), ".claude")
It has no configuration contribution for additional roots and no discovery of sibling profile directories. On this machine, the canonical root is ~/.claude/projects, while multiple active profiles have histories under ~/.claude-accounts/*/projects. Those non-default histories are invisible to the extension even though they contain valid recent JSONL transcripts.
There are two distinct product gaps:
- The extension needs a supported profile/root switcher or configured-root list so it can discover/select multiple
CLAUDE_CONFIG_DIRhomes. - It does not register VS Code's native chat-sessions provider API at all. Its sessions can only appear in the extension-owned Past Conversations view, never under VS Code/Copilot's generic Sessions list.
For multi-account users, a useful short-term behavior would be to honor the extension-host CLAUDE_CONFIG_DIR consistently and expose the effective root in diagnostics. Longer term, profiles should be selectable without relogging and their histories should remain distinct.
On top of the manual account-switcher proposed here, I'd like to request an automatic failover option:
When the active account hits its usage limit/quota, Claude Code (CLI and/or VSCode extension) could automatically switch to a second pre-authenticated account instead of blocking the session and requiring manual /logout + /login or a manual dropdown selection.
Use case: I maintain two separate Claude subscriptions specifically to keep working past a single account's daily quota. Today this requires me to notice the quota error and manually re-authenticate (or, per the CLI workaround mentioned above, manually swap CLAUDE_CONFIG_DIR). An automatic fallback — e.g. detect the quota-exhausted error and transparently retry the request against a second configured account/profile — would remove that manual step entirely and make multi-account usage seamless, especially for long/unattended sessions.
This could build on the same underlying multi-account/profile mechanism proposed here, with an added "auto-switch on quota exhaustion" setting.
+1, hit this today on Windows 11 setting up two accounts split by workspace folder (one Pro, one Team, different orgs/clients).
Confirmed the split works correctly via the CLI (CLAUDE_CONFIG_DIR per directory) — verified the two .credentials.json files have genuinely different accessToken/refreshToken and different subscriptionType (pro vs team), and claude auth status --text correctly reports the right account per folder.
But the VSCode extension does not follow this at all: both workspace windows kept showing the same account in /usage, and real token consumption was attributed to a single account regardless of which folder/window was active — consistent with the extension always reading its own fixed ~/.claude-code-gui/ config dir instead of respecting CLAUDE_CONFIG_DIR or any per-workspace setting.
Would be great if the extension either respected CLAUDE_CONFIG_DIR (so the existing CLI-based workaround would "just work") or exposed an account switcher in the UI as described above. In the meantime we're falling back to the integrated terminal (claude CLI) for the second account instead of the extension panel.
Faced the same issue with personal Max and corporate Team plans
How come this has not been implemented yet!? I just realized I burned all my personal usage doing work stuff because not only does this not work but it silently uses a shared storage for credentials? This is outrageous for a company the size of Anthropic nowadays. Please provide at least a workaround that doesn't silently use the last authenticated account for all agent windows so at least one can control usage.
+1 from someone who uses Claude Desktop and Claude Code everyday.
Microsoft, Google, Slack, Github and many others provide a simple way to change the accounts within the same app/product. I'm sure Anthropic can do the same.
Many people work for multiple companies and it makes sense to have a separate Claude account for each so the work stays within that company's account.
At the moment if we have someone who works for multiple companies they often just do the work in their own personal account, which means Anthropic misses out on another user licence every month.
If users were able to easily add accounts to Claude Desktop, Claude Code (including VSC plugin) and switch between them this would enable us to buy and invite users to our company's Claude team/enterprise plan and the work would stay within that account.
So Anthropic this is a simple way to get more user accounts per month and make more money.
Thanks for listening :)
Chris
Same need here, with a constraint that I think sharpens the request: two separately paid Claude Pro subscriptions, used in a single VS Code window.
Current state (extension v2.1.301, Windows 11): the only separation available is CLAUDE_CONFIG_DIR via claudeCode.environmentVariables in a folder's .vscode/settings.json. That is per-folder, not per-tab, and it is only partially honored — see #56100 (the Local Sessions and Account & Usage webview panels keep showing the old account) and #34888 (the extension displays one account while usage is billed to another). The billing mismatch is what makes the workaround unsafe for people paying for both accounts: you cannot tell which quota a session is consuming until it runs out.
What would actually solve it, roughly in priority order:
- Sign in to more than one Anthropic account in the extension, keeping both tokens stored.
- Assign an account per Claude tab, so two accounts can run simultaneously in the same window on different projects or worktrees.
- Show the active account in each tab's header — this alone would fix the silent wrong-account billing.
- Isolate auth, session history, usage limits and account-specific settings.
- Switch the account on one tab without signing out the others.
Items 3 and 4 matter most to multi-subscription users. Confirmed against the changelog through v2.1.302: no multi-account or account-switching support has shipped.
Related: #43911 (a claude.configDir setting), #24963 (profiles in general), #30538 (extension always reads ~/.claude/).
Not a fix for the official extension, but if CLI sessions work for you: the Agent Guild extension (mine) opens a page in a VS Code tab where Claude Code sessions under two accounts run side by side, each with its own usage meter. https://marketplace.visualstudio.com/items?itemName=OddEssentials.agent-guild
My workaround is to use different VSCode profiles. You can configure a different Claude config in the profile's setting.json:
"claudeCode.environmentVariables": [
{
"name": "CLAUDE_CONFIG_DIR",
"value": "C:\\Users\\<user>\\.claude-work"
}
],
"terminal.integrated.env.windows": {
"CLAUDE_CONFIG_DIR": "C:\\Users\\<user>\\.claude-work"
},
If you then also set a custom color for your title bar it's easy enough to tell what profile you're using at a glance.
or you can setup two docker containers, remote ssh into them from your host, and setup one with the work account and it's related projects and the other for the personal account.
Workaround: run separate VS Code instances, each with its own Claude config directory
The extension stores its login in ~/.claude, which is shared by every VS Code window. Signing in to a second account in one window therefore replaces the login in the others. Setting CLAUDE_CONFIG_DIR per VS Code instance fixes this. I tested it on Linux with bash.
1. Add aliases to ~/.bashrc
alias code-work='CLAUDE_CONFIG_DIR=~/.claude-work code --user-data-dir ~/.vscode-work --extensions-dir ~/.vscode-work/extensions'
alias code-personal='CLAUDE_CONFIG_DIR=~/.claude-personal code --user-data-dir ~/.vscode-personal --extensions-dir ~/.vscode-personal/extensions'
Run source ~/.bashrc. --user-data-dir and --extensions-dir make each one a fully separate VS Code instance. The directories are created on first launch.
2. Pin the variable in each instance's settings
If an instance is already running, launching it again from the shell hands off to the running process and ignores the shell variable. Setting it in the settings avoids that. In each window, open Preferences: Open User Settings (JSON) and add the matching entry, using absolute paths because ~ isn't expanded:
Work:
"window.title": "WORK — ${dirty}${activeEditorShort}${separator}${rootName}",
"workbench.colorCustomizations": { "titleBar.activeBackground": "#7a2e2e" },
"claudeCode.environmentVariables": [
{ "name": "CLAUDE_CONFIG_DIR", "value": "/home/dev/.claude-work" }
]
Personal:
"window.title": "PERSONAL — ${dirty}${activeEditorShort}${separator}${rootName}",
"workbench.colorCustomizations": { "titleBar.activeBackground": "#2e5a7a" },
"claudeCode.environmentVariables": [
{ "name": "CLAUDE_CONFIG_DIR", "value": "/home/dev/.claude-personal" }
]
3. Restart and sign in
Close all VS Code windows, then open each project from a terminal:
cd ~/projects/work-project && code-work .
cd ~/projects/personal-project && code-personal .
Sign in to Claude once in each window with the matching account. The logins now stay separate.
Notes
- Don't launch plain
codeor use the desktop icon, because that opens a third default instance. File → New Window from inside an instance stays in the same instance. - Extensions are installed separately per instance, so install them again or copy
~/.vscode/extensionsonce. - Optional: to tell the windows apart, set
"window.title": "WORK — ${activeEditorShort}${separator}${rootName}"and atitleBar.activeBackgroundcolor in each instance's settings. - The
claudeCLI outside VS Code still uses~/.claude. For another account there, runCLAUDE_CONFIG_DIR=~/.claude-work claude.