vesha वेष

Accepted ADR 0005 · 2026-10-21

#5. A claude wrapper decides the account

#Context

Switching has to work "from anywhere, for any project": in every terminal, editor and script that runs claude, including ones already open. Exporting CLAUDE_CONFIG_DIR from a shell hook only reaches shells started afterwards, and nothing outside a shell.

#Decision

vesha install-shim puts a small claude script in ~/.local/bin (before /usr/bin on PATH). Each time it runs, it asks vesha which account applies and executes the real Claude Code with that profile. The account is, first match wins: VESHA_ACCOUNT (set by vesha use for one terminal or vesha run for one command), then the closest folder rule above the current folder, then the active account.

#Consequences

← All decisions · source