codex - 💡(How to fix) Fix Codex usage quota and credit balance appear inconsistent and possibly stuck. [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#17764Fetched 2026-04-15 06:28:51
View on GitHub
Comments
2
Participants
3
Timeline
9
Reactions
0
Author
Timeline (top)
labeled ×3commented ×2cross-referenced ×1marked_as_duplicate ×1

Codex usage quota and credit balance appear inconsistent and possibly stuck when used via OpenCode.

Root Cause

Additional Context

  • CLI and web UI show identical quota/credit values
  • Issue occurs via OpenCode (not official CLI directly)
  • Unclear whether root cause is:
    • Codex backend (quota / credit accounting)
    • or OpenCode integration layer
RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

codex-cli 0.120.0

What subscription do you have?

plus

Which model were you using?

gpt-5.4

What platform is your computer?

No response

What terminal emulator and version are you using (if applicable)?

alacritty -> opencode

What issue are you seeing?

Summary

Codex usage quota and credit balance appear inconsistent and possibly stuck when used via OpenCode.

Environment

  • Interface: OpenCode (not official Codex CLI)
  • Model: gpt-5.4 (via OpenCode)
  • Auth: ChatGPT Plus account
  • Codex CLI version: 0.120.0
  • OS: Linux (Fedora)

Configuration

  • Auto-reload minimum: 125
  • Auto-reload target: 250

Actual Behavior

  • Weekly quota shows 0% but usage is still allowed
  • 5h quota remains at 100% despite active usage
  • Credits do not decrease with usage
  • Credits increased unexpectedly beyond configured target
  • Quota and credit state appear frozen or desynchronized

Expected Behavior

  • Quota should update based on actual usage:

    • 5h limit should decrease with usage
    • Weekly limit should reflect consumption
  • Credit balance should:

    • Decrease with usage when applicable
    • Only increase according to auto-reload configuration
  • Auto-reload should:

    • Trigger only when balance < 125
    • Restore balance only up to 250
    • Never exceed configured target
  • System state (quota + credit) should be consistent and not appear frozen

Additional Context

  • CLI and web UI show identical quota/credit values
  • Issue occurs via OpenCode (not official CLI directly)
  • Unclear whether root cause is:
    • Codex backend (quota / credit accounting)
    • or OpenCode integration layer

Impact

  • Difficult to understand real usage limits
  • Reduced trust in quota and billing behavior
  • Potential risk of incorrect credit accounting
<img width="1366" height="1098" alt="Image" src="https://github.com/user-attachments/assets/4b959467-37ce-4552-b9db-356d44565bea" /> <img width="1406" height="1529" alt="Image" src="https://github.com/user-attachments/assets/4b84398d-b9d4-4922-a0e2-fd965f2f5350" /> <img width="1389" height="841" alt="Image" src="https://github.com/user-attachments/assets/aebfceaa-1238-4a45-84aa-548ac367e803" /> <img width="1374" height="701" alt="Image" src="https://github.com/user-attachments/assets/1af8c1c2-d7d6-4649-bd5d-203f40c6dac9" />

What steps can reproduce the bug?

Steps to Reproduce

  1. Use Codex via OpenCode

  2. Check usage via /status

  3. Observe:

    • 5h limit: 100%
    • Weekly limit: 0%
    • Credits: ~250
  4. Continue using Codex normally (multiple requests)

  5. Observe that:

    • Usage continues to work normally
    • 5h limit remains at 100%
    • Weekly limit remains at 0%
    • Credits do not decrease
  6. At some point, credit balance increases unexpectedly:

    • Example: 250 → 1250 (+1000)
  7. Verify:

    • No auto top-up transaction recorded
    • No payment method charged
  8. Disable auto-reload

  9. Observe:

    • Quota values remain unchanged ("stuck")
    • Still able to use Codex normally

What is the expected behavior?

No response

Additional information

No response

extent analysis

TL;DR

The most likely fix or workaround involves investigating and potentially adjusting the integration between OpenCode and Codex CLI, focusing on quota and credit synchronization.

Guidance

  • Verify that the issue persists when using the official Codex CLI directly, to isolate if the problem lies within OpenCode's integration layer or Codex's backend.
  • Check the documentation of OpenCode and Codex CLI for any known issues or version mismatches that could cause desynchronization of quota and credit values.
  • Temporarily disable auto-reload and monitor usage manually to see if the issue is related to the auto-reload feature.
  • Review the images provided for any visual cues or error messages that might indicate the root cause of the desynchronization.
  • Consider reaching out to the support teams of both OpenCode and Codex for further assistance, as the issue might require adjustments on their end.

Example

No code snippet can be provided without more specific details on the integration or APIs used between OpenCode and Codex CLI.

Notes

The provided information suggests a complex interaction between OpenCode, Codex CLI, and the user's account settings. Without direct access to the systems or more detailed logs, pinpointing the exact cause is challenging. The issue might be specific to the interaction between these services and the user's configuration.

Recommendation

Apply a workaround by closely monitoring usage and manually managing credits until the root cause is identified and addressed, as the current behavior could lead to unexpected charges or service disruptions.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING