You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's normal to hit rate limits, but the current behavior of codex is to basically crash and abort everything in flight:
[Error]: Rate limit reached for gpt-4.1 in organization org-abcxyz on tokens per min (TPM): Limit 450000,
Used 368526, Requested 91276. Please try again in 1.306s.
A better behavior would be to take that output, and retry 1.4 seconds later with exponential backoff. Furthermore, given the limits are well-known, an even better behavior would be to display tokens left (or %) and have the CLI be aware enough to influence the AI behavior. For example, at 95% write a plan for a next session, etc.
Built from source with latest pull and still observing rate limit crashes:
[Error]: Rate limit reached for o4-mini in organization org-abcxyz on tokens per min (TPM): Limit 200000, Used 168699, Requested 41255. Please try again in 2.986s.
I haven't seen the error again since the last time I updated about an hour ago, but I'm not pushing it that hard at the moment... others may chime in. Thanks for the prompt response! (no pun intended 😉 )
I just tested this on the latest main (post-#153) by installing from source:
git clone https://github.com/openai/codex.git
cd codex/codex-cli
npm install
npm run build
npm link
I’m still seeing immediate CLI exit on token rate limits with no retry behavior. Example:
[Error]: Rate limit reached for gpt-4.1 on tokens per min (TPM): Limit 30000, Used 24695, Requested 5446. Please try again in 282ms.
at iterator (cli.js)
at async run (cli.js)
So either the retry logic isn’t wired up yet, or it’s not catching this case. Happy to help debug further if needed.
I still get hit by rate limits as well, crashes and does not know where to resume, so I have to run all instructions again...
[Error]: Rate limit reached for o4-mini in organization org-BRZky604OkacepMUlEb9lq1i on tokens per min (TPM): Limit 200000, Used 148977, Requested 55092. Please try again in 1.22s. Visit https://platform.openai.com/account/rate-limits to learn more.
at e.a [as iterator] (file:///Users/XXX/local/codex/codex-cli/dist/cli.js:375:1514)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async E0.run (file:///Users/XXX/local/codex/codex-cli/dist/cli.js:392:2925) {
status: undefined,
headers: undefined,
request_id: undefined,
error: {
type: 'tokens',
code: 'rate_limit_exceeded',
message: 'Rate limit reached for o4-mini in organization org-BRZky604OkacepMUlEb9lq1i on tokens per min (TPM): Limit 200000, Used 148977, Requested 55092. Please try again in 1.22s. Visit https://platform.openai.com/account/rate-limits to learn more.',
param: null
},
code: 'rate_limit_exceeded',
param: null,
type: 'tokens'
}
Getting the same error
Codex version: 0.1.2504161551
[Error]: Rate limit reached forgpt-4.1in organization org-5MFShhFqaGV0OkehheyElBcz on tokens per min (TPM): Limit 30000, Used 26407, Requested 15377. Please try again in 23.568s. Visit https://platform.openai.com/account/rate-limits to learn more.
at e.a [as iterator] (file:///opt/homebrew/lib/node_modules/@openai/codex/dist/cli.js:445:1514)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async R0.run (file:///opt/homebrew/lib/node_modules/@openai/codex/dist/cli.js:462:2639) {
status: undefined,
headers: undefined,
request_id: undefined,
error: {
type: 'tokens',
code: 'rate_limit_exceeded',
message: 'Rate limit reached for gpt-4.1 in organization org-5MFShhFqaGV0OkehheyElBcz on tokens per min (TPM): Limit 30000, Used 26407, Requested 15377. Please try again in 23.568s. Visit https://platform.openai.com/account/rate-limits to learn more.',
param: null
},
code: 'rate_limit_exceeded',
param: null,
type: 'tokens'
}
Node.js v23.11.0
This is unacceptable behavior of this system. It should have inherently been built with cooldown.
Now I have no option but to wait 7 days (after my first purchase) to get the access I need (if that's even enough). It's such an annoyance and hindrance to my workflow I decided on, and thought I could use, that I want to call, dispute all charges to OpenAI with my bank as a scamming service, and close out and move to services with same features, but bypass all rate limits and token limits with unlimited packages with their own API keys to OpenAI.
I had been using o4 for days no on Windsurf without any rate limit issues, and it's cheaper by leaps and bounds. Insane.
Reacted by Samyar, Eduardo Fonseca, Hooshyar and Anoir Ben Tanfous
I reached the daily limit of 200 requests (yes, I just signed up) on 4.1-mini. And this was like my second promt. It worked for 15 minutes and then crashed. 🤦♂️ Totally useless tool as it can only waste my money and do nothing.
[Error]: Rate limit reached for gpt-4.1 in organization <ord ID> on tokens per min (TPM): Limit 30000, Used 1271, Requested 29281. Please try again in 1.104s. Visit https://platform.openai.com/account/rate-limits to learn more.
at e.a [as iterator] (file:///opt/homebrew/lib/node_modules/@openai/codex/dist/cli.js:582:1514)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async ky.run (file:///opt/homebrew/lib/node_modules/@openai/codex/dist/cli.js:599:2785) {
status: undefined,
headers: undefined,
request_id: undefined,
error: {
type: 'tokens',
code: 'rate_limit_exceeded',
message: 'Rate limit reached for gpt-4.1 in organization <org ID> on tokens per min (TPM): Limit 30000, Used 1271, Requested 29281. Please try again in 1.104s. Visit https://platform.openai.com/account/rate-limits to learn more.',
param: null
},
code: 'rate_limit_exceeded',
param: null,
type: 'tokens'
}
🖐 stream disconnected before completion: Rate limit reached for gpt-5 in organization org-xxxx on tokens per min (TPM): Limit 30000, Used 23332, Requested 15275. Please try again in 17.214s. Visit https://platform.openai.com/account/rate-limits to learn more.
Activity
tibo-openai commentedon Apr 16, 2025
Latest version should back-off for 15s and retry. Please upgrade and let me know if you still see this issue.
DanielHou315 commentedon Apr 16, 2025
Built from source with latest pull and still observing rate limit crashes:
There is no sign of 15s backoff in the output.
tibo-openai commentedon Apr 17, 2025
Could you check from source again, after #153. Thx!
RamXX commentedon Apr 17, 2025
I haven't seen the error again since the last time I updated about an hour ago, but I'm not pushing it that hard at the moment... others may chime in. Thanks for the prompt response! (no pun intended 😉 )
kilsbo commentedon Apr 17, 2025
I just tested this on the latest
main(post-#153) by installing from source:I’m still seeing immediate CLI exit on token rate limits with no retry behavior. Example:
So either the retry logic isn’t wired up yet, or it’s not catching this case. Happy to help debug further if needed.
Cheers
lextoon commentedon Apr 17, 2025
I still get hit by rate limits as well, crashes and does not know where to resume, so I have to run all instructions again...
[Error]: Rate limit reached for o4-mini in organization org-BRZky604OkacepMUlEb9lq1i on tokens per min (TPM): Limit 200000, Used 148977, Requested 55092. Please try again in 1.22s. Visit https://platform.openai.com/account/rate-limits to learn more.
at e.a [as iterator] (file:///Users/XXX/local/codex/codex-cli/dist/cli.js:375:1514)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async E0.run (file:///Users/XXX/local/codex/codex-cli/dist/cli.js:392:2925) {
status: undefined,
headers: undefined,
request_id: undefined,
error: {
type: 'tokens',
code: 'rate_limit_exceeded',
message: 'Rate limit reached for o4-mini in organization org-BRZky604OkacepMUlEb9lq1i on tokens per min (TPM): Limit 200000, Used 148977, Requested 55092. Please try again in 1.22s. Visit https://platform.openai.com/account/rate-limits to learn more.',
param: null
},
code: 'rate_limit_exceeded',
param: null,
type: 'tokens'
}
Node.js v22.14.0
codex --version
0.1.2504161510
vabole commentedon Apr 17, 2025
Getting the same error
Codex version: 0.1.2504161551
pierresisson commentedon Apr 17, 2025
same here!
0xdevalias commentedon Apr 20, 2025
See also:
WASasquatch commentedon Apr 20, 2025
This is unacceptable behavior of this system. It should have inherently been built with cooldown.
Now I have no option but to wait 7 days (after my first purchase) to get the access I need (if that's even enough). It's such an annoyance and hindrance to my workflow I decided on, and thought I could use, that I want to call, dispute all charges to OpenAI with my bank as a scamming service, and close out and move to services with same features, but bypass all rate limits and token limits with unlimited packages with their own API keys to OpenAI.
I had been using o4 for days no on Windsurf without any rate limit issues, and it's cheaper by leaps and bounds. Insane.
Yamilquery commentedon Apr 21, 2025
Ok. It seems that I then need to stop using Codex until OpenAI fixes this.
mishgoni commentedon Apr 28, 2025
I reached the daily limit of 200 requests (yes, I just signed up) on 4.1-mini. And this was like my second promt. It worked for 15 minutes and then crashed. 🤦♂️ Totally useless tool as it can only waste my money and do nothing.
tibo-openai commentedon Apr 29, 2025
This was fixed a while ago, please ensure that you are running the latest version here: https://github.com/openai/codex/blob/main/CHANGELOG.md#012504251709
You should see
levkk commentedon May 24, 2025
Just got that error again.
cjangrist commentedon Aug 10, 2025
Signed up 200/month to try gpt5 . 30k tokens per minute ? .... that means the context window isn't 400k like advertised.... it's 30k....
Thank God for claude
Codex as of yesterday still completely crashes and burns when hitting 30k limit, requiring complelty starting new chat.
shenanigans12 commentedon Aug 15, 2025
@tibo-openai
🖐 stream disconnected before completion: Rate limit reached for gpt-5 in organization org-xxxx on tokens per min (TPM): Limit 30000, Used 23332, Requested 15275. Please try again in 17.214s. Visit https://platform.openai.com/account/rate-limits to learn more.
codex-cli 0.21.0
feat(stage1): wrap public retrieval CLI with replayable audit receipts
feat(storybook): cover new-session flows and mixed input recovery