Two developers run the same Codex task. One pays a few cents. The other pays several times more. The code looks similar. The difference is often one setting: reasoning effort.
Codex can “think” before it writes code. That thinking is hidden, but you still pay for it. This guide explains how Codex reasoning effort affects cost, how the settings compare, and how to find the cheapest setting that still produces reliable code.
Why Reasoning Effort Changes Your Codex Bill
Reasoning models produce hidden reasoning tokens before they answer. OpenAI’s reasoning guide states that these tokens are not visible through the API, but they still take up space in the context window and are billed as output tokens.
Output tokens are the expensive side of the bill, and caching doesn’t discount them. A short answer can therefore hide a long, costly thought process. We cover this in more detail in our guide to what reasoning tokens add to your bill.
Reasoning effort controls how much of that thinking the model does. More effort means more reasoning tokens, more time, and a higher cost per task.
Codex Reasoning Settings: What You Can Choose
In Codex CLI, the setting is model_reasoning_effort. According to this configuration guide, the values are minimal, low, medium, high and xhigh. Not every model supports every level, so check the model you use. You can change it three ways:
- Permanently, in your
config.tomlfile. A project-level file overrides your personal one. - For one run, with the
-cflag on the command line. - Mid-session, with the
/modelcommand.
There is also a separate plan_mode_reasoning_effort setting. It lets you use deep thinking when Codex plans a task and a cheaper setting when it implements it. That split is one of the easiest ways to cut spend without losing quality.
Codex Low vs High Reasoning Effort: Comparison
| Low | Medium | High | xhigh | |
|---|---|---|---|---|
| Relative cost | Lowest | Baseline | Noticeably higher | Highest |
| Speed | Fastest | Balanced | Slower | Slowest |
| Best for | Small edits, tests, formatting, CI jobs | Everyday coding | Hard debugging, multi-file refactors, planning | Rare, high-stakes problems such as security review |
| Main risk | Misses edge cases | Few | Overthinking simple tasks | Timeouts and wasted spend |
How big is the cost gap? One community guide estimates reasoning tokens at roughly 0.3x of medium for low and 8–15x for xhigh. Treat those as rough estimates and not official figures, because they vary by model and task.
Here is an illustrative example. Say a task produces a 500-token answer. At low effort the model might add 1,000 hidden reasoning tokens, and at high effort 12,000. At an assumed $10 per million output tokens, that is about $0.015 against $0.125, more than 8x the cost for the same visible answer. These numbers are hypothetical, so replace them with your own usage data.
Does Higher Reasoning Effort Improve Coding Quality?
Sometimes, but not reliably. The evidence is mixed:
- A write-up of 90 agent runs reports that moving from high to xhigh raised perfect first-run outcomes from 28% to 89% at a cost increase of only 9–29%. It is a single source, so test it before relying on it.
- A preprint on coding-agent cost found a different pattern. It tested Claude Code, not Codex, but the lesson carries over. Moving from low to xhigh raised billed cost by 2.4–4.5x, and all timeouts and empty patches occurred at high or xhigh effort. For one model, low effort sat on the cost-success frontier. For another, high beat both low and xhigh.
The takeaway is that more thinking helps some tasks and models and wastes money on others. Your own tasks should decide.
How to Find the Cheapest Reliable Setting
Don’t judge a setting by cost per run. Judge it by cost per accepted result, because a cheap run that fails and needs two retries can cost more than one careful run. A simple test:
- Pick 10 to 20 real tasks from your backlog, across easy, medium and hard.
- Run each at low, medium and high. Keep the model and prompt the same.
- Record cost, time and whether the result was accepted without rework.
- Find the lowest setting that passes for each task type.
- Turn the results into rules, such as low for tests and CI, medium for features, high for debugging.
To formalise the metric, see our guide to AI coding ROI and cost per accepted pull request.
How to Reduce Codex Reasoning Tokens and Optimize Token Usage
Once you have your rules, these steps cut the bill further:
- Default to medium, override upward. Set the global default low enough to be cheap, and raise effort only for the run that needs it with the
-cflag. - Use low effort in CI and automation, where tasks are repetitive and well defined.
- Use a smaller model for routine work. OpenAI’s own guidance suggests this to make usage limits last longer. Compare options in our breakdown of the cheapest Codex model for everyday coding tasks.
- Cap output where you can. OpenAI’s guide notes that
max_output_tokenslimits all generated tokens, including reasoning. Leave enough headroom, because the guide recommends reserving at least 25,000 tokens when you start experimenting. - Keep prompts and context lean. Smaller context lowers the input side, which stacks with your reasoning savings. See prompt caching vs prompt compression.
Reasoning cost also depends on how you pay for Codex. Subscriptions hide it behind usage limits, while API billing shows every token. Our guide to Codex API vs ChatGPT subscription cost explains which route suits your team.
Make Reasoning Spend Visible Across Your Team
A single developer can tune their own setting. A team can’t without data. Defaults drift, someone leaves xhigh on, and nobody notices until the invoice arrives.
Track spend by developer, project and model. Then set budgets before costs climb, as covered in our guide to setting AI coding agent budgets by developer and team. If your team also uses Claude, our Claude Code vs Codex cost comparison shows how the two stack up.
Frequently asked questions
What is Codex reasoning effort?
It is a setting that controls how much hidden thinking Codex does before answering. In Codex CLI it is called model_reasoning_effort, with values from minimal up to xhigh depending on the model.
Do reasoning tokens cost money?
Yes. They aren’t visible, but OpenAI states that they are billed as output tokens.
Is low or high reasoning effort better for Codex?
Neither is always better. Low is usually enough for routine edits, tests and CI. High suits hard debugging and multi-file changes. Test both on your own tasks and compare cost per accepted result.
How do I change reasoning effort in Codex?
Set model_reasoning_effort in your config.toml for a permanent change, use the -c flag for one run, or use /model during a session. A project-level config overrides your user-level one.
What is plan mode reasoning effort?
It is a separate setting, plan_mode_reasoning_effort, that sets effort only while Codex plans. You can think deeply when planning and use a cheaper setting when implementing.
How can I reduce Codex reasoning tokens?
Default to medium, drop to low for routine and CI work, use a smaller model for simple tasks, keep prompts lean, and raise effort only when a task needs it.
Does xhigh reasoning always give better code?
No. Some tests show large gains, while others show higher cost, more timeouts and no improvement over high. Reserve xhigh for hard problems and test it first.
Written by Chamod S.
Stop Paying for Thinking You Don’t Need
See reasoning-heavy spend by developer, project and model. Set hard-stop budgets and control which model runs, so a high-effort setting never goes unnoticed. Start free with Opviera.
Keep reading
AI Showback vs Chargeback: Allocate LLM Costs by Team
AI showback vs chargeback: understand how to allocate LLM expenses across engineering teams, improve cost transparency, and establish financial accountability.
Read article → Cost controlReasoning Tokens Cost: What AI Thinking Adds to Your Bill
Reasoning tokens can increase AI coding costs even when they aren't visible. Learn how thinking tokens are billed and how engineering teams can control spending.
Read article → Cost controlPrompt Caching vs Prompt Compression: Which Saves More?
Prompt caching vs prompt compression: which saves more on AI costs? Compare token savings, real-world use cases, and strategies to reduce LLM expenses.
Read article →