claude-rotate: One Proxy for Multiple Claude Max Accounts

Back
Kevin Riedl

9 min read · 4 Sep 2026
Last reviewed

Next
Made on your device, with no Instagram connection. We copy the post link for Instagram’s Link sticker.

claude-rotate puts one private endpoint in front of several Claude Max or Pro accounts you already own, then moves Claude Code traffic when the active account runs out of usable quota. It removes the logout, browser login and terminal restart loop across laptops, workstations and personal agent pods. The open-source claude-rotate repository is MIT-licensed and deliberately small: one Python proxy process, one configuration file, JSON state and audit logs, with no database.

A proxy can track usage across devices, but it also gains access to credentials and traffic. Anthropic’s credential rules govern which applications can handle that traffic.

For purchasing decisions, see our Claude Code vs OpenCode team-cost comparison. For a gateway that serves a company rather than one owner, start with the production LLM gateway comparison.

Which Claude Code access path fits your workload?

Your situationBest fitWhy
One person owns multiple paid Claude accounts and works across several private devicesUse native Claude Code sign-inCompare your account’s included allowance and usage credits before adding subscriptions.
One paid account occasionally reaches its limitWait, change model, or enable usage creditsA proxy adds security and operational work without adding quota.
Several employees or customers need shared capacityUse Team, Enterprise or metered API accessConsumer credentials are the wrong identity, governance and billing boundary.
You need per-user budgets, SSO, audit export or contractual supportUse a production gateway and commercial provider planclaude-rotate has device analytics, not an enterprise control plane.

Why three Claude Max subscriptions can still stop one session

Separate subscriptions do not become one quota pool. Each login has its own allowance and reset clocks. Anthropic’s current Max plan documentation says session usage resets every five hours, while a weekly limit resets at a fixed time assigned to the account. It also says other weekly, monthly, model or feature limits may apply. A busy AI-agent fleet can therefore exhaust the account currently logged into every machine while paid allowance remains unused on another account.

Manual rotation works, but it is operationally awkward. You interrupt the task, log out, complete browser OAuth for another account, verify the identity, and repeat on each machine. With remote Macs, CI-like personal jobs and long-running loops, the interruption often costs more attention than the login itself.

How claude-rotate works

  1. Each Claude Code client points ANTHROPIC_BASE_URL at the proxy and authenticates with its own internal device key.
  2. The proxy replaces that device key with the setup token for the active paid account and forwards the request to Anthropic.
  3. It reads the anthropic-ratelimit-unified-* headers returned with responses and stores the observed five-hour and weekly utilization.
  4. When the active quota is exhausted, one synchronized decision selects the next usable account. A short burst limit waits and retries on the same account instead of wasting a warm cache.
  5. The panel rolls audit records up by device, model and account, including an API-price equivalent. That dollar figure is an estimate of comparable API usage, not Anthropic’s hidden subscription accounting.

Anthropic officially documents both pieces that make the connection possible. Its Claude Code authentication guide documents ANTHROPIC_BASE_URL for a custom endpoint and claude setup-token for a long-lived subscription OAuth token used by scripts or CI. It does not document or endorse multi-account pooling. That distinction matters.

Consume-first rotation protects expiring paid capacity

Round robin looks fair but ignores reset time. Imagine account A has 15% left and resets tonight, while account B has 70% left and resets six days from now. Sending the next request to B can leave A’s remaining allowance to expire unused. claude-rotate’s default consume-first strategy prefers the usable weekly window that resets soonest. In plain terms, it spends the most perishable capacity first.

The proxy also separates quota exhaustion from a short burst limit. A quota rejection can justify changing accounts. A per-minute 429 with retry-after should normally pause and retry on the same account, because rotating would move the burst and discard prompt-cache locality. Thresholds, cooldown and hysteresis reduce account ping-pong before a hard rejection.

What the 101 checks prove, and what they do not

The repository’s test runner currently lists 101 offline checks across rotation logic, analytics, HTTP proxy behavior and stress scenarios. Its published mocked-upstream results include 300 concurrent requests served, 50 parallel SSE streams relayed byte-for-byte, and a quota failure with 100 requests in flight that caused exactly one account switch. A lock serializes the failover decision so the herd does not advance through every account at once.

The maintainer reports these results from a single process with a mocked upstream. That setup measures proxy behavior and overhead. Live reliability, provider latency and behavior with current credentials were outside the published test.

Anthropic’s current credential policy

Claude Code’s legal and compliance documentation reserves subscription OAuth for ordinary use in native Anthropic applications. Developers may not collect, store or intermediate Claude.ai credentials or session tokens, or route consumer credentials for other users. The Consumer Terms, section 3 generally require an Anthropic API key for automated access unless Anthropic explicitly permits it, and prohibit bypassing protective measures. Use Anthropic’s native sign-in for interactive Claude Code and supported API-key authentication for unattended jobs or product gateways.

Safer alternatives when the limit is the real problem

Anthropic’s usage-credit documentation covers Pro, Max and Ultra. Once included usage is exhausted, opt-in credits continue at standard API rates until the monthly cap is reached or the balance runs out with auto-reload off. Max and Ultra have a separate Fable weekly limit. Monthly API credits on eligible plans are a separate balance. Anthropic says most usage credits purchased on or after 7 December 2026 expire after 12 months, subject to local terms.

OptionOperational effortBest forMain tradeoff
Wait or reduce usageLowOccasional limitsWork pauses or model quality changes.
Usage creditsLowUnpredictable personal overflowVariable API-priced spend.
Direct API plus production gatewayHighTeams, products and governed automationMetered cost and platform engineering.
Team or EnterpriseMediumManaged users and organizational controlsContract, seat and usage economics must be checked.

Bottom line

Claude-rotate shows how a proxy can centralize quota telemetry. The same architecture makes the proxy a credential store and a point of failure. Use usage credits with a monthly spending cap for personal overflow. Use a commercial account or a supported API gateway for organizational workloads.

Frequently Asked Questions

What is claude-rotate?
claude-rotate is an MIT-licensed self-hosted proxy for one owner with multiple paid Claude subscriptions. Claude Code clients connect to one private endpoint, which selects an account from observed quota telemetry and records per-device usage.
Does claude-rotate give unlimited Claude Max usage?
No. Every account keeps its Anthropic-enforced session, weekly, model and other applicable limits. The proxy only uses another eligible paid account when one account is no longer usable.
Can I use claude-rotate for my team or SaaS?
Anthropic prohibits routing consumer credentials for other users or collecting or intermediating their session tokens. Use supported API authentication for a product gateway and Team or Enterprise for managed staff access.
Why use consume-first instead of round robin?
Consume-first prefers usable weekly quota that resets soonest. This reduces the chance that paid allowance expires unused, while cooldown and hysteresis avoid unnecessary switching.
Is the API-price equivalent the same as Claude Max quota?
No. It estimates what recorded tokens might cost at configured API list prices. Anthropic’s subscription quota calculation is a separate provider-side system, so use the returned quota telemetry for routing decisions.

Production AI help

Building an AI product and worried about inference cost, architecture, or production readiness? Wavect helps founders turn AI prototypes into reliable production systems.

Explore the service path:

Inbox, without the noise

Follow the work that matters to you

Get a short email when we publish something new. Follow the whole blog or only the problems you care about.

What would you like to receive?
Choose your topics

Free, double opt-in, no tracking pixels.

Back
Kevin Riedl

9 min read · 4 Sep 2026
Last reviewed

Next

Get the next AI and agents field note

One concise email when we publish. No tracking pixels, and no inbox filler.

Free, double opt-in, no tracking pixels.