Hero Background

Next-Gen App & Browser Testing Cloud

Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles

Next-Gen App & Browser Testing Cloud
AITutorial

Codex Usage: How to Check Your Limits and Make Them Last

Check Codex usage with /usage, /status, and /statusline, read the real limit tables by plan and model, track token usage in CI, and cut how fast you burn it.

Author

Anubhav Singhmaar

Author

Author

Samyak Goyal

Reviewer

Published on: August 26, 2026

The same Codex task costs about twenty times more on one model than another. OpenAI's published Codex pricing and limits documentation puts GPT-5.6 Sol at 100 credits per million input tokens and 500 per million output tokens, against 5 and 30 for GPT-5.6 Luna: a 20x gap on input and nearly 17x on output. That ratio, not your plan, is the biggest lever on how long your Codex usage lasts.

Most guides to Codex usage stop at where the dashboard lives. This one covers the four places the number actually appears, the real limit table by model and plan, the commands that drain the meter fastest, and how to read usage out of a CI run as structured JSON. The command surface here was checked against Codex CLI 0.149.1 running locally, and every limit figure against OpenAI's own documentation.

Overview

Codex usage is the allowance your ChatGPT plan gives the Codex agent, metered in a rolling five-hour window with additional weekly limits. Check it with the /usage command inside an active Codex CLI session, or in OpenAI's usage dashboard. Consumption scales with the model, context, reasoning, and tools you use, not with message count.

Where Codex Usage Shows Up

  • /usage: The account-level view inside the Codex CLI. It opens a menu for daily, weekly, or cumulative token activity, and it is also where an earned rate-limit reset is redeemed.
  • /status: The session-level view. It reports the active model, approval policy, writable roots, and remaining context capacity for the chat you are in right now.
  • /statusline: A configurable TUI footer that can pin rate limits, token counters, and context stats permanently, persisted to tui.status_line in config.toml.
  • Shared allowance pool: Codex, ChatGPT Work, ChatGPT for Excel, and Workspace Agents draw from one allowance and credit pool, which is why Codex usage can drop without any Codex activity.
  • codex exec --json: In scripts and CI, the turn.completed event carries an exact usage object with input, cached input, output, and reasoning token counts.

What Drains It Fastest

Model choice dominates, followed by image generation, which OpenAI states uses included limits three to five times faster. Re-prompting is the hidden cost: when a coding agent cannot see whether the UI it changed still works, verification runs on TestMu AI's Kane CLI in a real browser instead of on repeated Codex turns.

What Does Codex Usage Actually Measure?

Codex usage measures token consumption converted into credits, drawn against a rolling five-hour window on ChatGPT plans. It is not a message counter. OpenAI's pricing documentation states that model choice, context, reasoning, tool use, retrieval, and caching all affect usage, "so prompt length alone isn't a reliable estimate."

Three facts from that documentation explain almost every "where did my usage go" question:

  • One window, two surfaces - local messages and cloud chats share the same five-hour window on ChatGPT plans, and additional weekly limits may apply on top. Delegating a task to the cloud does not buy you a separate budget.
  • One pool, four products - Codex, ChatGPT Work, ChatGPT for Excel, and Workspace Agents draw on a shared allowance and credit pool where those features are available on your plan, per OpenAI's guidance on using Codex with your ChatGPT plan. A colleague's spreadsheet agent and your refactor compete for the same allowance.
  • Credits, not dollars, are the unit - OpenAI publishes a credits-per-million-tokens rate card and states that GPT-5.6 usage averages 5 to 30 credits per message. Credits let you compare a Luna turn against a Sol turn without touching billing.

One boundary is worth internalizing because it removes a common false alarm. ChatGPT file uploads, image generation, and voice carry separate limits, reset periods, and banners, and OpenAI states plainly that those limits "do not apply to Codex." A "50 images in the last day" banner in ChatGPT tells you nothing about your Codex allowance.

