Codex crashes when hitting rate limit rather than waiting
Resolved 💬 4 comments Opened Apr 16, 2025 by adamkdean Closed Apr 16, 2025
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'
}This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