codex - 💡(How to fix) Fix Usage Limit Status both in CLI and SDKs [1 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#20310Fetched 2026-05-01 05:44:11
View on GitHub
Comments
1
Participants
2
Timeline
7
Reactions
0
Author
Timeline (top)
labeled ×4unlabeled ×2commented ×1

Code Example

codex status

---

Account status

  5h limit: 100% left (resets 14:39)
  Weekly limit: 91% left (resets 15:28 on 5 May)

Visit https://chatgpt.com/codex/settings/usage for up-to-date rate limits and credits.

---

codex status --json

---

{"rateLimits":{"limitId":"codex","limitName":null,"primary":{"usedPercent":0,"windowDurationMins":300,"resetsAt":1777534802},"secondary":{"usedPercent":9,"windowDurationMins":10080,"resetsAt":1777969707},"credits":{"hasCredits":false,"unlimited":false,"balance":"0"},"planType":"plus","rateLimitReachedType":null},"rateLimitsByLimitId":{"codex":{"limitId":"codex","limitName":null,"primary":{"usedPercent":0,"windowDurationMins":300,"resetsAt":1777534802},"secondary":{"usedPercent":9,"windowDurationMins":10080,"resetsAt":1777969707},"credits":{"hasCredits":false,"unlimited":false,"balance":"0"},"planType":"plus","rateLimitReachedType":null}}}
RAW_BUFFERClick to expand / collapse

What variant of Codex are you using?

CLI

What feature would you like to see?

I would like to see the usage/status information via the CLI. Something akin to /status in the TUI.

Proposed Behavior

codex status

prints the following information in the terminal

Account status

  5h limit: 100% left (resets 14:39)
  Weekly limit: 91% left (resets 15:28 on 5 May)

Visit https://chatgpt.com/codex/settings/usage for up-to-date rate limits and credits.
codex status --json

prints the JSON so that it can be used in the SDK as well

{"rateLimits":{"limitId":"codex","limitName":null,"primary":{"usedPercent":0,"windowDurationMins":300,"resetsAt":1777534802},"secondary":{"usedPercent":9,"windowDurationMins":10080,"resetsAt":1777969707},"credits":{"hasCredits":false,"unlimited":false,"balance":"0"},"planType":"plus","rateLimitReachedType":null},"rateLimitsByLimitId":{"codex":{"limitId":"codex","limitName":null,"primary":{"usedPercent":0,"windowDurationMins":300,"resetsAt":1777534802},"secondary":{"usedPercent":9,"windowDurationMins":10080,"resetsAt":1777969707},"credits":{"hasCredits":false,"unlimited":false,"balance":"0"},"planType":"plus","rateLimitReachedType":null}}}

Additional information

No response

extent analysis

TL;DR

To add the proposed codex status feature, modify the CLI to fetch and display usage and status information, potentially leveraging existing API endpoints.

Guidance

  • Review the existing Codex API documentation to identify endpoints that provide usage and status information, which can be used to implement the codex status feature.
  • Determine the required parameters and authentication methods for these endpoints to ensure secure and authorized access to user data.
  • Consider adding command-line flags (e.g., --json) to control the output format, allowing users to choose between human-readable and JSON formats.
  • Implement error handling and input validation to ensure the feature is robust and user-friendly.

Example

No code example is provided due to the lack of specific implementation details in the issue.

Notes

The implementation details may vary depending on the underlying Codex API and the chosen programming language for the CLI tool.

Recommendation

Apply workaround: Implement a custom solution using the existing Codex API, as there is no clear indication of an existing feature or fixed version that provides the desired functionality.

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