The exception runs the other way. Image generation started inside Codex counts against the same limits as local messages and cloud chats, and consumes them three to five times faster on average depending on image quality and size.

How Do You Check Codex Usage?

There are four places the number lives, and they answer different questions. Use /usage for the account allowance, /status for the current session, /statusline to keep limits permanently visible in the terminal footer, and the usage dashboard when you need the credit balance and reset time together.

1. Run /usage Inside a Codex CLI Session

This is the fastest answer and the one most write-ups miss. Start Codex in any project directory, type /usage, and the CLI opens a usage menu with two branches: show token activity, or redeem an available earned reset.

# Open the usage menu
/usage

# Or jump straight to a view
/usage daily
/usage weekly
/usage cumulative

Two behaviors are worth knowing before you rely on it. If the session lacks Codex service account authentication, Codex shows a sign-in requirement instead of numbers. And because /usage is where a banked reset is redeemed, it is the command to reach for when you are locked out rather than merely curious.

2. Run /status for the Current Session

/status answers a narrower question: what is this specific chat configured to do, and how much context is left. It prints the active model, the approval policy, the writable roots, and current token usage. When the terminal UI is connected to a remote app server, it also prints the remote address and server version.

Use it as a pre-flight check, not a budget check. Confirming you are on GPT-5.6 Luna before a long mechanical refactor is the single cheapest habit in this article, and /status is where you confirm it.

3. Pin Limits to the Footer With /statusline

Running /usage every twenty minutes is how people end up installing a third-party menu-bar tracker, and the Codex CLI already solves it. Type /statusline, toggle and reorder the items you want, and confirm. The footer updates immediately and persists to tui.status_line in config.toml.

Available status-line items, per the Codex developer commands reference, include model, model plus reasoning, context stats, rate limits, git branch, token counters, session id, current directory or project root, and the Codex version. Rate limits and token counters are the two that make a separate tracker unnecessary.

A matching /title command does the same for the terminal window or tab title, persisting to tui.terminal_title. Useful when several Codex sessions are running in parallel tabs and you want to see which one is close to a limit without switching to it.

4. Open the Usage Dashboard

OpenAI's guidance is direct: if you are nearing or have reached a Codex limit, open Settings or your usage dashboard, and check which allowance is exhausted, your credit balance, and any reset time shown. The dashboard is the only surface that shows all three together, which is why it is the right place to go when you are locked out and deciding what to do next.

Two dashboards get confused with each other: the Codex usage dashboard covers your subscription allowance, while API spend, which applies when Codex runs on your own API key, is billed and reported separately at standard API rates. Members of eligible Enterprise workspaces with credit-based billing open Settings, then Usage and billing in ChatGPT Desktop to see their monthly Work and Codex allowance plus recent credit history.

OpenAI's own advice on cadence is worth repeating: check the dashboard every week or two to understand your pace and remaining capacity, and if usage is higher than expected, ask whether a smaller model or a tighter task scope would still produce a useful result.

Note

Note: Codex writes the code. TestMu AI's Kane CLI proves it works, driving a real Chrome browser from a plain-English objective and returning a pass or fail with evidence. Start free

What Are the Codex Usage Limits by Plan and Model?

OpenAI publishes estimated local messages per five-hour window for each model and plan. The ranges are wide because a message is not a fixed unit, but the relative gaps are the useful part: Luna gives 20 to 25 times the messages Sol does on the same plan.

ModelPlusPro 5xPro 20xBusiness
GPT-5.6 Sol10-10050-500200-2,00010-100
GPT-5.6 Terra25-200125-1,000500-4,00025-200
GPT-5.6 Luna250-2,0001,250-10,0005,000-40,000250-2,000
GPT-5.515-8075-400300-1,60015-80

Estimated local messages per five-hour window, from OpenAI's Codex pricing documentation. Cloud chats on ChatGPT plans use GPT-5.6 Sol and may use more of your allowance than local messages. Running Codex on an API key is usage-based instead, with model availability following the API models your key can reach.

Four qualifiers change how you should read that table:

  • Business matches Plus - the Business column is identical to Plus for these models, and Enterprise or Edu plans without flexible pricing have the same per-seat limits as Plus for most features. Seat cost and per-seat allowance are separate questions.
  • Flexible pricing removes the ceiling - Enterprise and Edu workspaces with flexible pricing have no fixed rate limits; usage scales with credits instead. If your workspace is on that model, the five-hour window is not the constraint.
  • Fast mode costs more - speed configurations increase credit consumption for every applicable model, so they burn the included limits faster. The Fast tier is toggled per session with the /fast command.
  • Codex-Spark is metered separately - GPT-5.3-Codex-Spark is a research preview for ChatGPT Pro users that runs on specialised low-latency hardware, governed by its own usage limit that may adjust with demand. We benchmarked its output quality in GPT-5.3 Codex Spark vs Claude Opus 4.6.

One dated item to plan around: OpenAI states that on August 31, 2026, GPT-5.4 and GPT-5.4 mini stop being available in Codex when you sign in with a ChatGPT account. The stated replacements are GPT-5.6 Terra for GPT-5.4 and GPT-5.6 Luna for GPT-5.4 mini. Workspace defaults, saved model settings, managed configurations, and automations pinned to the old names need updating before that date; the change does not affect the OpenAI API or Codex on your own API key.

When Does Codex Usage Reset, and What Happens When You Hit a Limit?

The five-hour window rolls forward on its own schedule and any weekly limit resets on its own date, both shown in the limit banner and the usage dashboard. If you hit a limit mid-turn, Codex can finish that turn, subject to fair-use limits. After it ends, you choose from the options your plan offers.

Those options, in OpenAI's own framing, are: add credits, apply an available reset, upgrade, or wait for the displayed reset time. Eligible Plus and Pro users can buy credits without changing plans, and Business, Edu, and Enterprise workspaces with flexible pricing can buy additional workspace credits. Everyone can also run extra local chats on an API key, charged at standard API rates.

Two things people assume that are not true:

  • Support cannot reset your limits - OpenAI states directly that Support does not reset ChatGPT or Codex usage limits. Contact them only if usage looks miscounted, or if access has not returned after the stated reset time.
  • A banked reset is not a plan upgrade - some Plus and Pro referral promotions grant a banked rate-limit reset. Using a full banked reset refreshes both the five-hour and weekly windows, but your scheduled weekly reset date does not move, and banked resets expire.

If the numbers themselves look wrong, OpenAI asks for a specific bundle before it will investigate: the limit or credit balance you are questioning, the reset time shown, a screenshot, the Codex client and model, and when it happened including your time zone. Gathering that before you open the ticket is faster than the round trip that follows an incomplete one.

Which Codex CLI Commands Change How Much Usage You Burn?

A handful of commands move the meter far more than the rest: /model and /fast set the per-turn rate, /compact reclaims context, /mcp shows how much tool context you are carrying, and codex exec decides whether a task runs once or interactively.

Running codex --help on Codex CLI 0.149.1 prints the full subcommand surface. The abridged output below is from a real run on this machine, not from documentation:

$ codex --version
codex-cli 0.149.1

$ codex --help
Codex CLI

If no subcommand is specified, options will be forwarded to the interactive CLI.

Usage: codex [OPTIONS] [PROMPT]
       codex [OPTIONS] <COMMAND> [ARGS]

Commands:
  exec              Run Codex non-interactively [aliases: e]
  review            Run a code review non-interactively
  login             Manage login
  mcp               Manage external MCP servers for Codex
  plugin            Manage Codex plugins
  cloud             [EXPERIMENTAL] Browse tasks from Codex Cloud and apply changes locally
  resume            Resume a previous interactive session
  fork              Fork a previous interactive session
  apply             Apply the latest diff produced by Codex agent as a 'git apply'
  doctor            Diagnose local Codex installation, config, auth, and runtime health
  sandbox           Run commands within a Codex-provided sandbox
  update            Update Codex to the latest version
  features          Inspect feature flags

