Skip to content

[Bug]: "Use this account next" accepts an account that the active quota threshold immediately rejects #4521

Description

@mushikingh

Client or integration

OpenCodex dashboard

Area

Authentication and account pool

Summary

With the Quota strategy and an enabled usage threshold, the dashboard still offers Use this account next for an account whose displayed quota is already above that threshold. The action accepts the selection and shows it as pinned, but routing releases the drained pin before resolving the next request and uses another eligible account.

The action therefore promises an outcome that the current routing policy will not allow. The setting responsible for overriding the action is also difficult to discover in the Providers workspace: Rotation strategy is visible, while the active usage threshold is only shown after expanding Advanced settings below it.

For example, with Main at 100%, a secondary account below the 80% threshold, and the secondary account currently selected, clicking Use this account next on Main does not make Main serve the next request. The pin is discarded because Main has no quota headroom.

Reproduction

  1. Configure two ChatGPT/Codex accounts in Pool mode.
  2. Select the Quota rotation strategy and enable usage-based proactive switching with an 80% threshold.
  3. Let Main reach 100% of its five-hour quota while the second account remains below 80%.
  4. Open Providers, select OpenAI, and view Available accounts.
  5. Observe that the visible strategy says Quota, but the active 80% threshold is only available inside the collapsed Advanced settings section.
  6. Click Use this account next on the exhausted Main account.
  7. Observe that the selection is accepted and pinned.
  8. Send the next request. Routing clears the Main pin as drained and selects the eligible secondary account.

The same mismatch is visible in current source. The account-card action is gated by pause, authentication, cooldown, and validation state, but not by known quota headroom. releaseDrainedCodexAccountPin() then clears the accepted pin when hasCodexQuotaHeadroom() is false.

Version

Observed with 2.53.0. The same action, collapsed-threshold layout, and drained-pin release are present on current dev at df7dc1be530141c55bd10e70ebe79cb80914d98e (package version 2.54.0).

Operating system

Ubuntu 24.04 under WSL2

Provider and model

OpenAI ChatGPT/Codex account pool; model-independent

Logs or error output

accountPoolStrategy=quota
autoSwitchThreshold=80
main five-hour usage=100
secondary five-hour usage<80
manual pin accepted for main
next request resolves to secondary after the drained main pin is released

Screenshots and supporting files

No private screenshot is attached. The visible state is described above without account email addresses or identifiers.

Redacted configuration

{
  "accountPoolStrategy": "quota",
  "autoSwitchThreshold": 80,
  "codexAccountMode": "pool"
}

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

Related: #504 made manual selection immediate while preserving known threshold rotation, and #806 clarified strategy-dependent threshold semantics. This report is narrower: the current dashboard still enables a manual action whose promised next-request outcome is impossible under the displayed quota state, while hiding the overriding threshold from the normal Providers view.

Possible observable fixes include disabling the action for an account known to be drained, warning in the confirmation that the pin will be released, and showing an effective policy summary such as Quota · 80% next to the visible rotation strategy. CURRENT, SELECTED, and PINNED should also expose their distinct meanings without requiring source knowledge.

Activity

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

    account-poolOAuth, credentials, Codex pool, quota, failover, plansbugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions