Next-Gen App & Browser Testing Cloud
Trusted by 2 Mn+ QAs & Devs to accelerate their release cycles

On This Page
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
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.
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 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.
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.
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 cumulativeTwo 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.
/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.
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.
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: 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
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.
| Model | Plus | Pro 5x | Pro 20x | Business |
|---|---|---|---|---|
| GPT-5.6 Sol | 10-100 | 50-500 | 200-2,000 | 10-100 |
| GPT-5.6 Terra | 25-200 | 125-1,000 | 500-4,000 | 25-200 |
| GPT-5.6 Luna | 250-2,000 | 1,250-10,000 | 5,000-40,000 | 250-2,000 |
| GPT-5.5 | 15-80 | 75-400 | 300-1,600 | 15-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:
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.
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:
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.
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 flagsInside an interactive session, these are the slash commands that matter for usage:
| Command | What it does | Effect on usage |
|---|---|---|
| /model | Choose 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. |
| /fast | Toggle 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. |
| /compact | Summarize 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. |
| /mcp | List 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. |
| /plan | Switch to plan mode and have Codex propose an execution plan first. | Spends one cheap turn to avoid several expensive wrong ones on ambiguous work. |
| /init | Generate 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.
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.jsonlThe 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.
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.
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.
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.
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.
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.

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" --agentThe --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.
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.
Author
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 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.
Did you find this page helpful?
More Related Blogs
TestMu AI forEnterprise
Get access to solutions built on Enterprise
grade security, privacy, & compliance