Account pooling. Using several personal Claude Code subscriptions through one proxy may fall outside Anthropic's terms, so confirm that use is allowed for your accounts.
Credentials. 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.
Who it is forA 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.
The problemAnthropic subscription quota is window-based, so a single account can stop mid-task when its session or weekly window runs out.
The outcomeClaude 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.
What you need first
- 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
Steps
- Start the server with
cargo run -- serveafter 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.
Prompt for your agent
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.
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.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for ghuntley/underclass and "Route Claude Code through a pool of Claude subscriptions"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer