A tool used the wrong account in this folder
A tool used another account than the one you picked. Devpit can tell you why in one command, in the folder where it happened:
devpit accounts verifyIt compares, for each tool, the account Devpit expects in this folder with the one the tool reports, and prints a fix for every problem it finds.
Why it happens
Section titled “Why it happens”- A closer rule wins. Rules apply to a folder and every folder inside it, and the nearest one wins. A rule on a subfolder can beat the rule you just made.
- A variable in the terminal wins.
GH_TOKEN,GITHUB_TOKEN,VERCEL_TOKEN,FIREBASE_TOKEN,SUPABASE_ACCESS_TOKEN,CLOUDFLARE_API_TOKEN,ANTHROPIC_API_KEYandGIT_AUTHOR_EMAILall make a tool ignore the signed-in account. Devpit never clears them; verify lists them. - The terminal is older than the rule. The first rule for a tool puts Devpit’s shim folder on your PATH. Terminals that were open before do not see it.
- Another copy of the tool runs first. A copy on the system PATH, or a PowerShell function or alias with the tool’s name, runs before Devpit’s shim.
- The tool was started another way.
npx vercel, an editor extension and a desktop app do not go through Devpit’s shim. - Git: the repository says otherwise. A
user.emailset inside the repository beats every rule. A linked worktree follows the rule of its main repository’s folder. - Convex picks the account per project, in
.env.local. Devpit shows it but does not switch it. - The rule names an account that no longer exists. The account was removed or renamed after the rule was made. Devpit skips that rule and the next rule out, or the account for everywhere, applies instead. The same goes for the account picked for everywhere: if it is gone, the tool’s default sign-in is used.
When a rule names a missing account
Section titled “When a rule names a missing account”Verify and devpit accounts say it in one of these ways:
The rule on C:\Work says Claude Code should use "work", but that account no longer exists, so the rule is skipped.Claude Code is set to use "work" everywhere, but that account no longer exists, so the default account is used.Devpit never removes or changes the rule by itself. Pick one:
- Point the folder at an account that exists:
devpit <tool> use <name> --folder "C:\Work". - Remove the rule: open Accounts, press b for Browse folders, and change or remove it there.
- For everywhere, pick the account again:
devpit <tool> use <name> --everywhere. - If the account was signed out rather than removed, see Login expired or signed out.
Each of these shows a preview and asks first.
How to fix it
Section titled “How to fix it”- In the folder, run
devpit accounts. The last column says why each tool uses its account. - If the why is not the rule you expected, open Accounts in Devpit, press b to browse folders, and check which rules cover this folder.
- Run
devpit accounts verifyand follow the fix it prints. - If the fix says a variable is set, remove it from this terminal (
Remove-Item Env:GH_TOKENin PowerShell) and from wherever sets it, then open a new terminal. - If the tool was found before Devpit’s shim, see The shim is not first on PATH.
- For a one-off command with another account, run
devpit <tool> run <name> -- <command>.
Rules apply in terminals only. For VS Code extensions and desktop apps, see Old account in VS Code or a desktop app.
Common questions
How do I see which account a tool uses in a folder?
Run devpit accounts in that folder, or open Accounts in the app. Each tool shows the account it uses there and why: everywhere, a folder rule, or a project file. devpit accounts verify also asks the tools themselves and compares.
Can two folder rules disagree?
Yes, and the nearest folder wins, one tool at a time. A rule on C:\Work\client wins over a rule on C:\Work inside client. The tool page in Accounts shows the chain of rules and which one won.
