Skip to content

Codex usage quota and credit balance appear inconsistent and possibly stuck. #17764

@nitipit

Description

@nitipit

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
Image Image Image Image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingrate-limitsIssues related to rate limits, quotas, and token usage reporting

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions