π Issue: No Warning Before Rate Limit Auto-Shutoff
What version of Codex is running?
0.27.0
Which model were you using?
gpt-5
What platform is your computer?
Ubuntu 24
What steps can reproduce the bug?
π Issue: No Warning Before Rate Limit Auto-Shutoff
Environment
- OS: Ubuntu 24.04
- CLI:
codex-cli 0.27.0 - OpenAI account: Self-serve API (\~\$200/month usage)
Problem
When using codex-cli for professional workloads, the tool fails abruptly once API rate limits are hit. There are:
- No early warnings when approaching usage limits (tokens/minute, requests/minute, or tokens/day).
- No graceful backoff or retry built into the CLI.
- Jobs simply fail with API 429 errors, leaving the user unaware of how close they were to the cap.
This behavior is extremely disruptive for professional users β particularly when running long or automated jobs β since work is cut off mid-flow without visibility or recovery.
Expected Behavior
- The CLI should surface rate-limit headers (
x-ratelimit-remaining-requests,x-ratelimit-remaining-tokens,x-ratelimit-reset-*). - It should provide clear warnings when usage is approaching limits.
- Ideally, it should support optional auto-backoff / retry to prevent jobs from failing outright.
Why This Matters
- Professional users spending hundreds per month on the API should not be blindsided by auto-shutoffs.
- Every other professional API (AWS, GCP, etc.) provides quota visibility and alerts before hitting hard limits.
- Without this,
codex-clifeels hobby-grade rather than suitable for production workflows.
Proposed Solution
- Add parsing of OpenAIβs rate-limit headers in CLI responses.
- Print warnings (e.g., when <10% headroom remains).
- Provide a
--retryflag for auto-sleep/backoff until reset.
---
β Summary
codex-cli should handle rate-limit boundaries gracefully, instead of forcing users to βguessβ or wrap their own retry logic. Adding this would make the tool far more professional and production-friendly.
---
Would you like me to also draft a support ticket version (shorter, customer-facing) that you can send to OpenAI directly via [help.openai.com](https://help.openai.com), so itβs logged on their side as well?
What is the expected behavior?
_No response_
What do you see instead?
_No response_
Additional information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub β