vesha वेष

Accepted ADR 0006 · 2026-10-21

#6. A watcher switches at the limit

#Context

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 switching too eagerly, or to an account that's nearly out itself, is worse than not switching.

#Decision

A systemd user service runs vesha watch, which checks the active account's 5-hour and weekly usage (Claude Code's own usage endpoint) every two minutes, every minute once it's close:

A window is identified by its reset time rounded to ten minutes, and what was already said is kept on disk, so neither the API's jitter nor a restart repeats a notification. The watcher never stops a running session: sessions keep their account, new ones use the new one.

#Consequences

← All decisions · source