Skip to content

Account Pooler: last-resort accounts, per-account switch thresholds, and an opt-in order by earliest weekly reset #4468

Description

@matthiasvongrundherr

The workflow

I pool five Claude Max and five ChatGPT Pro subscriptions through the Account Pooler. Their weekly windows reset at different times. One of the ChatGPT subscriptions also powers an external scripting tool, so the pool should use it only when every other ChatGPT account is exhausted, and never drain it completely. I also want the pool to spend budget that resets soon before budget that resets days later, and to see which account is active.

What happens today

  • Selection is a sticky round-robin by priority: the current account stays until it reaches switchThreshold or fails, then the next account after it takes over, wrapping at the end (by design since Keep Claude and Codex account pools on ordered fallbacks #3129). Priority only sets the position in the ring, so no account can be kept for last. After a failover, or a 5xx/529 on the account before it, the pool keeps using the "last" account until it is exhausted, even after the others recover.
  • The Add API key menu item says "Metered fallback, never routes first", but select() has no rule for API-key accounts; they are ordinary ring members with default priority 100. Once a failover lands on one, it becomes the active account and keeps billing after the subscriptions recover.
  • switchThreshold is pool-wide, so part of one account's quota cannot be kept for another tool.
  • Reset times play no part in the order. On 24 Sep the pool was on a Claude account resetting six days later, while two accounts with 67 % and 88 % of their week left reset within two days.
  • The active account per provider is not shown in bb pool status or bb pool account list; it is only visible in the plugin database.

What you would expect

  1. A per-account lastResort flag, on by default for API-key accounts so the settings promise holds. While any regular account of the same provider is eligible, last-resort accounts are skipped, and conversations on one move back on their next request. With no flag set, routing is unchanged.
  2. An optional per-account switch threshold that overrides the pool-wide one, e.g. 0.7 to leave 30 % for another tool.
  3. The active account per provider in bb pool status --json and in bb pool account list (JSON field and table column).
  4. An opt-in setting selectionOrder: reset: at the switch points the pool already has, pick the eligible account whose weekly window resets soonest; unknown resets sort last, ties keep the priority order. Session pins and the active account stay sticky as today, so the prompt-cache behaviour from Keep Claude and Codex account pools on ordered fallbacks #3129 is kept.

I have a prototype of all four as two branches, (1) to (3) and (4), with tests in the plugin suite (346 passing with both; the new tests fail without the change). Happy to open them as pull requests once we are aligned, or to adjust the shape first.

Context and alternatives

Workaround today: reorder the priority list by hand after resets and disable the account that should be kept (bb pool account disable), which leaves its remaining quota unused by the pool. Automating that from outside the pool means toggling accounts on a timer, which I would rather not do. Related: #4157 (show and spend resets per account), #3615 (Fable billing on a Team account).

Checks

  • I searched open and closed issues for the same request.
  • If an agent wrote this, the body ends with > AGENT GENERATED.

AGENT GENERATED

Activity

  1. added
    providers
    provider-claude-code
    provider-codex
    on Sep 30, 2026
  2. matthiasvongrundherr commented on Oct 3, 2026

    @matthiasvongrundherr
    ContributorAuthor

    Follow-up after 0.45.0, with a refined proposal:

    Happy to open them as pull requests or reshape them first, whichever fits your plans for the pool.

    AGENT GENERATED

  3. IlyaM commented on Dec 1, 2026

    @IlyaM
    Contributor

    Another case for item 4 (selectionOrder: reset), from three Claude Max 20x accounts in one pool (bb with the built-in Account Pooler, late Nov 2026). The weekly windows reset on different days: account A on Wednesday, B and C on Thursday.

    Daily readings of weekly use:

    Reading A (resets first) B C
    Sun 06:40Z 52% 21% 100%
    Mon 06:50Z 52% 63% 100%
    Mon 11:15Z 52% 76% 100%
    Tue 00:35Z 57% 100% 100%
    Tue 09:10Z 64% 100% (refused) 100% (refused)

    A stayed at 52% for over 24 hours while the active account B went from 21% to 100%, which is the sticky selection working as designed. At its current rate A resets at about 80%, so roughly a fifth of one weekly window expires unused, while B and C are refused until Thursday. bb pool account reorder did not help, because reordering does not move the active account.

    With selectionOrder: reset, the switch that made B the active account would have chosen A instead, since A resets soonest. That would have spent A's budget before it expired and left B's for the days when A is full. Keeping pins and the active account sticky between switch points is fine for us.

    Item 3 (showing the active account) would also have made this visible earlier; we found it only by comparing daily readings.

    A detail that may matter for the design: on Max plans the Fable meter (seven_day_fable) is a cap inside the weekly limit rather than separate capacity, so ordering by the all-models weekly reset seems the right key.

    AGENT GENERATED

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    provider-claude-codeprovider-codexproviders

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions