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: One Proxy for Multiple Claude Max Accounts

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.

This is not an unlimited-Claude trick. Every account keeps its Anthropic-enforced limits. The tool only decides which paid account serves the next request. It also concentrates long-lived credentials in one place and automates behavior that Anthropic has not explicitly approved for pooled consumer subscriptions. The repository itself calls that a terms gray area. Read the risk section before copying the setup.

This guide targets the underserved query behind the error message: how to use multiple Claude Max accounts on several Claude Code machines without manual account switching. For product procurement, use our separate 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.

Quick verdict: when should you use claude-rotate?

Your situationBest fitWhy
One person owns multiple paid Claude accounts and works across several private devicesConsider claude-rotateOne private endpoint removes manual login changes and shows quota across the fleet.
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.

Those are useful engineering claims because the code and test command are public. They are not a production availability benchmark. The upstream is mocked, the test measures proxy overhead rather than Anthropic latency, and the design supports one process only. Run python3 tests/run_all.py on the commit you plan to deploy and review the code that handles authentication, streaming, headers and logs.

Minimal private setup

git clone https://github.com/doxaras/claude-rotate.git
cd claude-rotate
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
./setup.sh
./setup.sh add-account max-1
./setup.sh add-account max-2
./setup.sh add-device macbook
python3 rotator.py

Run claude setup-token separately for each paid account when the setup script asks for it. Check the repository instructions at the exact commit you install. On each device, use the endpoint and device credential printed by add-device:

export ANTHROPIC_BASE_URL=http://your-private-host:8484
export CLAUDE_CODE_OAUTH_TOKEN=the-device-key
claude

Verify /rotate/status before starting valuable work. Then make a small request through each device and confirm that the expected device and account gauges move. Do not expose port 8484 to the public internet.

Tailscale and credential security checklist

  • Bind the proxy to its Tailscale address or to 127.0.0.1 behind Tailscale Serve. Plain HTTP over public or shared networks exposes device keys and prompts.
  • Create one device key per machine or pod. That makes a single compromised client revocable without changing every device.
  • Treat every setup token as a long-lived bearer credential for its Claude account. Keep token files at mode 0600, out of backups you do not control and out of Git.
  • Restrict access to the live panel. It reveals device names, models, consumption and account state.
  • Keep logs only as long as needed. Audit JSON can contain operational metadata even when prompt bodies are not logged.
  • Pin a reviewed commit, run the offline suite, monitor upstream changes, and define how you will roll back to direct Claude Code access.

A self-hosted proxy changes the trust path. Your prompts still reach Anthropic, but your proxy host now sees credentials and traffic too. If this layer becomes part of a customer-facing AI product, our AI product engineering service can help design the supported gateway, identity, observability and failure boundaries around it.

The terms boundary is a product decision, not a footnote

claude-rotate's maintainer states that automated rotation across consumer subscriptions is a gray area and warns against using consumer plans for a shared or commercial service. Anthropic's Claude Code legal and compliance page points users to the applicable Consumer or Commercial Terms and says third-party integrations are governed separately. Documentation for a custom base URL or setup token is not permission for every routing pattern.

Use only subscriptions you personally own, do not share credentials with other people, and re-read the current terms before deployment. For employees, customer workloads, autonomous round-the-clock production jobs or any system that sells access downstream, use an account type and billing route designed for that purpose. If the interpretation matters to your business, get written confirmation from Anthropic or legal advice rather than relying on this article.

Safer alternatives when the limit is the real problem

Anthropic's usage-credit documentation says paid Pro and Max users can continue after included limits at standard API rates when credits are enabled. That is the simplest official overflow path for one user. You can also reduce context, split work into bounded sessions, select a less expensive model where it is sufficient, or wait for the visible reset.

OptionOperational effortBest forMain tradeoff
Wait or reduce usageLowOccasional limitsWork pauses or model quality changes.
Usage creditsLowUnpredictable personal overflowVariable API-priced spend.
claude-rotateMediumOne owner, several paid accounts and private devicesTerms uncertainty, secrets and proxy operations.
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 solves a specific personal infrastructure problem well: several accounts you already pay for, several devices you control, and one owner who wants quota-aware failover plus visibility. Consume-first scheduling and serialized failover are more thoughtful than blind round robin, and the public stress suite gives reviewers something concrete to reproduce.

Its sharp edges are equally concrete. The proxy becomes a credential vault, prompt cache does not travel between accounts, one process is a single operational dependency, subscription-cost estimates are not quota truth, and automated consumer-account pooling lacks explicit provider approval. Keep the deployment private and personal. For a business system, buy the supported commercial boundary and engineer the gateway as production infrastructure.

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?
The repository warns not to use consumer subscriptions for a shared or commercial service. Use Team, Enterprise or metered API access with an appropriate production gateway, and verify current provider terms.
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.