Skip to content

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

Closed

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

  1. added
    bugSomething isn't working
    account-poolOAuth, credentials, Codex pool, quota, failover, plans
    guiDashboard, tray, settings UI
    on Aug 25, 2026
  2. lidge-jun commented on Aug 25, 2026

    @lidge-jun
    Owner

    리뷰 · 우선순위 36 / 80

    설명: 이 이슈는 대시보드 코덱스 계정 카드가 플러스와 비즈니스의 다섯 시간 한도를 안 보여 준다고 한다. 작성자는 terrytan95 이다. 지금 열려 있다. 라벨은 bug, account-pool, gui 다. 지금 CURRENT dev HEAD 는 1a15d62 이다. 직전은 6b508d5 이었고 이번 시간에 2610 2611 2612 2613 2614 2618 2620 2621 이 착지했다. origin/dev package.json 은 2.32.1-preview.20260825 다. 본문이 적은 재현은 parseUsageQuota 가 shortPercent 42 를 남기는데 buildQuotaRows 는 weekly 만 낸다는 것이다. 본문 버전은 2.32.1-preview.20260825 / dev 4adfd23 다. 그 커밋은 이번 시간 2614 다. 그 위로 2620 이 이미 착지했다. 내가 구현하지 않고 머지하지 않는다. 태그하지 말 것. 배포하지 말 것.

    HEAD 에서 본문이 가리킨 구멍은 막혀 있다. gui/src/codex-quota-utils.ts 4줄부터 9줄이 shortPercent 와 shortResetAt 을 AccountQuota 에 적는다. 21줄 normalizeQuotaForPlan 은 short 칸이 있으면 fiveHourPercent 를 fiveHourPercent ?? shortPercent 로 채운다. 0 도 남긴다. 이미 fiveHour 가 있으면 그걸 지킨다. gui/src/components/QuotaBars.tsx 45줄부터 46줄 buildQuotaRows 가 그 정규화를 탄 뒤에 50줄에서 fiveHourPercent 를 본다. gui/src/components/codex-account-pool-cards.tsx 169줄과 gui/src/components/codex-account-pool-main-card.tsx 164줄이 QuotaBars 에 계정 quota 를 그대로 넘긴다. 정규화는 QuotaBars 안에서 일어난다. tests/rate-limit-reset-credits.test.ts 254줄이 이 별칭을 잠근다. 71 이 다섯 시간으로 나온다. 둘 다 있으면 본디 이름이 이긴다. go 계획은 월만 남긴다.

    이번 시간 착지 2620 이 바로 이 이슈의 차량이다. 제목은 fix(codex): show the five-hour quota on account cards (#2616) (#2620) 이고 SHA 는 e449974 다. 2616 은 작성자 풀이고 intake: hygiene-blocked 로 닫혀 있다. 메인테이너가 2620 으로 다시 올렸다. 본문이 원한 것은 창 모양으로 별칭을 옮기는 것이고, 계획 이름 허용 목록이 아니다. HEAD 정규화도 계획 이름이 아니라 short 칸이 있는지로 본다. go/free 의 30일만 남기는 깎기는 예전 1791 경로다. 이 이슈로 1791 을 닫지 말 것.

    남은 작은 구멍은 있다. QuotaBars.tsx 103줄부터 105줄 maxQuotaUtilisation 은 정규화를 안 탄다. fiveHourPercent 만 본다. short 만 있는 스냅샷은 긴급도 정렬에서 다섯 시간을 빠뜨릴 수 있다. 계정 카드 막대는 buildQuotaRows 를 타므로 이 이슈의 재현과는 다르다. leftover-close 를 막을 크기는 아니다. 2463 은 이번 시간 2610 으로 별칭이 착지했다. 이 이슈로 닫지 말 것. 2464 는 2609 차량이다. 이 이슈로 닫지 말 것. 2568 2600 2605 2423 도 다른 구멍이다. src/runtime 은 없다. default-aliases.ts 는 이제 65줄로 있다. model-presets.ts 는 119줄이다. 프리뷰 배포가 아니다.

    라인 4 - gui/src/codex-quota-utils.ts AccountQuota 가 shortPercent 별칭을 받는다. 2620 이 넣었다
    라인 23 - 같은 파일 normalizeQuotaForPlan 이 short 칸이 있으면 fiveHour 로 채운다. ?? 라서 0 도 산다
    라인 27 - fiveHourPercent ?? shortPercent 라서 본디 이름이 이긴다
    라인 46 - gui/src/components/QuotaBars.tsx buildQuotaRows 가 정규화한 값을 본다
    라인 50 - fiveHourPercent 가 숫자면 다섯 시간 줄을 넣는다. 본문 재현의 기댓값과 맞다
    라인 105 - maxQuotaUtilisation 은 정규화를 안 탄다. 카드 막대와 다른 길이다
    라인 169 - gui/src/components/codex-account-pool-cards.tsx 가 QuotaBars 에 quota 를 넘긴다
    라인 254 - tests/rate-limit-reset-credits.test.ts 가 별칭 정규화를 잠근다
    2616/2620 - 이 이슈의 차량이다. 2620 이 이미 착지했다
    1791/1863/2141 - 짧은 창 저장과 라우팅이다. 이 이슈로 닫지 말 것

    메인테이너의 판단이 필요한 지점

    • 이 이슈를 leftover-close 할지. 2620 이 이미 합쳐졌다. 닫는 편이 맞다
    • maxQuotaUtilisation 을 같은 정규화로 묶을지. 카드 재현과는 다르다. 이 이슈를 열어 둘 이유는 아니다
    • 2616 의 hygiene-blocked 를 믿을지. 작성자 풀은 막혔고 메인테이너 2620 이 착지했다
    • 1791 과 한 차량으로 묶을지. 묶지 말 것
    • 지금 leftover-close 할지. 2620 이 착지했으므로 닫는다

    너의 추천
    받는다. 다만 HEAD 에서는 이미 막혀 있다. leftover-close 한다. Landed via #2620 at e449974. 카드 막대는 정규화를 탄다. maxQuotaUtilisation 은 나중에 같은 함수를 타게 하면 된다. 내가 구현하지 않는다. 라벨은 leftover 때만 landed-via-maintainer 를 더한다. 프리뷰 배포가 아니다.

    이 댓글은 grok-bot이 작성했습니다

  3. lidge-jun commented on Aug 25, 2026

    @lidge-jun
    Owner

    Landed via #2620 at e449974

  4. lidge-jun commented on Aug 25, 2026

    @lidge-jun
    Owner

    Landed via #2620 at e449974

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