KarpelesLab/teamclaude

Multi-account proxy for Claude Code and Codex: pools Claude Max, ChatGPT/Codex, API-key and third-party backend accounts, and rotates on quota

What it solves

TeamClaude is a multi-account proxy designed to prevent coding agents like Claude Code and Codex from stopping due to API quota limits. It allows users to pool multiple accounts (including Claude Max, ChatGPT/Codex, and API-key based accounts) and automatically rotates between them when one reaches its session or weekly limit, ensuring that long-running coding sessions remain uninterrupted.

How it works

The tool acts as a local proxy that sits between the coding agent and the provider's API. It intercepts requests and manages the authentication tokens for the pooled accounts.

  1. Account Rotation: It monitors response headers to track session (5h) and weekly (7d) quotas. When an account hits a predefined threshold (default 98%), it rotates to the next eligible account.
  2. Request Routing: It injects the correct account tokens and rewrites the account_uuid in the request body to match the active account.
  3. Intelligent Handling: It distinguishes between per-minute rate limits (where it paces requests) and spent quotas (where it rotates accounts).
  4. MITM Proxy: It can catch hardcoded endpoints (like the Claude Design MCP) through a local MITM forward proxy to ensure all traffic is routed through the proxy.

Who it’s for

Developers using AI coding agents (specifically Claude Code and the Codex CLI) who frequently hit usage limits and want a seamless way to manage multiple subscriptions or API keys without manual switching.

Highlights

  • Automatic Quota Rotation: Rotates accounts based on session and weekly buckets, preferring accounts whose quotas reset soonest.
  • Model-Specific Tracking: Tracks quotas for different models (e.g., Opus, Sonnet, Fable) separately per account.
  • TUI Interface: Includes a terminal user interface with quota bars, reset countdowns, and activity logs.
  • Fallback Support: Supports third-party Anthropic-compatible APIs (like DeepSeek or GLM) as low-priority fallbacks.
  • Zero Dependencies: Built using only Node.js built-ins.
  • Request Holding: Can hold requests open until a quota resets instead of returning a 429 error.

Related

  • Project
  • Project
  • Project
  • Project