Skip to content

Rate Limits should not disconnect a session. #451

Closed

Description

@ReyNeill

What version of Codex is running?

v0.1.2504172351

Which model were you using?

o4-mini

What platform is your computer?

macOS

What steps can reproduce the bug?

Hit rate limit rate with a long request, e.g: "Refactor my codebase following X steps"

What is the expected behavior?

When rate limits are exceeded, the codex session should not be lost (codex quits itself), since the model loses all the context earned throughout the session!

What do you see instead?

e [Error]: Rate limit reached for o4-mini in organization REDACTED on tokens per min (TPM): Limit 200000, Used 160193, Requested 51963. Please try again in 3.646s. Visit https://platform.openai.com/account/rate-limits to learn more.
at e.a [as iterator] (REDACTED)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async T0.run (REDACTED) {
status: undefined,
headers: undefined,
request_id: undefined,
error: {
type: 'tokens',
code: 'rate_limit_exceeded',
message: 'Rate limit reached for o4-mini in organization REDACTED on tokens per min (TPM): Limit 200000, Used 160193, Requested 51963. Please try again in 3.646s. 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
reyneill@M4-Brain-Interface klip %

Additional information

No response

Activity

  1. agung483 commented on Apr 21, 2025

    @agung483

    Yes, it is very annoying.

  2. ayesimple93 commented on Apr 21, 2025

    @ayesimple93

    You’d think the half-wits at OpenAI would have thought have something this simple before releasing it to the public. Are they not surprised they are losing customers to other AI companies?

  3. RichardCrawford-Repo commented on Apr 21, 2025

    @RichardCrawford-Repo

    This behaviour makes codex cli not useable for anything remotely complex. I'm building a fairly small web site and codex crashes with rate limits exceeded error on just about every request now. I'm torn between using codex to fix codex or just using a different coding assistant.

  4. Aylr commented on Apr 21, 2025

    @Aylr

    Running into the same issue. Stoked for a fix for this! Version: 0.1.2504172351

  5. WASasquatch commented on Apr 21, 2025

    @WASasquatch

    This behaviour makes codex cli not useable for anything remotely complex. I'm building a fairly small web site and codex crashes with rate limits exceeded error on just about every request now. I'm torn between using codex to fix codex or just using a different coding assistant.

    Over 10 bucks for me just today. And when I tried other models, I just get model errors, or the model itself can't properly use codex tools. At least with an IDE like windsurf I am refunded (ironically using the same models...).

  6. macovedj commented on Apr 21, 2025

    @macovedj

    For what it's worth, I told codex not to hit rate limits. It told me it didn't have access to the info to pause so as to avoid rate limits, but functionally I haven't been rate limited since.

  7. WASasquatch commented on Apr 21, 2025

    @WASasquatch

    For what it's worth, I told codex not to hit rate limits. It told me it didn't have access to the info to pause so as to avoid rate limits, but functionally I haven't been rate limited since.

    Are you sure you didn't just roll over into a higher tier?

  8. kevin-m-dean commented on Apr 21, 2025

    @kevin-m-dean

    For what it's worth, I told codex not to hit rate limits. It told me it didn't have access to the info to pause so as to avoid rate limits, but functionally I haven't been rate limited since.

    Ironically, this worked for me too. And I am still tier 1.

    Image
  9. WASasquatch commented on Apr 21, 2025

    @WASasquatch

    There has been a lot of updates overnight, maybe it's fixed. Giving it a try anyway and telling it. Lol We'll see...

    Update: It seems to be working, but not positive if that's also just almost 24/hr of not using it.

    Update 2: Yeah, no, my tokens were just refreshed. Rate limit is still an issue.

  10. danielj86 commented on Apr 21, 2025

    @danielj86

    This was reported here 5 days ago, and still no fix.
    At this point, Codex is completely unusable, definitely not the standard you'd expect from OpenAI.
    #88

  11. wbraswell commented on Apr 22, 2025

    @wbraswell
  12. yuki2006 commented on Apr 22, 2025

    @yuki2006

    I don’t mind terminating the command, but I’d like the session to be recoverable. The same goes for other situations: for example, if I’m running something and mistype a prompt and want to cancel it, there’s no way to do so. I have to kill it with Ctrl +C, but since the session doesn’t resume afterward, I’m left with no choice but to put up with it. It feels like the same kind of problem.

  13. WASasquatch commented on Apr 22, 2025

    @WASasquatch

    I don’t mind terminating the command, but I’d like the session to be recoverable. The same goes for other situations: for example, if I’m running something and mistype a prompt and want to cancel it, there’s no way to do so. I have to kill it with Ctrl +C, but since the session doesn’t resume afterward, I’m left with no choice but to put up with it. It feels like the same kind of problem.

    Yes. This is one thing I like about the IDE's. If it has trouble running commands, or server issues (where you're refunded!), you can simple say "You encountered cascade errors, and tool call errors, perhaps try a different approach?" and it picks up where it left off. Currently the context is just lost with Codex, which sucks.

  14. 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.

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