Skip to content

[Bug]: Plus and Business five-hour quota is hidden on Codex account cards #2615

Description

@terrytan95

Client or integration

OpenCodex dashboard

Area

Dashboard

Summary

ChatGPT Plus and Business accounts expose a rolling five-hour Codex usage window, but the per-account cards in OpenCodex do not display it.

Current dev already parses a declared sub-day WHAM primary window into shortPercent / shortResetAt, preserves it in the account cache, and uses it for routing. The /api/codex-auth/accounts response keeps those field names. The dashboard then casts that response to its standard AccountQuota shape, whose five-hour fields are named fiveHourPercent / fiveHourResetAt. QuotaBars reads only the standard names, so the five-hour value is silently omitted while the weekly bar remains visible.

The Provider overview does not have the same symptom because providerQuotaFromCodexQuota() explicitly maps shortPercent to fiveHourPercent there.

OpenAI documents that Plus and Business local messages share a five-hour window and may also have weekly limits: https://learn.chatgpt.com/docs/pricing#what-are-the-usage-limits-for-my-plan

Reproduction

  1. Use a ChatGPT Plus or Business Codex account whose WHAM payload declares a 5-hour primary window and a 7-day secondary window.
  2. Refresh quotas in OpenCodex.
  3. Confirm /api/codex-auth/accounts?refresh=1 contains quota.shortPercent and quota.shortResetAt.
  4. Open the Codex account pool/dashboard cards.
  5. Observe that only the weekly bar is rendered.

Minimal source-level reproduction on current dev:

const quota = parseUsageQuota({
  plan_type: "plus",
  rate_limit: {
    primary_window: { used_percent: 42, reset_at: 2_000_000_000, limit_window_seconds: 18_000 },
    secondary_window: { used_percent: 7, reset_at: 2_000_500_000, limit_window_seconds: 604_800 },
  },
});

buildQuotaRows({ ...quota, updatedAt: Date.now() }, "plus", key => key)
  .map(row => row.windowKey);
// Actual: ["weekly"]
// Expected: ["fiveHour", "weekly"]

Expected: normalize the Codex account API's short* aliases to the dashboard's existing fiveHour* fields at the account-data boundary, preserving zero values and reset timestamps. This should apply by window shape rather than a plan-name allowlist, so plus, business, legacy team, and other plans with the same upstream window remain compatible.

Version

2.32.1-preview.20260825 / dev 4adfd23

Operating system

macOS 27.0 (arm64); defect is platform-independent

Provider and model

OpenAI / ChatGPT Codex login; Plus and Business account tiers

Logs or error output

Parsed quota: { shortPercent: 42, shortResetAt: 2000000000, shortWindowSeconds: 18000, weeklyPercent: 7, weeklyResetAt: 2000500000 }
Displayed window keys: ["weekly"]

Screenshots and supporting files

Related short-window storage/routing work: #1791, #1863, and #2141. The remaining defect is the account-API-to-dashboard field-name boundary.

Redacted configuration

{
  "providers": {
    "openai": {
      "codexAccountMode": "pool"
    }
  }
}

Checks

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

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 workingguiDashboard, tray, settings UIlanded-via-maintainerOriginal PR closed after landing via a maintainer merge train

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions