{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "ghuntley-underclass--route-claude-code-through-subscription-pool",
 "repo": "ghuntley/underclass",
 "repo_url": "https://github.com/ghuntley/underclass",
 "repo_slug": "ghuntley-underclass",
 "title": "Route Claude Code through a pool of Claude subscriptions",
 "page_title": "How to route Claude Code through a pool of Claude subscriptions with Underclass",
 "summary": "Point the official Claude Code client at a local proxy that rotates across several Claude Code accounts.",
 "who": "A developer who runs Claude Code heavily and owns more than one Claude Code subscription, and wants work to continue when one account's windows are used up.",
 "problem": "Anthropic subscription quota is window-based, so a single account can stop mid-task when its session or weekly window runs out.",
 "outcome": "Claude Code keeps its normal request shape and reaches the Anthropic surface through Underclass, which swaps in a pooled credential and cools exhausted accounts until their window resets.",
 "steps": [
  "Start the server with `cargo run -- serve` after setting UNDERCLASS_PROXY_KEY and UNDERCLASS_UI_TOKEN as in the README quick start.",
  "Open the web UI, click Add account, choose Claude Code (Anthropic), and complete the OAuth paste-back flow for each subscription.",
  "Export the base URL with `export ANTHROPIC_BASE_URL=http://127.0.0.1:8080`.",
  "Set CLAUDE_CODE_OAUTH_TOKEN to the value of your UNDERCLASS_PROXY_KEY, since the README says the client sends the proxy key as its bearer token.",
  "Start Claude Code in the same shell and run a short task, then check the admin page for the plan and the three quota windows of the account used."
 ],
 "agent_prompt": "In the underclass repo at <repo path>, start the server, export ANTHROPIC_BASE_URL and CLAUDE_CODE_OAUTH_TOKEN as the README describes, and run one short Claude Code task. Expected output: a completed task and a request row for a Claude Code account in the admin page. Verify that the account's plan and its 5-hour, 7-day, and model-scoped windows are shown.",
 "agents": [
  "claude-code"
 ],
 "difficulty": "Intermediate",
 "time": "45 minutes",
 "basis": "readme",
 "caveat": "The README says the Anthropic surface only serves the official Claude Code client and requires its headers and identity block, so other Anthropic clients will be rejected.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "rust",
 "requirements": [
  "Rust toolchain with cargo, to run `cargo run -- serve` from the repo",
  "openssl available on the machine, to generate the proxy key and UI token",
  "At least one ChatGPT/Codex, GitHub Copilot, or Claude Code subscription you are entitled to use",
  "opencode installed if you want to use the OpenAI-compatible path from that client",
  "Read each provider's terms before pooling accounts; the README does not address this"
 ],
 "risk": "sensitive",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "account-pooling",
   "notice": "Using several personal Claude Code subscriptions through one proxy may fall outside Anthropic's terms, so confirm that use is allowed for your accounts."
  },
  {
   "tag": "credentials",
   "notice": "The proxy key you place in CLAUDE_CODE_OAUTH_TOKEN grants access to the whole pool, so do not paste it into shared logs or tickets."
  }
 ],
 "best": false,
 "score": 0.9,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/ghuntley-underclass/route-claude-code-through-subscription-pool/",
 "md": "https://dedupedai.com/use-cases/ghuntley-underclass/route-claude-code-through-subscription-pool/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/ghuntley-underclass--route-claude-code-through-subscription-pool.json",
 "api_version": "v1"
}
