Skip to content

Banked rate-limit reset redemption fails server-side when secondary is null (single-window account) #46854

Open

Description

@yifeixie3

What version of Codex are you using?

codex-cli 0.155.1 (standalone, macOS 26.6.2, Apple Silicon)

What subscription do you have?

planType: prolite

What platform is your computer?

macOS

What issue are you seeing?

I have three banked rate-limit resets, all status: available and none expired. Every redemption attempt fails with "Couldn't reset usage. Please try again." The credit is not consumed — it stays available — and my usage is unchanged.

I am at 100% on my weekly window and locked out (ordinaryUsageAllowed: false), so there is plainly an eligible window to reset.

What steps can reproduce the bug?

  1. Be rate limited (weekly window at 100%).
  2. /usage → "Redeem usage limit reset" → select any available credit.
  3. "Resetting your usage..." → fails after 1–5s with "Couldn't reset usage. Please try again."

Reproduced 34 consecutive times between 00:06:05 and 00:21:25 UTC+08:00 on 2026-09-21, across all three credits.

What is the expected behavior?

The reset is applied and the weekly window returns to 0% used.

Additional information

Likely cause. My account reports secondary: null. I have only one usage window — the 10080-minute weekly one — and it occupies the primary slot, where most accounts carry a 5-hour window. If the redemption path looks for an eligible window in a fixed slot, or assumes the 5-hour window exists, it would find no window to reset on this account and fail exactly as observed.

The endpoint itself is healthy. Calling account/rateLimitResetCredit/consume with a credit ID that does not exist returns a clean {"outcome": "noCredit"}. Only a real credit ID produces an error. So the backend locates the credit and then fails while applying it.

account/rateLimits/read response:

{
  "ordinaryUsageAllowed": false,
  "rateLimits": {
    "limitId": "codex",
    "primary": { "usedPercent": 100, "windowDurationMins": 10080, "resetsAt": 1790411865 },
    "secondary": null,
    "credits": { "hasCredits": false, "unlimited": false, "balance": "0" },
    "planType": "prolite",
    "rateLimitReachedType": "rate_limit_reached"
  },
  "rateLimitResetCredits": {
    "availableCount": 3,
    "credits": [
      { "id": "RateLimitResetCredit_bf2a60fc1880819192b6b5b525576ee8",
        "resetType": "codexRateLimits", "status": "available",
        "grantedAt": 1787376878, "expiresAt": 1789968878 },
      { "id": "RateLimitResetCredit_1a5ddeb511b88191bfb046365abdebe5",
        "resetType": "codexRateLimits", "status": "available",
        "grantedAt": 1788499987, "expiresAt": 1791091987 },
      { "id": "RateLimitResetCredit_a2f24bd63f4481918fdea63f56a97c3a",
        "resetType": "codexRateLimits", "status": "available",
        "grantedAt": 1788582165, "expiresAt": 1791174165 }
    ]
  }
}

Request IDs from failed attempts:

consume-rate-limit-reset-cc857181-6ed7-487c-818c-8e32591d94e5  (first, 00:06:00 +08:00)
consume-rate-limit-reset-4c0dc3c4-9d1d-40cd-9f2b-9ddcd8c0283c  (last,  00:21:24 +08:00)

Ruled out locally. codex doctor passes on auth, network, websocket handshake and endpoint reachability. CLI is on the current version.

Client-side logging gap. The TUI logs only a generic account/rateLimitResetCredit/consume failed in TUI at WARN. The backend's error body is never surfaced or logged, which makes this class of failure undiagnosable from the client. Logging the server response would help.

Support channel. The Help Center assistant has confirmed it cannot escalate this or re-issue a credit. The first of the three credits expires 2026-09-21 13:34 UTC+08:00 and will lapse unredeemed.

Possibly related: #44951 (same error text, macOS), #44217, #43008.

Activity

  1. added
    bug
    CLI
    rate-limits
    on Sep 20, 2026
  2. yifeixie3 commented on Sep 20, 2026

    @yifeixie3
    Author

    Logs uploaded via /feedback.

    Uploaded thread ID: 01a0bfd4-7e73-7263-a2a8-21d429271274

    The upload covers the CLI session in which redemption fails. The 34 failed account/rateLimitResetCredit/consume attempts referenced above are in the local log database for that session.

  3. yifeixie3 commented on Sep 23, 2026

    @yifeixie3
    Author

    Captured the server response. The TUI swallows it, but calling the same method over the app-server JSON-RPC interface surfaces it:

    POST https://chatgpt.com/backend-api/wham/rate-limit-reset-credits/consume
    403 Forbidden
    content-type: application/json
    body: {"detail":{"code":"rate_limit_reset_ineligible"}}
    

    Attempt: 2026-09-23 12:07:04 UTC+08:00
    creditId: RateLimitResetCredit_1a5ddeb511b88191bfb046365abdebe5

    The credit was not consumed — all three on the account remain available.

    So the backend is rejecting redemption as ineligible, while the same account reports:

    usedPercent:          100
    windowDurationMins:   10080
    secondary:            null
    ordinaryUsageAllowed: false
    rateLimitReachedType: rate_limit_reached
    

    Fully rate limited, yet judged ineligible for a reset. This is consistent with the hypothesis in the issue body: with secondary: null, the only window is the weekly one sitting in the primary slot, and an eligibility check that looks for a window in a fixed slot would find nothing to reset.

    Reproducing it needs no browser:

    account/rateLimitResetCredit/consume { creditId: <real id>, idempotencyKey: <uuid> }
    

    A non-existent creditId returns a clean {"outcome": "noCredit"}; a real one returns the 403 above.

    Separate client-side bug: the JSON-RPC error carries the full server body, but the TUI logs only account/rateLimitResetCredit/consume failed in TUI at WARN and shows "Couldn't reset usage. Please try again." Surfacing detail.code would have made this diagnosable immediately.

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

    CLIbugrate-limits

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions