On this page · 8 sections
Codex usage limits are the allowance included with your ChatGPT plan. On most plans it is measured in a five-hour window, a weekly window, or both. Your remaining balance and reset times are on the Codex usage dashboard (Settings → Usage), and /status shows your remaining limits inside a CLI session. If you hit a limit mid-turn, Codex lets the agent keep working on that turn, subject to fair-use limits. After that you wait for the reset, use a reset or credits if your account has them, or switch the CLI to API billing.
Every OpenAI fact below links to the official page it comes from. Most were retrieved on 17 October 2026; the December 2026 change, the credits section and the plan-end section were checked on 23 November 2026. OpenAI changes these terms often, so your own Usage page wins whenever it disagrees with this post.
How Codex usage limits work
If you also use ChatGPT Work, a separate feature from ordinary ChatGPT chat, it spends from the same allowance: OpenAI says Work inside ChatGPT "uses the same pricing, credits, and usage limits as Codex." How fast a message spends it depends on the model, the context it carries, reasoning, tool use, and whether the task runs locally or in the cloud. Cloud tasks may use more than local messages. Codex pricing FAQ
Which windows apply depends on the plan:
Swipe horizontally to see all columns.
| Plan | Five-hour window | What else to know |
|---|---|---|
| Plus, Business Standard | Yes | Weekly limits may also apply |
| Pro ($100, $200 or $500 a month) | None at the moment | The allowance is still finite, and a weekly limit can apply |
| Business Premium | None | Five times the included Work and Codex usage of a Standard seat; check Usage for any weekly limit |
| Enterprise and Edu with flexible pricing | No fixed rate limits | Usage draws on workspace credits |
| Enterprise and Edu without flexible pricing | As on Plus, for most features | Per-seat limits match Plus; check with your workspace admin |
Free and Go also include Codex, on GPT-6 Luna in the desktop app (subject to rollout); check their limits on the Usage page. Sources: Codex pricing FAQ, managing usage in Work and Codex, ChatGPT Business models and limits, ChatGPT Business FAQ.
OpenAI does not publish a fixed message count for any plan. Its estimate table for Plus and Business Standard gives a range per model instead: 15 to 160 local messages per five hours on GPT-6.1 Sol, and 350 to 3,000 on GPT-6 Luna. The page calls these estimates, "not fixed message limits." Fast mode spends included usage at 2.5 times the rate of Standard speed, and Ultrafast at 8 times. Codex pricing FAQ
A change is coming in December 2026. OpenAI says that from then on, the allowance on Plus, Pro and Business plans "will be shared across ChatGPT and Codex" and measured in tokens, so heavy agent work in ChatGPT and in Codex will draw on one balance. Instant chat will not draw from it. Settings → Usage will show the combined remaining usage and reset times, and once it runs out the options stay the same: wait for the reset, upgrade, or buy credits. Understanding ChatGPT and Codex usage limits
How to check your Codex usage limit
- Open Settings → Usage, or go straight to the usage dashboard. It shows what is left and when each limit resets.
- Make sure you are looking at the account and workspace your agent runs under. On ChatGPT web, the profile menu shows the active account and workspace. In a terminal,
codex login statusonly tells you the sign-in method:Logged in using ChatGPTorLogged in using an API key. The CLI uses whichever account last rancodex loginunder itsCODEX_HOME(the folder where Codex keeps its login and settings,~/.codexby default); if you are not sure which one that was, sign in again. Authentication - Inside a running CLI session,
/statusshows your remaining limits along with the active model and token usage./usage daily,/usage weeklyand/usage cumulativeshow how many tokens the account has used, which is a different number from what is left. Plain/usageopens a menu that can also redeem an available reset. Slash commands, where to see your limits - Note which allowance is empty: the five-hour window, the weekly window, or your credits. When both windows apply, an empty one blocks you even if the other still has room, so a refreshed five-hour window does not help while the weekly one is used up.
OpenAI suggests checking the dashboard every week or two. If usage runs higher than you expected, try a smaller model or a tighter task scope. Codex pricing FAQ
How to reset a Codex usage limit
Every limit resets on its own schedule. The options below get you going sooner, and not every account has them. OpenAI support does not hand out extra resets. If Settings → Usage shows no reset you can use, refresh the page and confirm you are in the right account and workspace. If a promotion says you should have one and it still does not show, contact support so they can check it. How banked Codex resets work
Wait for the scheduled reset
Where a five-hour limit applies, the window does not start at a fixed time of day. Your first Work or Codex message after the previous window ends starts the next one, and the window ends five hours later. Hit the limit one hour into a window and you wait for the rest of that window, about four hours; the Usage page shows the exact time. The weekly window resets at the time shown on your Usage page. Managing usage in Work and Codex
Use a banked reset, if you have one
Some accounts receive a banked reset as a promotion. It is saved until you use it or it expires. In Settings → Usage, look for "1 reset available" or "Full reset", check which limits it covers and when it expires, then confirm. A full banked reset refreshes the five-hour and weekly windows that apply to you and moves your weekly reset date; the Usage page shows the new one. In the CLI, /usage can redeem an available reset too. How banked Codex resets work
Buy an instant reset, if offered
Eligible personal Plus and Pro accounts may see "Buy an instant reset" in the desktop app's Usage settings, or an offer after reaching the weekly limit. Reaching only the five-hour limit does not bring up that offer. A purchased reset restores the five-hour and weekly allowances that apply right away and cannot be saved for later. OpenAI describes it as pulling your normal weekly allowance forward, not as a separate extra allowance: you get a fresh week now. Your new weekly period starts with your first Work or Codex request after the reset, and the next automatic weekly reset comes seven days after that request. Paid weekly resets
Buy credits or upgrade
Plus and Pro users can buy credits to keep working after the included allowance runs out, without changing plans; how long Codex credits last below covers what a balance buys. Business, Edu and Enterprise workspaces on flexible pricing buy workspace credits instead (what happens when you hit usage limits). The other route is a plan with a larger allowance; the Pro plans page compares the tiers.
Check for Luna Reserve
Some personal Plus and Pro accounts, chosen by OpenAI, get Luna Reserve: after regular usage runs out, a separate allowance with its own limit lets them keep working on a Luna model. When regular usage runs out, look for a Luna Reserve notice or a moon icon in the usage warning; if none appears, your account probably does not have it. Luna Reserve
How long Codex credits last
Credits are a separate balance from your included allowance. Codex spends the included five-hour and weekly allowance first and draws on credits only after that runs out. Buy them, and see the balance and recent usage, in Settings → Usage in ChatGPT or Usage & Billing in the Codex app. Credits on personal plans
There is no fixed number of credits per message. OpenAI prices credits per million tokens, by model, with separate rates for fresh input, cached input and output. A few rows of its Standard-speed table: Token rates
Swipe horizontally to see all columns.
| Model | Input | Cached input | Output |
|---|---|---|---|
| GPT-6.2 Astra | 200 | 10 | 1,000 |
| GPT-6.1 Sol | 50 | 2.5 | 250 |
| GPT-6 Luna | 2.5 | 0.25 | 12.5 |
Credits per 1 million tokens, Standard speed.
Estimate what a task costs in credits
About 5.4 credits per task; your balance covers about 186 tasks like this.
Enter 0 or a larger number in every token field and the balance.
To turn a balance into a number of tasks, price one task. Say a task sends 50,000 fresh input tokens, 150,000 cached input tokens and gets 10,000 output tokens back. On GPT-6.1 Sol that costs 2.5 + 0.375 + 2.5, about 5.4 credits. The same task on GPT-6 Luna costs about 0.29 credits. Paid from credits, Fast mode doubles the cost on these models (against included usage it counts 2.5 times, as noted earlier), and Ultrafast (offered on GPT-6.1 Sol, not Luna) costs more again. At those example rates, 1,000 credits cover about 186 such tasks on GPT-6.1 Sol, or about 3,480 on GPT-6 Luna. OpenAI does not publish a single price per credit; purchase prices and discounts depend on your plan, and checkout shows the price before you pay. Your own tasks will differ from this example, so take the per-task figure from your recent usage on the Usage page and divide your balance by it.
Four rules worth knowing before you buy:
- They expire. Credits expire 12 months after purchase and do not roll over; credits bought in Japan after 13 November 2026 expire after 180 days.
- They are not refundable, apart from cases required by law or contract and a short list of exceptions such as a verified billing error.
- The balance can go negative. A task that starts with a positive balance can finish below zero if other usage drains it at the same time; the next purchase pays that off first.
- They are not API credits. They do not pay for API-key usage, and they are a separate balance from the US-dollar ChatGPT wallet that gift cards top up.
Credits work across Codex, ChatGPT Work, Word, Excel and PowerPoint on the same account. A saved instruction such as "ask me before using credits" does not add an approval step: once the included allowance is used up, Codex spends available credits automatically. If you also turn on automatic reload, OpenAI buys more whenever the balance falls below the minimum you set. Credits on personal plans
What happens when your ChatGPT plan ends
After an ordinary cancellation, paid features stay available until the end of the current billing period; if OpenAI refunds that last charge, the access it paid for normally ends earlier. You cancel where you subscribed: in ChatGPT under Settings → Billing, or in the Apple or Google store. Canceling your ChatGPT subscription
Three balances behave differently, so check each one in Settings → Usage before the period ends:
- Included allowance comes with the plan. OpenAI does not describe any carry-over, so plan on losing what is left when the plan ends.
- Purchased credits keep their 12-month expiry. OpenAI's FAQ for Free and Go accounts says you "may still be able to view and use an existing credit balance," which suggests a balance can outlast the plan. Check your own Usage page rather than assuming it.
- Banked resets carry the expiry date shown next to them in Settings → Usage, and that date is the deadline to redeem one. OpenAI does not extend or replace resets that expire. How banked Codex resets work
Keep a long Codex run from stopping at the limit
If you reach a limit during an active turn, OpenAI says the agent "will be able to continue working on that turn, subject to fair use limits." The next turn needs allowance again. What happens to work queued behind it depends on the script or runner calling Codex. I have not tested what codex exec returns when a ChatGPT allowance runs out, so have the script stop on any non-zero exit and check the Usage page. Do not rely on the exit code alone: before starting the next task, check that the last one produced what it should, such as a commit or an output file. What happens when you hit usage limits
Spend less of the allowance per task
Switching to another model does not give back allowance you already used, because it is one shared pool (Luna Reserve, above, is a separate allowance, not a refund). A lighter model makes what is left last longer, as the Sol and Luna ranges above show. Run routine work on it with codex exec -m gpt-6-luna "..." </dev/null from inside a Git repository (the API section below explains why), leave Fast mode off, keep AGENTS.md short, and turn off MCP servers the task does not need, since each one adds context to every message. Managing usage in Work and Codex, making limits last longer
Move the run to API billing
The CLI, IDE extension and desktop app can sign in with an OpenAI API key instead of ChatGPT. That usage is billed through your OpenAI Platform account at standard API rates and does not touch your plan's allowance. OpenAI recommends API-key sign-in for programmatic jobs such as CI. The trade-offs: Codex cloud and cloud features such as GitHub code review and Slack need ChatGPT sign-in, and the models you get are the ones your key can use. Authentication, feature availability
First create an API key in the OpenAI Platform dashboard and export it in your shell as OPENAI_API_KEY (read the value from your secret store, or run read -rs OPENAI_API_KEY && export OPENAI_API_KEY, then paste the key and press Enter, which keeps it off the screen and out of shell history). Without export, the script cannot see it. Then give the API login its own CODEX_HOME, so it does not replace the ChatGPT login you use interactively. Save this as codex-api-login.sh and run it with bash codex-api-login.sh. Do not run it with sh, which may not support pipefail, and do not paste it into an interactive shell, where set -e would close the shell on the first error:
#!/usr/bin/env bash
set -euo pipefail
: "${OPENAI_API_KEY:?set OPENAI_API_KEY to an OpenAI Platform API key first}"
export CODEX_HOME="$HOME/.codex-api"
mkdir -p "$CODEX_HOME"
printenv OPENAI_API_KEY | codex login --with-api-key
codex login status
codex exec --skip-git-repo-check -m gpt-6-luna "Reply with the single word OK" </dev/null
I'm Larry 🍀 Orbi, the creator of Orbi. On 17 October 2026 I ran this on Linux with Codex CLI 0.163.0, with a made-up key, because I did not want to bill a real one for a test:
- With
OPENAI_API_KEYunset or empty, the script stopped at the third line with exit code 1. - Without the
mkdir, Codex refused to start because theCODEX_HOMEdirectory did not exist. - With the made-up key,
codex login --with-api-keyprinted "Successfully logged in", andcodex login statusreported an API-key login. Only the test request caught the bad key: it failed with401 Unauthorizedandinvalid_api_key, and the script exited 1. - In my first version the last line had no
</dev/null. Run from a pipe,codex execprinted "Reading additional input from stdin..." and waited until my timeout killed it.
The same request under my ChatGPT login printed OK and exited 0. I have not run the success path with a real API key.
For the real unattended runs:
- Set the same
CODEX_HOMEon every Codex command, including the one in your runner or crontab. Theexportin the script only lasts for that script. The API-key login then stays in effect as long as nothing signs in again or changes the login settings. - Run from inside a Git repository. Outside one,
codex execstops with "Not inside a trusted directory and --skip-git-repo-check was not specified", which is why the test script passes that flag. Inside a freshly created Git repository, the check passed with the new, emptyCODEX_HOME. - Keep
</dev/nullon everycodex exec, for the reason in the last test above. $HOME/.codex-apistarts empty, so it does not have the approval, sandbox and other settings from your usual~/.codex/config.toml. Copy only the keys you need, leave out login and provider settings such asforced_login_method, and run the test request again. For runs that edit the repository, you can set the sandbox on the command line instead; the Codex YOLO mode post shows what each mode allows.- Cron starts with a much shorter
PATHthan your terminal. SetPATHat the top of the crontab so it includes the directory ofcodexand, if you installed Codex with npm, the directory ofnodetoo: the npmcodexcommand is a Node script. - If your key cannot use
gpt-6-luna, use a model it can in the test request and in your jobs. - The key is stored in
auth.jsoninside$HOME/.codex-api(or your OS credential store), so treat that folder like a password.
Put together, the command for one cron job looks like this:
cd /path/to/repo && CODEX_HOME="$HOME/.codex-api" codex -a never exec -m gpt-6-luna --sandbox workspace-write "Run the tests and fix the failures." </dev/null
Keep the same -m as in your test request; without it, Codex picks its default model. With the made-up key in a fresh Git repository, this command reached the API and exited 1 with the same 401, so it parses and runs as written. Before you hand the job to cron, try one small task that has to write a file.
Codex can also leave OpenAI billing entirely: define another provider that speaks the Responses API under model_providers.<id> in config.toml and select it with model_provider, or use --oss to run a local model through Ollama or LM Studio. Configuration reference
Put a hard cap on API spend
A spend alert only sends a notification, and API traffic keeps going. To stop at a monthly cap, open Organization limits in the OpenAI Platform dashboard (or Project settings → Limits), choose Edit spend limit, enter the amount, turn on "Enforce a hard limit" and save. Requests past the cap return a 429 error with organization_spend_limit_exceeded or project_spend_limit_exceeded. Enforcement is not instantaneous, so recorded spend can go slightly over. API rate limits and your prepaid balance still apply too. OpenAI spend limits
Codex limits and Orbi
Orbi is an open-source runner that takes GitHub Issues through review and merge to a tagged release without someone watching it. Its agent is Pi, an open-source coding agent, not Codex CLI, so the Codex login steps above do not configure it. Self-hosted Orbi can use any OpenAI-compatible API with your own key, so its runs bill to that provider and not to a Codex plan. If you sign Pi in with your ChatGPT/Codex subscription instead, it spends the same allowance described above. The self-hosted guide covers the API-key setup, and the guide to signing Pi in with a ChatGPT/Codex subscription covers the other path. The cost page lists what 169 Orbi deliveries, each an Issue taken to a merged PR, cost on DeepSeek, with the limits of that sample. Those are DeepSeek prices, not an estimate of OpenAI API costs.