Skip to main content
kRouter
All posts
Fix an error

Codex usage limit reached: keep working until it resets

Codex says you've hit your usage limit. What the five-hour and weekly caps count, when the message is wrong, and how to keep working until the reset.

Kodelyth · The team behind kRouter
· Updated
9 min read

You are an hour into a task in Codex CLI and the next prompt comes back with this:

You’ve hit your usage limit. Upgrade to Pro (https://chatgpt.com/explore/pro), visit https://chatgpt.com/settings/usage to purchase more credits or try again at 4:12 PM.

That is the wording a ChatGPT Plus account gets. Codex does not retry it, and waiting a few minutes does not move the reset time. If the allowance runs out mid-turn, OpenAI lets that turn finish, within fair-use limits, so it is usually the next prompt that bounces.

What you can decide is how to spend the time until the reset: use an earned reset if your account has one, pay OpenAI for more, or keep Codex running on a backend you already pay for. First, check that it is a limit at all.

Read the message, then /status

Codex chooses the sentence from the plan OpenAI's server reports for your account:

PlanAfter "You’ve hit your usage limit."
Free, GoUpgrade to Plus to continue using Codex, or try again at ...
PlusUpgrade to Pro, visit the usage page to purchase more credits or try again at ...
ProVisit the usage page to purchase more credits or try again at ...
Business, TeamTo get more access now, send a request to your admin or try again at ...
Enterprise, EduTry again at ...

One variant names a separate limit instead: You’ve hit your usage limit for <limit>. Switch to another model now, or try again at .... Workspaces with a spend cap or credit billing can get a different message again, such as "You hit your spend cap set in your workspace", which only the workspace owner can raise. The time is local: a clock time when the reset is today, a date such as Oct 9th, 2026 4:12 PM when it is not. The desktop app words it differently ("You've reached your usage limit...").

Then run /status in Codex. It prints an Account line with your plan, 5h limit and Weekly limit bars with the percentage left and when each resets, and your credit status. The usage dashboard shows the same.

Also try /usage. Besides token activity, its menu can redeem an earned rate-limit reset if OpenAI has given your account one, and that resets the window instead of making you wait.

What the limits count

OpenAI's pricing page describes two layers:

  • A five-hour window. OpenAI's estimate for Plus is 5-45 local messages per window with GPT-6 Astra, 15-160 with GPT-6.1 Sol, 15-150 with GPT-6 Sol and 350-3,000 with GPT-6 Luna.
  • Weekly limits, which "may also apply" on top.

Pro plans currently have no five-hour limit. That changed twice this year: OpenAI lifted the five-hour limit for Plus, Pro and Business in an announcement on July 12, 2026, and brought it back for Plus on August 25, but not for Pro. Guides written in between are out of date.

The ranges are wide because a message is not a fixed unit: OpenAI says model choice, context, reasoning, tool use, retrieval and caching all change what a turn costs. Three things spend the allowance faster than people expect:

  • Cloud tasks. They share the allowance with local sessions and may use more of it per message.
  • MCP servers. Each one adds context to every message. OpenAI's advice is to disable the ones you are not using and keep AGENTS.md small.
  • Fast mode. /fast spends included usage at 2.5 times the Standard rate.

When it is not really a limit

Sometimes the message appears while /status shows plenty left. In June 2026 a Pro subscriber on Codex 0.137.0 was told to "Upgrade to Plus" with every window at 100%. In August a Plus user got it in the desktop app at 97% left.

The wording is a clue. "Upgrade to Plus" is the sentence Codex prints for a Free or Go plan, so if you pay for Plus or Pro and see it, OpenAI's error described your account as Free or Go. Check that Codex is signed in to the account and workspace you pay for.

OpenAI support's first steps in the August thread were to update Codex, sign out, sign back in to the expected account, and run /status again:

npm install -g @openai/codex@latest
codex logout
codex login

If that changes nothing, support's follow-up in the June thread gives the next two checks: does the same account work in Codex on the web, and does every model fail or only one? If /status shows your plan with allowance left and requests still fail, that is OpenAI's to fix. The options below work in the meantime.

What does not help

Retrying or waiting a few minutes. Codex treats a usage limit as final and does not retry it. The reset time is in the message.

Switching model after the fact. The general allowance is shared across models. A cheaper model such as GPT-6 Luna makes the next window last longer; it does not reopen this one. Only the variant that says "Switch to another model now" is fixed by /model.

Logging in again when /status agrees you are out. The allowance belongs to the account, not the session.

A second ChatGPT account to rotate through. kRouter can rotate several Codex logins, but OpenAI's Terms of Use forbid circumventing "any rate limits or restrictions". You would be risking the accounts to save a few days.

Option 1: pay OpenAI for the difference

  • Credits. Plus and Pro can buy them from the usage page linked in the message. Included usage is spent first, then credits, charged per million tokens at each model's rate: GPT-6 Luna costs 2.5 credits per million input tokens, GPT-6 Astra 250. For Free and Go, the message offers an upgrade instead.
  • An API key. OpenAI lets any plan run extra local sessions on an API key, billed at standard API rates, with the models your API account can use. Features that depend on ChatGPT workspace access or cloud services are limited.
printenv OPENAI_API_KEY | codex login --with-api-key

This replaces your saved ChatGPT login. After the reset, codex login signs you back in to your plan.

Option 2: keep Codex, change the backend

Codex sends its requests to whichever provider model_provider in ~/.codex/config.toml names. If you already pay for other model access -- a GitHub Copilot or Kiro plan, a GLM key, OpenCode Go -- Codex can run on it until the reset. kRouter is a local router that puts those behind one Responses API endpoint, the only format Codex still accepts:

npm install -g @sifxprime/krouter
krouter -t

Then, in the dashboard at http://localhost:20128/dashboard:

  1. Connect your providers on Providers.
  2. On Combos, click Create Combo and add models in order. When one fails with a rate limit, quota or server error, kRouter tries the next. Do not start the combo's name with a GPT model id: Codex looks up a model's settings by the start of its name, so a combo called gpt-5.5-backup would get GPT-5.5's prompt, tool formats and context window, and some of those tool formats do not survive translation.
  3. On CLI Tools, open the OpenAI Codex CLI / App card, choose the combo as the model and the subagent model, and click Apply.

For example:

Combo "until-reset"
  1. gh/claude-sonnet-4.6     GitHub Copilot plan
  2. kr/claude-sonnet-4.5     Kiro
  3. ocg/kimi-k2.6            OpenCode Go

Apply writes this into config.toml and keeps your other settings, but not comments in the file, so copy it first if you keep notes there. The key is the one chosen in the card's API Key field (keys are created on the Endpoint page), and it travels in a header, so your ChatGPT login in auth.json is left alone:

model = "until-reset"
model_provider = "krouter"
 
[model_providers.krouter]
name = "kRouter"
base_url = "http://localhost:20128/v1"
wire_api = "responses"
 
[model_providers.krouter.http_headers]
Authorization = "Bearer <your-krouter-key>"
 
[agents]
default_subagent_model = "until-reset"

Add two lines yourself, above the first [ table line so they stay top-level. Codex assumes a 272,000-token window for a model name it does not know, such as a combo name, so set the smallest window among the combo's models and compact a little before it. For a combo whose smallest model has a 128K window:

model_context_window = 128000
model_auto_compact_token_limit = 100000

Restart Codex and start a new session. Codex's resume list shows only sessions recorded with the current provider, so the conversation you were in will not be listed, but the files it changed are on disk and git diff shows where it stopped.

After the reset, click Reset on the card. It removes the model, provider and subagent settings, which puts Codex back on your plan, and it also deletes an API-key login saved in auth.json. Apply replaced your own model line, so set it again if you had one, and delete the two context lines.

Before you rely on it:

  • These are different models. Expect different results from the same prompt.
  • Some Codex features do not survive translation. On these routes kRouter 0.5.164 drops Codex's reasoning-effort setting and its built-in web search, and tools from MCP servers arrive as a single tool with no parameters, so they do not work. Codex CLI with any model covers each one.
  • Copilot and Kiro are subscriptions too. kRouter shows a risk notice before you connect either: the session is not officially licensed for proxy or router use, and the account may be restricted or banned. API-key providers carry no such notice.

Option 3: let the combo fall through on its own

To make Option 2 permanent, connect your ChatGPT account to kRouter's OpenAI Codex provider and put it first:

Combo "codex-chain"
  1. cx/<model>               your ChatGPT plan
  2. gh/claude-sonnet-4.6
  3. ocg/kimi-k2.6

kRouter's built-in Codex list still shows GPT-5.x ids, and OpenAI retires GPT-5.5 from Codex on October 14, 2026, so take the id from the list the provider page fetches from OpenAI (marked From API).

Requests go to your plan while it has allowance. When OpenAI refuses one with usage_limit_reached, the reply includes the reset time. kRouter parks that model on that account until then, for at most six hours, and the same turn moves on to the next entry. A weekly reset three days away costs one refused request every six hours, absorbed by the combo. Other models on the same account are not parked; if the limit covers them too, each is refused once and parked in turn.

kRouter does not see the cap coming. The Quota Tracker page shows each Codex account's session and weekly windows with reset times, plus code-review and Spark windows when OpenAI reports them, but routing does not use those numbers to skip a Codex account in advance. If an account is out until next week, switch it off there. Turn off Empty does that for every connection on the current page with 5% or less left in any window; Turn on Available brings them back.

Know what this involves: kRouter, not Codex, then holds and uses your ChatGPT session, and kRouter's own risk notice says that session is not officially licensed for proxy or router use. Option 2 keeps your login inside Codex.

Choosing

Your situationBest move
/status shows allowance left, or a paid plan is told to upgrade to PlusUpdate Codex, then codex logout and codex login to the account you pay for
The message names a separate limit/model to another model
/usage offers an earned resetRedeem it
Five-hour window, reset within the hourWait
Weekly limit, and you need OpenAI's modelsCredits, or codex login --with-api-key
Weekly limit, and you already pay for other model accessA kRouter combo until the reset, then Reset
You hit the weekly cap every weekA smaller default model, fewer MCP servers, or a bigger plan

Common questions

When does the Codex usage limit reset?

At the time printed at the end of the message. /status shows the reset time for both the five-hour and the weekly window, as does the usage dashboard. Go by those rather than by a fixed day. If your account has an earned reset, /usage can apply it now.

Does switching to a smaller model get around the Codex limit?

Not once the shared allowance is gone. A smaller model makes it last longer next time: OpenAI's Plus estimates are 350-3,000 GPT-6 Luna messages per five hours against 5-45 for GPT-6 Astra. Only the message that says "Switch to another model now" is solved by /model.

Do Codex cloud tasks and the CLI share the same limit?

Yes. Local sessions and cloud tasks draw on one allowance per plan, and cloud tasks may use more of it per message.

Does ChatGPT Pro have a five-hour limit in Codex?

Not at the moment. OpenAI's pricing page says Pro plans currently have no five-hour limit; weekly limits can still apply. Plus has had its five-hour window back since August 25, 2026.

Does kRouter raise my Codex limit?

No. Only OpenAI can add allowance to a ChatGPT account. kRouter sends Codex's requests to other backends while your plan is out.

Kodelyth · The team behind kRouter

Published by Kodelyth, the team that builds kRouter. Posts are drafted with AI assistance and reviewed by a person before they go out. kRouter is free and MIT licensed.

Install kRouter