Repository navigation
Description
The workflow
I pool several Claude and ChatGPT subscriptions through the Account Pooler. Both providers now grant accounts usage-limit resets: ChatGPT gives Codex users "Full reset" credits, and Claude runs grants such as "Claude Opus 5.5 launch: one usage-limit reset for Pro and Max". When a pooled account hits its limit, I want to spend one of its resets from bb and keep working.
Today I have to sign in to that exact account in the Codex CLI (/status → Redeem reset) or Claude Code (/limit-reset), which defeats the point of pooling. bb also never shows which accounts hold resets or when they expire, so resets expire unused.
What happens today
- Account Pooler settings,
bb pool account list, and thestatus.get/account.listRPCs show usage windows but nothing about resets. - bb has no way to spend a reset for a pooled account.
- Observed on bb 0.43.4 (desktop app, macOS). A read-only query of my pool found unused resets on most accounts, one of which expires in 11 days. bb showed none of them.
The pool already fetches both usage endpoints that carry reset data but ignores it:
- ChatGPT
/wham/usagereturnsrate_limit_reset_credits; the pool parses onlyplan_typeandrate_limit(codex-adapter.ts#L185-L196). - Claude
/api/oauth/usagereturns reset grants only when asked withcedar_ember=1, and the pool requests the plain URL (hub.ts#L42).
What you would expect
- Each OAuth account shows how many resets it holds and when the next one expires: a badge on its row in settings, a Resets line in the account dialog, a Resets column in
bb pool account list, andresetCreditsinstatus.get/account.list. - Use reset… in the account menu and dialog,
bb pool account reset-limits <id> --yes, and anaccount.resetLimitsRPC spend one reset and refresh the account's usage. A spent reset cannot be restored, so the UI asks for confirmation and the CLI refuses to run without--yes.
Prototype: main...rebryk:bb:account-pool-reset-credits (based on 94d77da). Typecheck, lint, and the plugin's 319 tests pass, including 8 new ones. I also ran the new adapters read-only against live accounts through the pool's own transport. They reported the same counts and expiries as the providers; nothing was spent.
Provider APIs the prototype uses:
- ChatGPT, the same endpoints the open-source Codex CLI uses (rate_limit_resets.rs#L124-L154):
- The count comes from
rate_limit_reset_credits.available_countin/wham/usage, which the pool already fetches. - The expiry comes from
GET /wham/rate-limit-reset-credits, requested only when the count changes. - A reset is spent with
POST /wham/rate-limit-reset-credits/consume {redeem_request_id}, which answersreset | nothing_to_reset | no_credit | already_redeemed.nothing_to_resetkeeps the credit.
- The count comes from
- Claude, the calls Claude Code's
/limit-resetmakes:GET /api/oauth/usage?cedar_ember=1&skip_spend=1adds acedar_emberblock withgrants[].resets_left,grants[].ends_at, andnext_grant_id. The pool uses this URL for its regular usage refresh, so there are no extra requests.- A reset is spent with
POST /api/organizations/{organization_uuid}/reset_rate_limits {program: "cedar_ember", grant_id, request_id}. The organization UUID comes from/api/oauth/profile.
Each attempt sends a fresh idempotency key. After a successful reset the pool clears the account's hold and refreshes its usage.
Context and alternatives
Open questions:
- Claude user agent. Claude only reports reset grants to Claude Code clients. Without a
claude-cli/…user agent the block reads{"eligible": false, "ineligible_reason": "surface"}. The prototype sendsclaude-cli/2.1.280 (external, cli)on the pool's own Claude usage, profile, and claim requests; the tokens are already Claude Code OAuth tokens. Alternatives:- forward the user agent of the most recent Claude Code request the pool proxied, or
- ship ChatGPT only and leave Claude until there is a sanctioned way.
- Stability. The Claude endpoints are undocumented and experiment-gated, and they may change. The ChatGPT endpoints are visible in the open-source client.
- Scope. Provider Usage (
usage.fetch) does not carry resets in the prototype. That could follow.
A third-party plugin cannot do this, because only the Account Pooler holds the account tokens. Related: #3243.
Once this is signed off, I'd like to open the PR myself. I'm not in .github/APPROVED_CONTRIBUTORS yet.
- I searched open and closed issues for the same request.
- If an agent wrote this, the body ends with
> AGENT GENERATED.
AGENT GENERATED
Activity
bb-slop-cop commentedon Sep 23, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotApplied Type Feature, Priority Medium, Effort High, and label
providers. All fields were previously unset; classification was verified after writing.This adds reset visibility and redemption across provider integrations, RPCs, CLI, and UI. Provider tools offer a workaround, while the new actions and integration decisions make the effort High.
No reproduction report or pull request: the final Type is Feature, so this rule skips bug reproduction and fixes.