Skip to content

Multi Account Rotator

claude-ops bot edited this page Apr 26, 2026 · 3 revisions

Multi-Account Rotator

v2.0 — Multi-account Claude Max rotator with launchd daemon + AI-brain heuristics, so you never blow a weekly cap during long autonomous runs.

What it does

If you run Claude Code at scale (long-running orchestrations, autonomous overnight runs, multiple parallel sessions), you can blow your Claude Max weekly quota. The rotator:

  1. Stores credentials for multiple Claude Max accounts in macOS keychain.
  2. Polls each account's remaining quota every N minutes.
  3. Before any single account hits its cap, swaps the active Claude Code-credentials keychain entry to the next available account.
  4. Refuses to rotate to an account with overage billing enabled (so you don't accidentally rack up credit-card charges).

Components

Path Role
scripts/account-rotation/rotate.mjs Swaps the Claude Code-credentials keychain entry.
scripts/account-rotation/daemon.mjs launchd-managed; polls usage, rotates ahead of cap.
scripts/account-rotation/ai-brain.mjs Haiku-powered heuristic — picks next account based on remaining quota + usage trajectory.
scripts/account-rotation/setup-account.mjs OAuth init for one account.
scripts/account-rotation/force-rotate.sh Manual override.
templates/com.claude-ops.account-rotation.plist launchd unit.
skills/ops-rotate/SKILL.md /ops:rotate — manual rotate.
skills/ops-rotate-setup/SKILL.md /ops:rotate-setup — multi-account onboarding.

Setup

/ops:rotate-setup        # interactive multi-account onboarding
/ops:setup               # step 3o walks through OAuth init for each account

account_rotation_enabled is opt-in (default false) — you must explicitly turn it on in /plugins settings.

Hard guardrail

The rotator refuses any account that has overage billing enabled, unless you pass --allow-extra-usage. This is intentional — accidentally rotating to an account with overage on means real credit-card charges when usage exceeds the included monthly quota.

Configuration

Key Type Default Purpose
account_rotation_enabled boolean false Master switch (opt-in).
account_rotation_setup_oauth_each boolean true During /ops:setup, walk through OAuth init for every configured account that lacks a keychain token.

See also

Clone this wiki locally