← All fixes
OpenAI· Quota & billing

Codex “You've hit your usage limit. Upgrade your plan or add credits” — the Fixes (2026)

You've hit your usage limit. Upgrade your plan or add credits to continue, or try again later.
Quick answer

Codex usage on ChatGPT plans is metered in rolling windows (roughly 5-hourly plus weekly). Heavy agent sessions exhaust the window; it clears on reset. Codex CLI can also run on your own API key or any custom OpenAI-compatible provider — which removes the plan meter entirely.

What causes it

How to fix it

  1. Wait for the window to reset, or upgrade to a higher ChatGPT tier for bigger windows.
  2. Split work into smaller, scoped tasks instead of one giant session.
  3. Switch Codex CLI to API-key billing (pay-per-token, no plan window).
  4. Or add a custom model provider in ~/.codex/config.toml with an OpenAI-compatible base URL — no meter at all on flat-rate endpoints.
Running an agent?

Cloud tasks and parallel runs multiply usage silently — three parallel tasks is three windows' worth of burn.

The permanent fix

Stop hitting this entirely

Codex CLI supports custom providers natively: add a [model_providers] entry with base_url https://api.stdcmpt.com/v1 and model "standardcompute", and Codex runs at a flat monthly price — no 5-hour window, no weekly cap. Setup guide: /integrations/codex-cli.

Get a free API key →How it connects →

FAQ

Does the Codex limit reset on its own?

Yes — windows are rolling and clear automatically; the message usually indicates when. Weekly caps reset weekly.

Is API-key Codex unlimited?

It's unmetered by the plan but billed per token — heavy use gets expensive. A flat-rate OpenAI-compatible provider gives unmetered *and* fixed-cost.

Related errors

OpenAI monthly usage / billing hard limit reachedOpenAI · 429Claude Code usage limit reached — weekly limits, fixes & the alternatives heavy users switch to (2026)AnthropicCursor “You've hit your usage limit” — how to fixCursor