Skip to content

Codex crashes when hitting rate limit rather than waiting #97

Closed

Description

@adamkdean

Codex crashes when hitting rate limit rather than waiting.

Given that it needed to wait 3.6 seconds, it should really just hang back and wait.

(It also listed all files which is fine, but included node_modules which made up a large chunk of those tokens.)

[Error]: Rate limit reached for o4-mini in organization org-<snip> on tokens per min (TPM): Limit 200000, Used 166273, Requested 46014. Please try again in 3.686s. Visit https://platform.openai.com/account/rate-limits to learn more.
    at e.a [as iterator] (file:///Users/adam/.nvm/versions/node/v22.13.1/lib/node_modules/@openai/codex/dist/cli.js:443:1514)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async I0.run (file:///Users/adam/.nvm/versions/node/v22.13.1/lib/node_modules/@openai/codex/dist/cli.js:460:2513) {
  status: undefined,
  headers: undefined,
  request_id: undefined,
  error: {
    type: 'tokens',
    code: 'rate_limit_exceeded',
    message: 'Rate limit reached for o4-mini in organization org-<snip> on tokens per min (TPM): Limit 200000, Used 166273, Requested 46014. Please try again in 3.686s. Visit https://platform.openai.com/account/rate-limits to learn more.',
    param: null
  },
  code: 'rate_limit_exceeded',
  param: null,
  type: 'tokens'
}

Activity

  1. tibo-openai commented on Apr 16, 2025

    @tibo-openai
    Collaborator

    Dupe of #88, we're working on this.

  2. danielj86 commented on Apr 16, 2025

    @danielj86

    The real issue here should be to handle node_modules dir correctly (ignoring it in most of the cases)

  3. tibo-openai commented on Apr 16, 2025

    @tibo-openai
    Collaborator

    Could you open a separate issue for this and we can discuss there? Closing this one in favor of #88

  4. adamkdean commented on Apr 16, 2025

    @adamkdean
    Author

    Dupe of #88, we're working on this.

    Missed that, apologies Tibo!

    Codex is 🚀 so far!

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions