Repository navigation
Directory pins (switch <name> --here) work again on Claude Code 2.1.312 — the build inside the
VS Code extension — which silently ignored them and ran the chat on the global account.
Fixed
- Claude Code 2.1.312 no longer reads
CLAUDE_CODE_OAUTH_TOKENfrom a repo's
.claude/settings.local.json. A pin now also holds the same token asANTHROPIC_AUTH_TOKEN,
which 2.1.300 and 2.1.312 both read. Measured with a fake API and then the real one: it beats
the global account, a change reaches chat tabs that are already open (about a second later),
and the request is billed to the account's plan exactly as before. offandmainempty that key instead of removing it, so an open chat tab leaves the token
account at once; runningoffagain removes the empty key.- A repo that sets an
ANTHROPIC_AUTH_TOKENof its own (a gateway key) is not pinned — the pin
would replace it.--allskips such a folder;offandmainleave the key alone. syncandreassignreport a pin file they cannot edit and carry on with the rest.
What 2.1.312 cannot do
Keep a directory on main while the global account is a token one: no repo-level setting hides
the global token from it. here main, ls, usage and switch say so when it happens. Make
main the global account and pin token accounts to the other repos instead.
Upgrading
Pins made with an earlier version have only the old key. Run once after installing:
claude-acc syncUntil then ls says how many pins are left to fix.
Install / upgrade
macOS:
curl -fsSL https://raw.githubusercontent.com/linhh-phv/claude-acc/main/install.sh | bashWindows (PowerShell):
irm https://raw.githubusercontent.com/linhh-phv/claude-acc/main/install.ps1 | iexNothing needs to be added again.
SHA256SUMS lists the checksum of each file.