DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to point opencode at a pool of coding subscriptions with Underclass

Run one local endpoint that spreads opencode requests across several Codex or Copilot accounts.

Short answer: Clone the repo and, from its root, run UNDERCLASS_PROXY_KEY="$(openssl rand -hex 32)" UNDERCLASS_UI_TOKEN="$(openssl rand -hex 32)" cargo run -- serve and keep the generated values in a password manager; then open http://127.0.0.1:8080/ in a browser, paste the value you set as UNDERCLASS_UI_TOKEN, click Add account, and sign in to each ChatGPT/Codex or Copilot subscription you want in the pool. All steps.

Account pooling. Pooling several personal subscriptions behind one endpoint may conflict with the terms of the providers that issued them, so check those terms first.

Credentials. The proxy stores provider credentials in a local SQLite database, so protect the database and the minted keys.

Who it is forA developer who uses opencode daily and has more than one ChatGPT/Codex or Copilot subscription, and hits quota limits on a single account.

The problemEach subscription has its own quota, so one account running out interrupts coding sessions and forces manual switching between logins.

The outcomeopencode talks to one local URL, sessions stay pinned to one account, and exhausted accounts leave rotation 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

  1. Clone the repo and, from its root, run UNDERCLASS_PROXY_KEY="$(openssl rand -hex 32)" UNDERCLASS_UI_TOKEN="$(openssl rand -hex 32)" cargo run -- serve and keep the generated values in a password manager. (inferred, check the README)
  2. Open http://127.0.0.1:8080/ in a browser, paste the value you set as UNDERCLASS_UI_TOKEN, click Add account, and sign in to each ChatGPT/Codex or Copilot subscription you want in the pool.
  3. In a second terminal, run cargo run -- connect to write the provider block into your global opencode config.
  4. Run opencode --provider underclass --model underclass/gpt-5.5 and send a prompt.
  5. Check the admin page to confirm the request was attributed to one account and that its prompt cache key appears in the usage rows.

Prompt for your agent

In the underclass repo at <repo path>, start the server with the proxy key and UI token set as environment variables, run `cargo run -- connect`, then run one opencode prompt against the underclass provider. Expected output: a completed response and a usage row in the admin page for <account label>. Verify that the admin page lists the account as healthy after the request.

Caveat. The README says state lives in ~/.local/share/underclass/pool.db and that deleting it starts fresh, so losing that file means re-adding every account.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for ghuntley/underclass and "Point opencode at a pool of coding subscriptions"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer