Codex Usage Limits: Why You Hit a Limit and How to Continue

Learn how to distinguish a Codex plan limit from an API rate limit, context overflow, or insufficient quota—and choose a safe way to continue working.

Codex Usage Limits: Why You Hit a Limit and How to Continue

If Codex says you have reached a limit, first check the exact error message and the Usage page. A Codex limit included with a ChatGPT plan, an API rate limit, an overflowing context window, and a zero API balance are four different situations. Buying API credits does not increase your subscription allowance, and waiting for a subscription reset will not fix an API error.

As of August 14, 2026, OpenAI's current Codex rate card states that Codex, ChatGPT Work, ChatGPT for Excel, and Workspace Agents draw from the same agentic usage and credit pool when those features are available on your plan. Before attributing a drop in available usage to Codex alone, check Usage for activity from the other agentic features available in your Workspace.

If the task is urgent, you have two independent options: use any official credit mechanism available with your plan, or move the work to a separate API workflow. For the second option, you can configure a Codex custom provider with BetterToken and test it with a small request first. BetterToken provides pay-as-you-go API access; it does not extend a ChatGPT subscription or remove an official Codex limit.

Identify the Limit in One Minute

What you seeWhat it usually meansWhere to checkNext step
A Codex banner saying you reached a usage limitThe shared agentic usage or plan credits available to the account have been exhaustedUsage, the limit banner, and other agentic features available in the WorkspaceUse an available reset or credits, change plans, or wait for the reset
429, rate_limit_exceeded, Retry-AfterA provider-specific API rejection whose cause cannot be inferred from the HTTP status aloneExact error code, response body, response headers, and provider documentationFollow the diagnosis and retry guidance for that specific error
context_length_exceeded or a message saying the context is too longThe request and conversation history leave no room for a new responseCurrent session size and attachmentsStart a new session, reduce the input, or split the task
insufficient_quota or a balance-related rejectionNo API budget or permitted spend is availableBalance, Workspace limit, and key statusAdd funds or correct the limit, then repeat a small test

Do not infer the cause from the 429 status alone. Read the specific error code and response body, then follow the provider's current documentation for that error.

Why You Cannot Rely on a Fixed Message Count

According to the OpenAI Help Center, checked on August 14, 2026, Codex usage depends on the size and complexity of the task, the selected model, and where the task runs. A small local edit and a long task involving a large repository consume allowance differently. A formula such as “N messages every five hours” can therefore become outdated quickly and does not reliably predict actual usage.

For tasks paid with credits under the current token-based rate card, the measurable variables are the selected model and the task's input, cached input, and output tokens. Open the current Codex rate card, then use the information shown for your own Workspace to identify the table and unit that currently apply before estimating costs.

What to Do When You Reach a Codex Plan Limit

  1. Open Usage or the limit banner and record exactly what your account offers: credits, an available reset, an upgrade, or waiting for the limit to reset. Check whether other agentic features available in the Workspace have also used the shared pool. If your current role does not allow you to add credits or manage billing, contact your Workspace owner or admin; the actions available to you still depend on your plan, Workspace role, and admin permissions.
  2. Save uncommitted changes and briefly record the task’s next step. Do not rerun a long turn in the hope that it will slip through.
  3. Choose how to continue: use the official option for your current plan or switch to a separate API workflow. Do not combine these budgets in the same calculation.

Safely Move an Urgent Task to an API Workflow

The API route is useful when you need a separate, measurable budget rather than additional subscription capabilities. With BetterToken, the process is:

  1. Create your own API Key in the Workspace and select a current Model ID from the current Setup page or the model plaza in your Workspace. Do not assume a fixed group name.
  2. Determine the actual CODEX_HOME before creating any file. A custom CODEX_HOME value takes precedence; otherwise it usually resolves to ~/.codex on macOS/Linux and %USERPROFILE%\.codex on Windows.

On macOS/Linux, print the effective directory without changing the variable:

printf '%s\n' "${CODEX_HOME:-$HOME/.codex}"

In PowerShell:

if ($env:CODEX_HOME) { $env:CODEX_HOME } else { Join-Path $env:USERPROFILE ".codex" }

Create $CODEX_HOME/bt.config.toml in exactly that directory:

model = "YOUR_MODEL_ID" model_provider = "bettertoken" [model_providers.bettertoken] name = "BetterToken" base_url = "https://www.bettertoken.ai/v1?utm_source=blog&utm_medium=organic_content&utm_campaign=SEO-093&utm_content=codex-usage-limits-kak-prodolzhit" env_key = "BETTERTOKEN_API_KEY" wire_api = "responses" requires_openai_auth = false request_max_retries = 4 stream_max_retries = 8 stream_idle_timeout_ms = 300000 supports_websockets = false

