Architecture decisions
Why vesha is built the way it is: each significant decision as a short record (context, the decision, its consequences), in the ADR format. A decision is never edited away: a later one supersedes it. Sources: docs/adr.
Record architecture decisions
Decisions about how vesha is built (its dependencies, its boundaries, the trade-offs it accepts) were made in conversations and commit messages, where nobody finds them later. A co…
One Claude Code profile per account
Claude Code keeps one login in its config folder (~/.claude). Tools like claude-swap switch accounts by saving that login away and writing another one in its place. That makes swit…
Never copy a login
Claude Code's OAuth refresh tokens rotate: each refresh returns a new refresh token and invalidates the old one. If the same login existed in two places (a backup, a snapshot, a se…
One setup and one history for every account
With a profile per account (ADR 2), each profile would have its own CLAUDE.md, settings, hooks, skills, plugins and agents, and its own conversation history. Keeping several copies…
A `claude` wrapper decides the account
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…
A watcher switches at the limit
The point of several accounts is to keep working when one runs out. Checking usage by hand and switching just before the limit is exactly the interruption vesha should remove; but …
Standard library only, curses for the switcher
vesha's wrapper runs before every claude, and its watcher runs all the time; both must start fast and never break because a dependency changed. The switcher needs vim-style navigat…
Accounts and profiles live in the state folder
v0.1.0 kept accounts and profiles in ~/.local/share/vesha. That is also where installers put vesha itself: kosha installs every app into ~/.local/share/<name>, and vesha's own inst…
Switching moves logins into ~/.claude
Until v0.2, switching only changed which profile the next claude started with: the wrapper set CLAUDE_CONFIG_DIR. Sessions already running kept their account. But the moment you sw…
The switcher speaks the Space grammar
The switcher had vim-flavoured keys of its own: r ran claude (in every other Vayu tool r refreshes), u refreshed (vim's undo), h/l switched tabs, and a number alone jumped to an ac…
Live usage from the status line
The watcher (ADR 6) read usage only from Claude Code's usage endpoint and ignored numbers it couldn't refresh. That endpoint rate-limits hard: with the watcher asking for every acc…
When every account is full, be on the one that frees up first
ADR 6 left the case where every account is at its limit alone: the watcher said when the first one resets and stayed on the active account. But the accounts don't reset together. S…