codex - 💡(How to fix) Fix Credits desync: CLI blocked with "usage limit hit" while UI showed 312 credits, web ui dropped to 0 with no usage recorded. [2 comments, 2 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#18083Fetched 2026-04-17 08:33:08
View on GitHub
Comments
2
Participants
2
Timeline
12
Reactions
0
Timeline (top)
cross-referenced ×6labeled ×3commented ×2unlabeled ×1

Error Message

CLI responds with usage limit error

RAW_BUFFERClick to expand / collapse

What version of Codex CLI is running?

Custom fork based on openai/codex/main @ commit 4cc6818

What subscription do you have?

ChatGPT Pro

Which model were you using?

gpt-5.4-mini

What platform is your computer?

Linux 6.17.0-20-generic x86_64 unknown

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

Tmux

What issue are you seeing?

I was actively using Codex CLI and had ~312 credits remaining (confirmed in the UI shortly before the issue).

I then attempted to submit a message and received:

■ You've hit your usage limit. Visit https://chatgpt.com/codex/settings/usage to purchase more credits or try again at Apr 17th, 2026 6:10 AM.

At the same time:

CLI blocked further usage entirely Codex cloud usage page suddenly showed 0 credits remaining No new usage entries were logged for today Credits appeared to drop from ~312 → 0 instantly No visible consumption in usage history explaining the drop

This looks like a state desync between billing/credits and enforcement, or a backend accounting issue.

What steps can reproduce the bug?

Use Codex CLI normally with remaining credits (~312 in my case) Submit a prompt CLI responds with usage limit error Check usage UI: Credits now show 0 No corresponding usage logged for the drop

Thread ID:

019d6d0a-82da-7560-a51f-35dabdd0a229

What is the expected behavior?

Credits should decrement transparently and consistently CLI enforcement should match UI-reported credit balance Usage history should reflect any credit consumption Users should not be blocked if credits are available

Additional information

This appears to be a critical billing/state consistency issue rather than a simple quota limit.

extent analysis

TL;DR

The issue may be resolved by investigating and fixing the state desync between billing/credits and enforcement, potentially a backend accounting issue, to ensure consistent credit tracking and usage reporting.

Guidance

  • Verify the usage history and credit balance in the UI to confirm the discrepancy and check for any hidden or unlogged usage that might have caused the credit drop.
  • Investigate the Codex CLI and backend logs for any errors or inconsistencies in credit tracking and usage reporting around the time of the issue.
  • Check the billing and enforcement mechanisms to ensure they are correctly integrated and updating the credit balance in real-time.
  • Consider testing the Codex CLI with a smaller credit balance to see if the issue reproduces and to isolate the problem.

Example

No code snippet is provided as the issue seems to be related to the backend and billing systems rather than a specific code error.

Notes

The issue appears to be specific to the custom fork of the Codex CLI and the gpt-5.4-mini model, so the solution may depend on the specific implementation and configuration of these components.

Recommendation

Apply workaround: Given the potential complexity of the issue and the custom fork of the Codex CLI, it may be more practical to apply a workaround, such as manually tracking credits or using a different model, until the root cause can be identified and fixed.

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