How Codex Rate Limits Work

OpenAI Codex — the CLI, the IDE extensions, and Codex in ChatGPT — runs on whichever OpenAI plan you sign in with, and that plan decides what limits you. There are three different shapes, and they behave differently enough that it helps to know which one you're on.

ChatGPT subscriptions: 5-hour and weekly windows

On a ChatGPT Free, Plus, Pro, or Team subscription, Codex counts your usage against two rolling windows at once: a 5-hour window that governs bursts, and a weekly window that governs sustained use. Each has its own percentage used and its own reset time, and whichever is closer to full is the one that stops you first — AI Battery marks it binding.

OpenAI reports both windows as a percentage of your plan's allowance rather than as a token count, so there is no fixed number to memorise: the usage endpoint says how much of the window you have used and when it resets, and that is exactly what AI Battery shows. Purchased credits, if you have bought any, appear as a separate balance under the windows.

Business and Enterprise: a credit budget

Business and Enterprise workspaces don't use the two windows. Instead an administrator sets a spend control — an individual credit budget per user for the billing period. Codex reports how much of that budget you have used; when it is exhausted (or the workspace marks spend control as reached) Codex stops until the period resets or the budget is raised. Workspaces without an individual cap report as uncapped.

AI Battery shows this as a single Credits bar instead of the 5-hour / weekly pair, with "no cap" when there is no individual limit.

API keys: per-minute limits and a real bill

If you run codex login --api-key (or add a key in AI Battery), there are no plan windows at all. Every request is billed at OpenAI's API rates, and the only limits are the per-minute request and token rate limits OpenAI returns in its x-ratelimit-* response headers. They refill continuously, so hitting one means slowing down for a minute, not waiting hours.

Because there is no subscription behind an API key, the costs AI Battery shows for it are a real bill — they appear without the ~ prefix used for API-equivalent estimates everywhere else. (If a ChatGPT-backed Codex account is also signed in, the ~ stays: the CLI's sessions can't be attributed to the key.)

100% is "at capacity", not "throttled"

A window reading 100% means you have used your allowance; it does not by itself mean OpenAI is rejecting requests. Codex reports an explicit throttle (a rate_limit_reached status or an HTTP 429) when it is. AI Battery only shows the red "Limit reached" state and the broken menu bar star when the provider actually reports a throttle, and it holds a brand-new near-full reading for 10 minutes before trusting it, so one glitchy response can't paint a false alarm.

How AI Battery reads them

Pacing tips