Skip to content

Handle rate limits #424

Closed
Closed

Description

@samyarkd

What version of Codex is running?

0.1.2504172351

Which model were you using?

o4-mini

What platform is your computer?

ubuntu 24.10 nodejs 22

What steps can reproduce the bug?

Use it on a little big repo

e [Error]: Rate limit reached for o4-mini in organization org-XXX on tokens per min (TPM): Limit 200000, Used 161431, Requested 45504. Please try again
 in 2.08s. Visit https://platform.openai.com/account/rate-limits to learn more.
    at e.a [as iterator] (file:///home/user/.nvm/versions/node/v22.11.0/lib/node_modules/@openai/codex/dist/cli.js:449:1514)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async T0.run (file:///home/user/.nvm/versions/node/v22.11.0/lib/node_modules/@openai/codex/dist/cli.js:466:2933) {
  status: undefined,
  headers: undefined,
  request_id: undefined,
  error: {
    type: 'tokens',

What is the expected behavior?

Wait and try from where it was left

What do you see instead?

Rate limit error and i have to it all over again

Additional information

No response

Activity

  1. Aylr commented on Apr 21, 2025

    @Aylr

    Stoked for a fix for this issue. Using version 0.1.2504172351

  2. WASasquatch commented on Apr 21, 2025

    @WASasquatch

    I'm curious, can this actually be fixed without OpenAI aware of Codex and allowing better token usage? The token rate system seems specifically designed so it can't be circumvented by cooldowns anyone could implement in their code. Encouraging you to climb tiers or strike a deal with an OpenAI contract.

  3. wbraswell commented on Apr 22, 2025

    @wbraswell
  4. NickSdot commented on Apr 22, 2025

    @NickSdot

    @tibo-openai
    STILL NOT FIXED!!!
    Lots of bugs open for this one issue?!?
    https://github.com/openai/codex/issues?q=is%3Aissue%20state%3Aopen%20rate%20limit

    Let me translate that for you:
    Hey Tibo, the issue isn't resolved on my end. Seems like this is a low hanging fruit to get a bunch of duplicate issues closed. Any chance you can prioritise it?

  5. tibo-openai commented on Apr 22, 2025

    @tibo-openai
    Collaborator

    Should be fixed in latest release, please install 0.1.2504221401 and re-open if this is still an issue you encounter.

  6. added a commit that references this issue on Dec 22, 2025
    3b6decf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions