Who it is forA developer or team lead who wants to know which models and accounts used the pool and where streams failed.
The problemWithout a record, it is hard to tell whether failures came from capacity, policy errors, quota, or upstream stream breaks.
The outcomeA table of requests, tokens in and out, concurrency, failed streams, and events for the chosen window, plus a dry run of any Codex rollout backfill.
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
- With the server running, run
underclass stats --since 7d --by modelto see totals per model. (inferred, check the README) - Run
underclass stats --since 7d --by accountto compare accounts. (inferred, check the README) - Read the failed streams and the overloaded, policy, quota, cooling, and saturated event columns.
- Run
underclass stats import-codex --dry-runto preview any capacity or policy errors that can be backfilled from Codex rollout logs. (inferred, check the README) - Run
underclass stats --since 7d --by model --jsonif you need the output in a script. (inferred, check the README)
Prompt for your agent
In the underclass repo at <repo path>, with the server running, run `underclass stats --since 7d --by model` and save the output. Expected output: a UTC table with requests, tokens in and out, and event columns. Verify that the totals match the sum of the per-model rows.
Caveat. The README says historical rows remain queryable after account removal, but statistics are kept only for the retention set in stats_retention_days, which defaults to 730 days.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for ghuntley/underclass and "Audit token use and stream failures over the last week"
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