Bug: ignoring rate limits in api response
Resolved 💬 16 comments Opened Aug 10, 2025 by leepjwallace Closed Aug 13, 2025
💡 Likely answer: A maintainer (pakrym-oai, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
codex-cli 0.20.0
Which model were you using?
gpt-5
What platform is your computer?
Darwin 24.1.0 arm64 arm
What steps can reproduce the bug?
When executing a task using gpt-5, codex sometimes fails with the above message. This seems to completely break the codex session where exiting out and starting again is the only solution.
The organisation at the time of codex session was Tier 1 (30,000 TPM).
Replaced my OpenAI organisation with placeholder <ORG> in the below error message;
🖐 stream disconnected before completion: Rate limit reached for gpt-5 in organization <ORG> on tokens per min (TPM): Limit 30000, Used 6899, Requested 24050. Please try again in 1.898s. Visit https://platform.openai.com/account/rate-limits to learn more.
What is the expected behavior?
Expected behaviour is codex respects the rate limit headers in the api response to prevent this in codex session.
What do you see instead?
🖐 stream disconnected before completion: Rate limit reached for gpt-5 in organization <ORG> on tokens per min (TPM): Limit 30000, Used 6899, Requested 24050. Please try again in 1.898s. Visit https://platform.openai.com/account/rate-limits to learn more.
Additional information
_No response_
16 Comments
👍 impossible to use gpt-5 now
This issue has been raised in several threads since April, and all were closed without a resolution. What is going on here!?
@dcarr622, once this is patched, can you confirm that it is truly resolved? @tibo-openai keeps closing this same issue while stating it’s patched, yet the overwhelming general consensus among users is that it isn’t.
unfortunately this is making me quit codex
any good alternative i should look at?
The fix for this issue is going to ship in the next release.
still happening in 0.21
Still happening in 0.22...
Unusable. Why do you keep closing the issue without resolving?
Many people are leaving codex for Claude because of this.
I am in the process of contacting openAI on behalf of my company to request a refund for my credits and will be referencing this thread as well as @pakrym-oai, @tibo-openai, and those other oai engineers that have been indiscriminately closing this issue without any resolution.
It looks like openAI engineers are having trouble with coding after they took away claude.
\mdbro
19th August... still happening... making gpt 5 in codex cli literally unusable...
Getting your "organisation" upgraded from tier 1 to tier 2 (buy the initial $5 of credits, wait 168 hours, then buy another $45 of credits) seems to work around this problem by increasing your rate limits enough to make GPT-5 work smoothly in the CLI even with reasoning effort set to high...
Claude
So you closed the issue, admitted that it isn't resolved, but did not reopen the issue?
Come on man. Why the hell would I be rate limited when Im' paying for API credits?
<img width="1582" height="959" alt="Image" src="https://github.com/user-attachments/assets/9e03ffde-9c50-4fe7-8fd9-64fc734d5e75" />
The linked commits don't fix this issue, I just tested with the latest version and it's still aggressively rate limiting when using API keys and disconnecting streams.
There should be a way to set the TPUs in the config, so Codex would delay bombarding the API with so many calls and spread them out evenly.
i Opened one too.
IMO they need to increase the codex rate limits, they are all handled separately by model, so it seems like a trivial fix but I am speculating.
This error is so annoying, stupid error still hinders my progress on coding work!