DEDUPED Hot AI repos, turned into use cases Get 5 a day

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.

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.

Share: X LinkedIn Hacker News Email Copy link

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 [email protected] and we will look at it promptly. Full disclaimer page