Skip to content

Folder accounts: a project folder always uses one account - #3

Merged
Harshul1484 merged 2 commits into
mainfrom
feature/per-project-accounts
Dec 1, 2026
Merged

Harshul1484 merged 2 commits into
mainfrom
feature/per-project-accounts

Conversation

@Harshul1484

@Harshul1484 Harshul1484 commented Nov 27, 2026 •

Copy link
Copy Markdown
Owner

What

Give a project folder its own account: in that folder, Claude Code for VS Code uses the account you picked; everywhere else it uses the active account. The picked account stays usable everywhere else too, including as the active account.

  • Settings → Folder accounts is a list: add a folder path (or Choose…), pick the account, Add. Change a folder's account with its select, remove with ×. Nothing is bound by default, so the feature is off until a folder is added. The launcher to paste into VS Code's claudeCode.claudeProcessWrapper is in the same pane, with a Copy button.
  • A Set up VS Code side panel walks through the four manual steps one at a time, with real VS Code screenshots as short before/after clips (assets/guide/, taken in a throwaway profile so nothing personal is in them). It opens the first time; the ? icon reopens it.
  • Account cards show read-only Used in chips.
  • Release note added for What's new.

How

VS Code can't set a per-folder login for the extension, so the extension starts Claude through a launcher that sets CLAUDE_CONFIG_DIR to the bound account's profile for the folder Claude starts in (deepest match wins): a generated shell script on macOS/Linux, and Switcher.exe itself on Windows (about 0.5 s extra per session start).

Safety

  • One live copy per login. When the folder's account is the active login no override is applied (configDirFor and the launcher skip it; every switch rewrites the launcher). Otherwise the folder runs it from its profile and Switcher never refreshes it.
  • Known gap. Switching to an account a VS Code window is already running in its folder leaves two live copies until that window reloads; one can be signed out. Documented in the README and AGENTS.md.
  • Your ~/.claude setup (settings, CLAUDE.md, agents, commands, skills, plugins, hooks, session history) is linked into the profile from an explicit list; login, policy-limits* and remote-settings* never are.

Not covered

claude in a terminal keeps using the active account. User-scope MCP servers aren't shared into folder accounts; project .mcp.json works.

Checked

npm test: 21 pass (plus a Linux-only launcher test that runs in CI). UI checked in light and dark in the app on fake accounts; the setup guide's screenshots are Windows ones.

🤖 Generated with Claude Code

@Harshul1484
Harshul1484 force-pushed the feature/per-project-accounts branch from c2163b1 to 237f378 Compare November 27, 2026 10:02
@Harshul1484
Harshul1484 changed the base branch from feature/settings-dialog to main November 27, 2026 10:02
@Harshul1484 Harshul1484 reopened this Nov 27, 2026
@Harshul1484
Harshul1484 force-pushed the feature/per-project-accounts branch 2 times, most recently from 75c59f9 to cc81b33 Compare December 1, 2026 11:24
… for VS Code

Settings → Folder accounts: add a folder path (or Choose…) and pick its account; change it with the select, remove with ×. Nothing is bound by default. In a bound folder, VS Code's Claude uses that account; everywhere else, the active one. The account stays usable everywhere else too, including as the active login: then the folder needs no override (one live copy of the login, never two), and every switch rewrites the launcher.

A Set up VS Code side panel (opens the first time; the ? icon reopens it) walks through the four manual steps one at a time, with real VS Code screenshots as short before/after clips.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Harshul1484
Harshul1484 force-pushed the feature/per-project-accounts branch from 7990889 to cc2188d Compare December 1, 2026 13:01
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Harshul1484
Harshul1484 merged commit 8994bfc into main Dec 1, 2026
6 checks passed
@Harshul1484
Harshul1484 deleted the feature/per-project-accounts branch December 1, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant