Skip to main content

Docs Concepts

Account rotation

Account rotation is the core mechanism that makes Power Claude useful: when one account is exhausted or rate-limited, the proxy hands the next request to another account in your pool without your client seeing an error.

The state machine

Every account is in exactly one of four states at any moment:

StateMeaningEligible for traffic?
readyVerified credentials, no active limitYes
cooldownHit 429 recently, waiting for anthropic-ratelimit-unified-5h-resetNo
seven_day_held7-day window exhaustedNo (until 7-day reset)
unauthedCredentials are invalid or revokedNo

The proxy reads the rate-limit response headers from every Anthropic API response and updates each account's state. It is not counting requests locally — Anthropic owns the truth about your remaining budget.

How "next account" is chosen

When a request comes in:

  1. Filter accounts to ready.
  2. Within that set, prefer the account with the lowest current 5-hour usage (most headroom).
  3. Tiebreak by last_used_at (least-recently-used) to spread load.
  4. If no ready accounts exist, return a friendly 429 to the client and surface the soonest reset time in the extension's status bar.

Order is not alphabetical, FIFO, or based on insertion order. You can override the algorithm with pc config set rotation.strategy ...lru (above), random, round_robin, or pinned for testing.

Pre-emptive rotation

If a request would push the active account past its 5-hour budget, the proxy rotates before sending. This avoids the 429 → retry round-trip latency. See Pre-emptive rotation for the math.

What does not happen

  • No requests are duplicated across accounts. One request, one account.
  • No tokens are shared, mixed, or cross-billed.
  • Your client (Claude Code, the CLI, etc.) never sees account identifiers. It talks to localhost:3456; the proxy makes the upstream call.

Inspecting rotation in real time

pc status --json | jq '{active_account, rotation_count_today, accounts_ready}'

The status-bar tooltip in VS Code shows the same data without needing the CLI.