Skip to content

[Bug]: 2.96.0 post-reset main-account lock surfaces as exhausted quota in Codex Desktop #8113

Closed

Description

@shimisizhuanyuan-6969

Client or integration

Codex App

Area

Authentication and account pool

Summary

After resetting quota outside OpenCodex, I observed native requests still being rejected by the local main-account quota protection while the official UI showed available quota. Codex Desktop displayed its generic usage-limit / upgrade-or-add-credits message.

A later metadata check showed the main-account protection enabled but state: ready. This is an observed incident, not a deterministic regression claim. I understand that #7312 / #7393 added paced recovery checks, so the delay may be expected under the current design.

The problem is that the user-visible message does not distinguish a local protection state awaiting fresh quota evidence from actual upstream quota exhaustion.

Reproduction

Observed workflow:

  1. Reach the local main-account protection threshold.
  2. Reset quota outside OpenCodex.
  3. Continue the existing Desktop conversation.
  4. Requests are still refused locally, despite available quota in the official UI.
  5. Later metadata observations show that the protection is ready again.

The exact reset timestamp, pre-recovery policy tuple, and individual recovery-query results were not preserved. I cannot establish an exact recovery delay or claim that it exceeded the intended cadence.

Version

OpenCodex 2.96.0, verified from the installed package and running service.

Operating system

Windows. Detailed OS/build information omitted.

Provider and model

Native main-account route. Account details and model identifiers omitted.

Logs or error output

Redacted classifications only:

HTTP status: 429
Logged errorCode: rate_limit_exceeded
failureStage: headers-only
Reason: local main-account quota policy refusal
Later mainAccountHardLock.state: ready

No full logs, request IDs, credentials, account identifiers, screenshots, or conversation content are attached.

Expected behavior / questions

  • Keep the protection in place until fresh verified metadata permits recovery.
  • Explain that a local policy is awaiting quota verification instead of showing only a generic exhausted-quota interpretation.
  • Expose the last observation and next scheduled verification time.
  • Provide a clearly documented metadata-only refresh action after an external reset, without inference or quota redemption.
  • Clarify whether this is expected recovery delay in 2.96.0, or which redacted fields would help diagnose a defect.

Related: #7312, #7393, #7046. The installed source contains the prior recovery fix; this report does not assume that fix is absent.

Checks

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

Activity

  1. github-actions commented on Nov 3, 2026

    @github-actions
    Contributor

    Automated translation bookkeeping — detected language: English.

  2. added
    bug
    on Nov 3, 2026
  3. coderabbitai commented on Nov 3, 2026

    @coderabbitai
    Contributor
    🔗 Related PRs

    #7774 - fix(codex): keep native main available after keyring migration [merged]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  4. added
    account-pool
    on Nov 3, 2026
  5. Ingwannu commented on Nov 4, 2026

    @Ingwannu
    Owner

    Thanks for the careful, redacted report. Checked against dev 72e80d280d; nothing relevant to this path changed between 2.96.0 and dev in pool-mode-gate.ts.

    What you observed matches the current design:

    • Recovery cadence. Since fix(codex): renew pool credit evidence, recheck predicted-reset hard locks, and scope Direct fallback to the locked main #7393 (2.90.0, fix for [Bug] Main-account hard lock outlives an early reset redeemed outside opencodex until the old predicted reset #7312), a predicted reset never lifts the lock. Instead it arms a metadata-only WHAM recheck on a capped 5/10/20/40/60-minute schedule (src/codex/auth-api/pool-mode-gate.ts:109,129-133,234, src/codex/quota-query-backoff.ts:4-11, documented in getting-started/how-it-works.mdx). After a reset outside OpenCodex, native requests can keep being refused locally for up to one recheck interval (at most 60 min). Then the lock reports ready, which matches your later metadata.
    • Desktop wording. The refusal is sent as usage_limit_reached on purpose ([Bug]: Main-account quota lock stalls Codex Goals past another pool account's recovery #7046, src/codex/auth-context.ts:918-925), so Codex ends the turn instead of sleeping through a multi-day retry. The body text says "blocked by the main-account quota policy", but Codex Desktop shows its own generic usage-limit text for this error type. The resets_at it shows is the last predicted reset, not the next recheck.
    • Log code. rate_limit_exceeded in the request log is the log row's generic 429 classification (src/server/request-log.ts:906-911), not the code sent to the client.
    • Immediate metadata-only refresh. After an external reset, ocx account refresh openai (or Refresh quotas in the dashboard) re-reads WHAM usage without inference or reset redemption. Fresh usage below the thresholds releases the lock right away (reference/codex-retry-diagnostics.md, hard-lock row).

    The remaining asks overlap the open follow-up on #7312: a bounded usage read before refusing, a status field for the next recheck time, and a client-visible "local policy" distinction. They are design changes with trade-offs against #7046, so I'm reclassifying this as an enhancement for the owner to decide, not a 2.96.0 regression.

  6. added
    enhancement
    needs-design
    and removed
    bug
    on Nov 4, 2026
  7. LPFchan commented on Nov 9, 2026

    @LPFchan
    Contributor

    +1 for checking usage once before refusing.

    Hit this on 2.99.0: the cache said weekly 98% used, so the hard lock tripped. I redeemed a reset credit outside opencodex, but requests kept getting refused locally for several minutes.

    Suggestion: before a hard-lock refusal, if the cached reading behind it is older than ~60s, do one WHAM read. Make it single-flight, cap it at one per account per minute, and skip it while a #6179 backoff is active. If the fresh reading still crosses the threshold, refuse as today (#7046 unchanged).

    This only fires while someone is actively sending requests, so it's nowhere near the every-minute polling #6179 removed. It would also keep stale carried-forward readings (#8185) from holding the lock.

  8. lidge-jun commented on Nov 16, 2026

    @lidge-jun
    Owner

    Owner decision (lidge-jun, 2026-11-16): before a hard-lock refusal, if the cached reading behind it is older than 60 s, do one fresh WHAM read (single-flight, at most once per account per minute). A reset redeemed outside OpenCodex then lifts the lock 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

    account-poolenhancementneeds-design

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions