rate_limit_exceeded

Resolved 💬 1 comment Opened Apr 16, 2025 by bessarabov Closed Apr 16, 2025

I'm experimenting with codex but I'm very constantly getting the error rate_limit_exceeded.

It is quite possible that I do something wrong, but the user experience is not so great.

I'm runing codex:

node@e542460e71f1:/app$ codex -m gpt-4.1-mini

Then I ask him to change some thing in a project. He does several steps, but after a small number of steps it failes with the error



e [Error]: Rate limit reached for gpt-4.1-mini in organization org-REDACTED on tokens per min (TPM): Limit 200000, Used 155151, Requested 49105. Please try again in 1.276s. Visit https://platform.openai.com/account/rate-limits to learn more.
    at e.a [as iterator] (file:///usr/local/lib/node_modules/@openai/codex/dist/cli.js:443:1514)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async I0.run (file:///usr/local/lib/node_modules/@openai/codex/dist/cli.js:460:2356) {
  status: undefined,
  headers: undefined,
  request_id: undefined,
  error: {
    type: 'tokens',
    code: 'rate_limit_exceeded',
    message: 'Rate limit reached for gpt-4.1-mini in organization org-REDACTED on tokens per min (TPM): Limit 200000, Used 155151, Requested 49105. Please try again in 1.276s. Visit https://platform.openai.com/account/rate-limits to learn more.',
    param: null
  },
  code: 'rate_limit_exceeded',
  param: null,
  type: 'tokens'
}

Node.js v20.19.0
node@e542460e71f1:/app$

The problem here that it fails and the codex program finishes and I need to start from the very beginning (with the same result).

Probably I'm using the wrong model, or I have incorrect settings for my key in the https://platform.openai.com

But maybe the codex could be improved so it does not exits, but sleeps for a minute (or asks for some user input)

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