Codex — exceeded retry limit, last status 429
The status code at the end changes what this error means — 429, 401 and 503 have nothing in common. Plus why Codex returns 429 when you still have quota left.
⚠ stream error: exceeded retry limit, last status: 429 Too Many Requests
stream error: exceeded retry limit, last status: 401 Unauthorized
stream error: exceeded retry limit, last status: 503 Service Unavailable
stream disconnected before completion429 Too Many Requests#
The obvious reading is that you've used your quota. Often true. But there is a well-documented pattern where it isn't.
When you still have quota left#
#12776 reports 429 on Codex CLI 0.104.0 (macOS 26.3, iTerm2) with:
- 99% of the 5-hour limit available
- 96% of the weekly limit available
- 100% of the model-specific 5-hour limit available
- 99% of the model-specific weekly limit available
A single terminal, both gpt-5.3-codex-spark and gpt-5.3-codex affected. The issue is closed with no documented resolution.
It isn't isolated. #9135 reports an "improper 429" near the end of a 5-hour window with usage remaining, and #27970 reports the same with plenty of quota left.
So check your actual usage before assuming you're rate limited:
codex
# then in the session
/usageIf /usage says you have headroom and you're still getting 429, you are probably looking at a backend fault rather than your account. Waiting a few minutes and retrying is more productive than changing your setup.
When it really is quota#
Two things are worth knowing because they surprise people:
Local and cloud share the same budget. CLI, IDE extension and cloud sessions draw from one pool. There is no separate local allowance.
Agentic runs are expensive in a way chat isn't. An agent reads a lot of a codebase before writing anything, and session start-up context loading counts too. Running three agents in parallel costs roughly three times as much. If you moved from chat to agentic work and started hitting limits, that's why — not a bug.
Automation and third-party providers#
#20553 reports frequent 429s driving Codex from Spec-kit for automated development. Automation removes the natural pauses of human interaction, so it concentrates requests.
If you're pointing Codex at a non-OpenAI backend, the limits are that provider's, not OpenAI's. #2612 is exactly this — exceeded retry limit, last status: 429 running free models through OpenRouter, where free tiers are aggressively limited.
Worth noting: #4840 reports that Codex doesn't always surface 429s coming from model providers clearly, which is part of why this error is confusing when a third party is involved.
401 Unauthorized#
Same wrapper, completely different problem. Your credentials were rejected, and retrying could never have helped.
codex login
codex --versionAn expired or revoked grant is the usual cause. If you see invalid_grant: Grant not found alongside it, that's the same family as the app-server crash on auth failure.
503 Service Unavailable#
The provider is down or degraded. Nothing on your machine will fix it.
Check status.openai.com and wait. If you're on a third-party backend, check theirs instead.
stream disconnected before completion#
The connection dropped mid-response rather than being refused. Sometimes it appears alongside "too many requests", sometimes alone.
Worth checking in this order:
- A proxy or VPN cutting long-lived streaming connections — the most common cause on corporate networks, because agent responses stream for a long time
- Aggressive network timeouts on the same
- Provider-side instability, if the above are clean
A plain chat request will usually succeed while long agentic runs fail, which is the tell for a timeout rather than a quota problem.
Reduce how often you hit this#
- Check
/usagefirst, every time — it separates "I'm out of quota" from "something is wrong" - Don't run parallel agents when you're near the cap. Three agents burn budget three times as fast
- Keep the CLI current,
npm i -g @openai/codex@latest— retry and backoff behaviour has changed across releases, and #157 is an early report of a 429 crashing the CLI outright rather than degrading - Scope your prompts. "Refactor the whole repo" loads far more context than a targeted request
- On a third-party backend, read that provider's limits. OpenAI's don't apply
If you want to report it#
Because this error string covers several distinct failures, the useful report includes the full line with its status code, your Codex version, the model, whether you're on OpenAI or a third-party backend, and a /usage reading from the moment it happened. Without the status code the first reply will just ask for it.
| Issue | Variant |
|---|---|
| #12776 | 429 with 99% of quota remaining |
| #9135 | Improper 429 near end of 5-hour window |
| #27970 | 429 despite available usage |
| #20553 | Frequent 429s under Spec-kit automation |
| #2612 | 429 on OpenRouter free models |
| #4840 | Provider 429s not surfaced clearly |
| #157 | 429 causing CLI abort / raw-mode crash |
FAQ#
What does "exceeded retry limit, last status: 429" mean in Codex?#
Codex retried a request several times and gave up, and the final response was HTTP 429 Too Many Requests. That usually means rate limiting, though there are documented cases of 429 appearing with quota remaining.
Why does Codex say 429 when I still have usage left?#
It's a documented pattern. One report shows 429 with 99% of the 5-hour limit and 96% of the weekly limit available. Check /usage — if you have headroom, it points to a backend fault rather than your account, and waiting briefly is more useful than changing settings.
Is "exceeded retry limit, last status: 401" the same problem?#
No. 401 is Unauthorized — your credentials were rejected, and no amount of retrying helps. Run codex login to re-authenticate.
How do I check my Codex usage?#
Run /usage inside a Codex session. It shows your remaining allowance, and since July 2026 also shows credit types and expiry.
Does running multiple agents use more of my Codex quota?#
Yes, roughly proportionally. Local and cloud sessions share one budget, and each agent loads its own context, so three parallel agents consume about three times as much.