The filename $CODEX_HOME/bt.config.toml corresponds to the --profile bt command. It does not replace the main $CODEX_HOME/config.toml, so the official provider remains available. The names must match exactly: root-level model_provider = "bettertoken" points to [model_providers.bettertoken]. Replace YOUR_MODEL_ID with the current full API ID from Setup, model plaza, or the current guide.

This --profile flow applies to Codex CLI. Codex Desktop uses the same custom-provider fields, but check the current BetterToken guide for how to select and launch its configuration. For the VS Code extension, follow the separate setup guide; do not copy the CLI profile or its authentication method without checking the current extension instructions.

  1. Export the key in your shell and verify only that the variable is non-empty, without printing its value:
export BETTERTOKEN_API_KEY="YOUR_API_KEY" test -n "$BETTERTOKEN_API_KEY" && echo "BETTERTOKEN_API_KEY is set"
  1. Start Codex CLI with the new profile:
codex --profile bt

Then submit one small read-only request, for example:

Read README.md and summarize its purpose. Do not modify any files.
  1. Verify the request and its usage in the Workspace before continuing with a larger task. The complete current example is available in the Codex setup guide.

Do not put a real key in a repository, article, screenshot, or profile file. The value must come from an environment variable.

Avoid Losing Work When Switching

Create a short handoff file without secrets:

Goal: fix failing test X. Already checked: A and B. Changed files: path/to/file. Next safe step: run one targeted test. Prohibited: commit, deploy, data deletion.

Before opening another working copy, inspect the current state, save tracked changes as a binary-safe patch, and list untracked files separately:

git status --short git diff --binary HEAD > ../codex-handoff.patch git ls-files --others --exclude-standard -z > ../codex-handoff-untracked.zlist

The patch does not include untracked files. Before copying anything, review ../codex-handoff-untracked.zlist and exclude .env files, private keys, credentials, and any other secrets. Keep only paths you have explicitly approved; do not assume an untracked file is disposable or safe to transfer.

Create a new worktree from the current HEAD, check the patch before applying it, and confirm the resulting state:

git worktree list git branch --list codex/api-handoff git worktree add -b codex/api-handoff ../project-api-handoff HEAD if test -s ../codex-handoff.patch; then git -C ../project-api-handoff apply --check ../codex-handoff.patch git -C ../project-api-handoff apply ../codex-handoff.patch fi while IFS= read -r -d '' path; do mkdir -p -- "../project-api-handoff/$(dirname -- "$path")" cp -p -- "$path" "../project-api-handoff/$path" done < ../codex-handoff-untracked.zlist git -C ../project-api-handoff status --short

The if block skips git apply when the tracked patch is empty. The copy loop remains outside that block, so reviewed untracked files are still transferred. If ../project-api-handoff or codex/api-handoff already exists, choose a new unused path or branch name. Do not delete an existing worktree, branch, patch, or untracked file merely to reuse a conflicting name.

Start the new API session with the handoff note and the verified working state instead of the full conversation history. This reduces usage, lowers the risk of context overflow, and makes it less likely that completed actions will be repeated.

If You Receive 429 Instead

Check the following in order:

  1. The specific error code, response body, response headers, and the provider's documentation for that error.
  2. Whether multiple agents or CI jobs are using the same key.
  3. Whether the balance is empty or the Workspace spending budget has been reached.
  4. Whether the error still occurs on one small request after any delay recommended for that specific error.

If the specific error and provider documentation identify temporary rate limiting, use bounded exponential backoff with jitter. Do not retry indefinitely: repeated requests increase the queue and may consume budget after the service recovers.

Make the Final Choice

  • If the Codex banner offers credits or a reset and you want to keep the same plan-based workflow, use the available official option.
  • If you need a separate budget for automation, CI, or an urgent task, configure an API workflow and track its usage separately.
  • If the problem is the context window, reduce the context or start a new session. Spending more or waiting for a limit reset will not solve it.
  • If the issue is an API 429, follow the specific error code, response body, and provider documentation; if the balance is zero, correct the budget before retrying.

Before moving urgent work in Codex CLI, open the current BetterToken setup guide for Codex, create a separate key, determine the actual CODEX_HOME, create $CODEX_HOME/bt.config.toml, run codex --profile bt, and verify one small request before continuing. For the VS Code extension, use its separate setup guide.

Ready to optimize your LLM workflow?

Join thousands of developers building faster, smarter, and more cost-effective AI applications with BetterToken.