Inside an interactive session, these are the slash commands that matter for usage:

CommandWhat it doesEffect on usage
/modelChoose the active model and reasoning effort.Largest single lever. Moving a routine task from Sol to Luna cuts the credit rate 20x on input tokens and nearly 17x on output.
/fastToggle the Fast service tier when the model catalog exposes one.Increases credit consumption for supported models. Leave off for work that is not latency-sensitive.
/compactSummarize the visible chat, replacing earlier turns with a concise summary.Frees context so later turns carry fewer input tokens instead of re-sending the whole transcript.
/mcpList configured Model Context Protocol tools; add verbose for server diagnostics.Diagnostic. Every connected MCP server adds context to your messages, so this is how you find what to disable.
/planSwitch to plan mode and have Codex propose an execution plan first.Spends one cheap turn to avoid several expensive wrong ones on ambiguous work.
/initGenerate an AGENTS.md scaffold in the current directory.Neutral to write, but the file it creates is injected into future prompts, so its size becomes a recurring cost.

If MCP servers are new to you, the trade-off between a server and a plain command-line tool is covered in MCP vs CLI. For a wider look at how Codex compares to the other terminal agents, see our roundup of agentic coding CLI tools.

Detect and fix flaky tests with TestMu AI

How Do You Measure Codex Token Usage in CI?

Run Codex non-interactively with codex exec --json and read the turn.completed event. It carries a usage object with exact input, cached input, output, and reasoning token counts for that turn, which is the only per-run usage number you can log yourself.

With --json enabled, stdout becomes a JSON Lines stream of every event Codex emits. OpenAI's non-interactive mode documentation lists the event types as thread.started, turn.started, turn.completed, turn.failed, item.* and error, and shows the completed turn carrying its own token accounting:

{"type":"turn.completed","usage":{"input_tokens":24763,"cached_input_tokens":24448,"output_tokens":122,"reasoning_output_tokens":0}}

That single line is enough to build a per-job usage meter. Pipe the stream through jq, keep the completed turns, and append them to a log your pipeline already collects:

# Record token usage for every Codex turn in a CI job
codex exec --json --sandbox workspace-write "add a regression test for the checkout redirect" \
  | tee >(jq -c 'select(.type=="turn.completed") | .usage' >> codex-usage.jsonl)

# Sum input and output tokens across the run
jq -s 'reduce .[] as $t ({in:0,out:0};
        {in: (.in + $t.input_tokens), out: (.out + $t.output_tokens)})' codex-usage.jsonl

The cached_input_tokens field is the one to watch. Cached input is billed at a tenth of the standard rate on the published card, so a run where cached input is close to total input is a run whose prompt prefix is stable and cheap. When that ratio collapses, something upstream is changing the prompt on every turn, and an AGENTS.md edit or a newly enabled MCP server is usually the cause.

Two guardrails belong in the same job. Set the least permission the workflow needs, because codex exec defaults to a read-only sandbox and only --sandbox workspace-write lets it edit. And pair --json with --output-last-message so you capture machine-readable progress and a final natural-language summary in one pass.

Outside CI, the community Codex-Usage CLI reads reset credits, rate-limit windows, and local session metadata straight from your Codex home directory. It parses session transcripts under the local .codex folder and reports on them offline. It also calls undocumented backend endpoints for the reset and rate-limit data, so treat it as a convenience that can break without notice rather than a dependency.

Seven Ways to Make Your Codex Limits Last Longer

