Support per-directory account switching
Feature Request
When working across multiple projects — some personal, some work — it would be useful to have Claude Code automatically use a specific account based on the working directory.
Current behavior
Account switching must be done manually (e.g. via /account or re-authenticating). There is no way to associate an account with a directory or project.
Desired behavior
Allow users to configure a preferred account per directory, similar to how git supports per-directory config via .gitconfig includes. For example, a .claude/settings.json or .claude/settings.local.json entry like:
{
"account": "work@example.com"
}
Claude Code would then automatically use that account when launched from (or within) that directory.
Use case
Developers who have both a personal and a work Claude account want to ensure the right billing/org account is used depending on which project they're working in — without needing to remember to switch manually.