Features
ccswap guardruns a local proxy that stops paid extra usage. Point Claude Code at it withANTHROPIC_BASE_URL=http://127.0.0.1:8318and it forwards every request to Anthropic. Once an account is on paid overage, or pastguard.blockThreshold(default 98%) while overage is allowed, it answersPOST /v1/messageswith a 429 until that window resets. Blocks are kept per account, so they survive a token refresh and a restart.guard serveruns it in the foreground,guard install/guard uninstallmanage a launchd service on macOS, andguard statusshows whether it's running and how many accounts are blocked. It only binds to loopback, refuses to start ifANTHROPIC_BASE_URLalready points at another gateway, and honoursHTTPS_PROXY/NO_PROXY. Settings:guard.port,guard.blockExtraUsage,guard.blockThreshold. Thanks @mvanhorn (#88).- Spend alerts.
notify.commandgets aspend-activeevent when an account starts spending extra usage andspend-increaseeach time its spend rises bynotify.spendStepUsd(default 5, in the account's currency). Both are on by default for anyone withnotify.commandset, and the menu bar shows them as notifications. Baselines are saved, soccswap auto --oncefires them too and two engines never send the same one. Thanks @mvanhorn (#87). - Accounts with no monthly spend cap now show their spend as
unlimitedinlist, the dashboard, the statusline and--json(spend.unlimited, withlimitandpctnull, see docs/json.md).autoswitch.creditFallbackstill never parks on an uncapped account unless you setautoswitch.creditFallbackAllowUnlimited(#87). ccswap listends each Claude account with auserow (now,after 14:30,blocked until …) for the rule "use the account whose weekly limit resets soonest, with room in both windows".--jsonaddsusePlan. The dashboard and the menu bar show it too (#84, #85).ccswap listshows why extra usage is off ($$ off (out of credits)), which limit is binding, per-model weekly shares and early resets (#82).ccswap relogin NUMrenews a saved Claude login in a throwaway profile without switching to it (#77).- Banked resets for Claude accounts, behind
usage.resetGrants(off by default) (#76). - New auto-switch settings:
autoswitch.codexThreshold(a Codex weekly gate apart from Claude's),autoswitch.weeklyCaps(e.g.3=60treats slot 3 as full at 60% of its week) andautoswitch.creditFallback(park on one account's extra-usage credits once every account is spent) (#79). - Only one live auto-switch engine runs per provider. A second menu bar, dashboard or
ccswap autostops with a message naming the one already running (#78). - Statusline: the session's account, Claude Code's context %, pace and a width setting (#75).
Fixes
- Updating from the macOS menu bar no longer drops the GUI libraries and leaves the menu unable to start. Thanks @samuelclay (#83).
- Antigravity usage fetches no longer leave
ccswap-agy-*temp dirs behind. Old orphans are cleaned up after two minutes, only when nothing protects them. Thanks @mvanhorn (#86). - Codex usage, banked-reset and warm-up requests only go over HTTPS to chatgpt.com or chat.openai.com and never follow a redirect. Plus fixes for login expiry, the agy fallback file, the exhausted reset time and roster refresh (#74).
- The spend row no longer disappears when the API reports
utilization: null(#79).