Six of these come from OpenAI's own guidance on maximising limits. The seventh comes from where the turns actually go: re-prompting an agent that cannot see whether its change works costs more than the change did.

  • Match the model to the task - OpenAI positions Sol for complex reasoning and ambiguous problems, Terra as the everyday production workhorse, and Luna for fast, high-volume work like routing, classification, extraction, and focused coding. Renaming a variable across forty files is Luna work.
  • Control prompt size - be precise about the instruction and remove context that is not load-bearing. Input tokens are charged per turn, so an oversized preamble is charged again on every follow-up in the session.
  • Limit source material - hand Codex only the relevant files, and narrow the sources or date range when possible. Pointing it at a directory when a single module would do multiplies the retrieval cost with no gain in answer quality.
  • Shrink AGENTS.md and nest it - the file is injected into your messages, so its size is a recurring tax on every turn. OpenAI advises nesting AGENTS.md files inside a larger repository so each subdirectory carries only the instructions its own work needs.
  • Disable MCP servers you are not using - every connected server adds tool definitions to the context of every message. Run /mcp to see what is loaded, and disable the ones this task does not need before you start.
  • Define the output before you ask - state the audience, format, and length, and separate required work from optional improvements. An unbounded "improve this" invites the longest, most expensive answer the model can justify.
  • Verify the running app outside the agent loop - when Codex cannot tell whether the button it rewired actually works, the cost is not one turn, it is the retry cycle that follows the bug report. Moving that check to a browser agent takes it off the Codex meter entirely.

The fourth and fifth points are in tension with installing agent skills, and the trade-off deserves stating. A skill that teaches Codex to drive a browser earns its context cost several times over because it removes retry turns; a marketplace of skills you never invoke does not. Install skills at the project level, in that project's AGENTS.md, rather than globally in ~/.codex/AGENTS.md, and the cost lands only on the repositories that need it.

Codex vs Claude Code: How Do the Usage Models Differ?

Both agents meter a subscription against rolling windows, and both are opaque about the exact conversion from a task to a unit of usage. Codex is the more instrumented of the two from the terminal, and the more entangled with other products drawing on the same pool.

  • In-terminal visibility - Codex ships three usage surfaces in the CLI: /usage for the account allowance, /status for the session, and /statusline to pin rate limits and token counters into the footer permanently.
  • Shared versus dedicated pool - Codex usage is shared with ChatGPT Work, ChatGPT for Excel, and Workspace Agents where those are on your plan. A Codex allowance is a household budget, not a private one.
  • Published per-model ranges - OpenAI publishes estimated messages per five-hour window for each model and plan, which makes the cost of a model switch estimable before you make it rather than after.
  • The shared blind spot - both agents reason over source code. Neither renders your application, clicks through the journey, or confirms a redirect lands where it should, so both report "passed" on evidence that never touched a browser.

That last point is the one with a budget attached. A change can pass unit tests and a clean review and still ship a dead button, a form posting to the wrong route, or a console error that only fires in a real browser. Every one of those comes back as a bug report and another round of prompting, on whichever agent you are paying for.

Why Verifying Codex's Work Costs the Most Turns

Codex plans a change, edits across files, runs your tests, and opens a pull request. Green unit tests do not prove the running web app works, so the verification gap gets closed by a human filing a bug and prompting Codex again, which is the most expensive turn in the cycle.

TestMu AI's Kane CLI closes that gap outside the Codex meter. It is a deterministic browser agent that drives a real Chrome browser from a plain-English objective and returns an evidence-backed pass or fail, with no selectors to write and no page objects to maintain. Every run seals an evidence pack holding per-step screenshots, a HAR network log, console output, and a failure record.

TestMu AI Codex web app testing page describing Kane CLI verifying a Codex-built web app before the pull request merges

Kane CLI ships a first-class skill for Codex CLI, installed alongside Claude Code and Gemini CLI in one command. The skill teaches Codex when to invoke the browser agent, how to build the command, and how to parse the structured output it gets back:

# Install Kane CLI and the agent skill
npm install -g @testmuai/kane-cli
npx @testmuai/kane-cli-skill

# What Codex then runs on its own, after it edits
kane-cli run "Go to https://ecommerce-playground.lambdatest.io/ and add the first product to the cart, then verify the cart badge shows 1" --agent

The --agent flag is what makes this work inside a coding agent. It streams NDJSON that Codex parses with jq and tail, ending in a run_end event with a stable schema, so the agent reads its own pass or fail and fixes the break before it opens the pull request. Installation for each agent, including the exact AGENTS.md path Codex reads, is in the Kane CLI skills documentation.

Two details keep the usage arithmetic honest: Kane CLI runs on its own credits, not your Codex allowance, so browser verification does not compete with the five-hour window, and because the skill installs project-level into that repository's AGENTS.md, its context cost lands only where browser verification is actually wanted. The same pattern applied to Claude Code is written up in Claude Code and Kane CLI verification.

Run tests up to 70% faster on the TestMu AI cloud grid

What to Do Today

Open a Codex session, run /statusline, and turn on the rate limits and token counter items. That one change converts Codex usage from something you discover at a lockout into something you can see while you work, and it persists to config.toml so you only do it once.

Then do two things this week. Run /mcp and disable every server this project does not need, and check whether your AGENTS.md has grown into a document you would not read yourself. Those two files are the recurring cost on every turn, and both are usually oversized.

If the turns you are losing are retry turns rather than first-attempt turns, the fix is verification rather than budgeting. Install Kane CLI, point Codex at the skill, and let it confirm the running journey in a real browser before it opens the pull request. TestMu AI's page on Codex web app testing walks through the three-step setup, and the Kane CLI getting started guide covers installation, authentication, and a first run.

Sources

  • [1] Codex pricing, usage limits, credit rate card, and tips for extending limits - OpenAI developer documentation (verified August 26, 2026)
  • [2] Developer commands reference, including /usage, /status, /statusline, /compact and /model - OpenAI Codex documentation (verified August 26, 2026)
  • [3] Non-interactive mode and the codex exec JSON event stream - OpenAI Codex documentation (verified August 26, 2026)
  • [4] Using Codex with your ChatGPT plan, covering the shared allowance pool, banked resets, and limit behavior mid-turn - OpenAI Help Center (verified August 26, 2026)
  • [5] Codex CLI version and subcommand output captured from a local run of codex-cli 0.149.1 on August 26, 2026

Author

...

Anubhav Singhmaar

Blogs: 12

  • Linkedin

Anubhav Singhmaar is an AI Product Manager at TestMu AI driving Kane CLI, the command-line tool that brings browser automation to the terminal, turning natural-language flows into runs in a real Chrome browser that return pass or fail with shareable proof. He owns the roadmap and prioritization and works with engineering to ship developer-facing features. Before TestMu AI, he spent over four years at Sprinklr owning enterprise voice AI across APAC and EMEA. A mechanical engineer turned product manager, he grounds guidance in real QA workflows.

Reviewer

...

Samyak Goyal

Reviewer

  • Linkedin

Samyak Goyal is a Senior Member of Technical Staff at TestMu AI engineering Kane CLI, the command-line tool that runs browser automation from the terminal, where a flow described in natural language executes in a real Chrome browser and returns pass or fail with shareable proof. He is a backend engineer with 4+ years of experience, previously an SDE at Innovaccer, where he built APIs, introduced Kafka, and cut deployment from weeks to hours. Samyak also builds multi-agent systems, skill-orchestration frameworks, and a personal copilot that indexes 200+ microservice repositories.

Add to Google preferred sources Icon

Add to Google preferred sources

Open in ChatGPT Icon

Open in ChatGPT

Open in Claude Icon

Open in Claude

Open in Perplexity Icon

Open in Perplexity

Open in Grok Icon

Open in Grok

Open in Gemini AI Icon

Open in Gemini AI

Copied to Clipboard!
...

3000+ Browsers. One Platform.

See exactly how your site performs everywhere.

Try it free
...

Write Tests in Plain English with KaneAI

Create, debug, and evolve tests using natural language.

Try for free

Codex Usage FAQs

Did you find this page helpful?

More Related Blogs

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests