Codex CLI guide: models and effort

Codex CLI reasoning effort and models

Codex reasoning effort is set with model_reasoning_effort in config.toml, with -c on the command line, or from the /model picker inside a session, and the levels you can choose depend on the model. The model itself is set with -m or the model key. Two details catch people: the default effort is not the same for every model, and the context window Codex reports is larger than the one you actually get.

OpenAI

On Codex CLI

Effort levels come from the model

Each model advertises its own set of levels in the catalog. There is no fixed list, so a picker built from a hardcoded set will drop a level the day Codex adds one, run the turn at the default, and report the level you chose anyway.

The advertised window is not the usable one

Codex reserves part of the context window for its own harness. A model advertising 272,000 tokens gives you about 258,400, and one advertising 128,000 gives you about 121,600. A usage bar built on the advertised figure reads low by that margin.

Model and effort go together

Both are set when a turn starts. Plan mode is the exception worth knowing: it needs a specific resolved model rather than an unresolved default, so it will refuse rather than guess.

Unknown levels fail loudly

Codex rejects an effort level it does not recognise rather than quietly falling back. That is the failure worth having, because the alternative is a turn that runs at a different level than the one displayed everywhere in the interface.

Do not cache the catalog for long

The catalog is the authority on what exists. Reading it live is what keeps a new model or a new effort level from being invisible.

Model

Choosing a model in Codex CLI

There are three ways to pick the model, from most temporary to most permanent:

bash
# For one run
codex -m gpt-6.1-sol
codex exec -m gpt-6.1-sol "explain this stack trace"

# Mid-session, inside the TUI
/model

# As your default, in ~/.codex/config.toml
model = "gpt-6.1-sol"

The model id above is the example OpenAI's config reference uses. Use whatever ids your own login lists (next section). /model opens a picker with the models available to your account and lets you choose the reasoning effort in the same step, when the model has one. Run /status afterwards to confirm what the session is now using.

-c overrides any config key for one run, so codex -c model=gpt-6.1-sol is the same as -m. Flags and -c win over config.toml.

Catalog

Which models can I use? Ask Codex, not a blog post

Which models you can use depends on how you signed in. A ChatGPT login and an API key reach different lists, and so do different plans. Check which one you are on first:

bash
codex login status
# Logged in using ChatGPT

Then print the catalog Codex has for that login. codex debug models renders it as JSON, and it costs nothing because no model is called:

bash
codex debug models | jq -r '.models[]
  | select(.visibility == "list")
  | "\(.slug)  default=\(.default_reasoning_level)  levels=\([.supported_reasoning_levels[].effort] | join(","))"'

Each entry carries the model's slug (the id you pass to -m), its default_reasoning_level, the supported_reasoning_levels with a one-line description of each, and its context_window. Codex caches the same catalog in ~/.codex/models_cache.json. codex debug models --bundled skips the refresh and shows only the catalog built into your binary, which is useful for telling "my account cannot see it" apart from "my CLI is too old to know it".

If Codex answers a model with is not supported when using Codex with a ChatGPT account, the name is fine and your login does not cover it. See Codex model not supported on this account.

Effort

Codex reasoning effort: the levels and how to set them

Reasoning effort is how much the model thinks before it answers. More effort means slower turns and more tokens, and better results on problems that need several steps of reasoning. Set it in any of these places:

bash
# Default, in ~/.codex/config.toml
model_reasoning_effort = "high"

# One run
codex -c model_reasoning_effort=high

# Mid-session: /model, then pick the level

The levels belong to the model, not to Codex. OpenAI's config reference lists low, medium, high, xhigh, max and ultra as examples and says the available levels depend on the model. On the ChatGPT login we checked in October 2026, the catalog described them like this:

LevelCatalog description
lowFast responses with lighter reasoning
mediumBalances speed and reasoning depth for everyday tasks
highGreater reasoning depth for complex problems
xhighExtra high reasoning depth for complex problems
maxMaximum reasoning depth for the hardest problems
ultraMaximum reasoning with automatic task delegation

Not every model offered every level: some stopped at max. Older guides mention minimal, which none of those models listed. Run the catalog command above to see the levels for your models today.

The default is per model

If you never set model_reasoning_effort, Codex uses the model's own default_reasoning_level, and that is not the same everywhere. In the same catalog some models defaulted to low and others to medium. So switching models without setting effort can quietly change how hard Codex thinks. Set the key explicitly if you compare models or care about cost.

Plan mode has its own setting

plan_mode_reasoning_effort sets the level used while Codex is in plan mode (/plan). When it is unset, plan mode uses its built-in preset default rather than following your normal setting.

Which level to use

  • Low or medium for edits you could describe in a sentence, renames, test scaffolding and questions about the code.
  • High for debugging, refactors across several files and anything where a wrong first guess is expensive.
  • The top levels for a stuck problem, not as a default. They spend your usage limit fastest, and on a ChatGPT plan that is the budget that runs out. See Codex usage limit reached.

Output

Reasoning summaries and verbosity

Two more keys shape what you see rather than how hard the model thinks:

toml
model_reasoning_summary = "concise"  # auto, concise, detailed, none
model_verbosity         = "low"      # low, medium, high
  • model_reasoning_summary controls the short summaries of the model's reasoning that Codex shows while it works. none turns them off. A related boolean, model_supports_reasoning_summaries, forces Codex to send or not send reasoning metadata, which matters for a model or provider Codex does not describe correctly.
  • model_verbosity controls how long the model's written answers are. When unset, the model's default applies. The catalog says per model whether it supports verbosity at all.

For speed, service_tier = "fast" (or /fast in the TUI) selects a faster tier when the model offers one. The catalog we checked described it as 2x speed with increased usage.

Profiles

Profiles: switch model and effort in one flag

If you move between a cheap everyday setup and a deep one, put each in a profile. In the current CLI a profile is a file next to config.toml named <name>.config.toml, layered on top of your base config with -p:

bash
# ~/.codex/deep.config.toml
model_reasoning_effort  = "xhigh"
model_reasoning_summary = "detailed"

codex -p deep
codex exec -p deep "find the race in the job queue"

Codex ignores profiles set in a project-local .codex/config.toml, so keep them in your user config. Profiles can carry sandbox and approval settings too, covered in Codex sandbox and approval modes.

Context

Context window and compaction

Each catalog entry has a context_window and an effective_context_window_percent. On the models we checked that percent was 95, which is where the usable figures in the cards above come from: 95 percent of 272,000 is 258,400. Codex keeps the rest for its own harness.

Two keys override this when you run a model the catalog does not describe well, such as one from a custom provider: model_context_window sets the window, and model_auto_compact_token_limit sets the token count at which Codex compacts the history on its own. /compact compacts on demand.

Termdeck

Picking the Codex model and effort per chat in Termdeck

Termdeck's model picker reads the Codex catalog on the machine rather than a list it ships, so a new model or a new effort level shows up with whatever levels it comes with. A chat left on the default runs at the model_reasoning_effort from that machine's ~/.codex/config.toml, and the picker names it. Picking a level pins it for that chat, even if your config changes later. A change of effort applies from the next turn, not to a turn already running.

Because the setting is per chat, you can keep a high effort chat on a hard bug and a low effort chat on chores side by side, on one machine or several. See Engines for the per engine differences, and Claude Code models and effort for how the same dial works there.

Compare

Model and reasoning controls by engine

FeatureClaude CodeCodex CLIGrok CLI
Pick a modelYesYesYes
Reasoning effortYesYes, per modelYes, per model
Separate thinking budgetYesNoNo
Where the level list comes fromThe engineThe model catalogThe initialize handshake
Reports its context windowYesYes, larger than usableYes, and it is accurate
Auto compactionYesYesAt 85 percent of the window

Termdeck drives all three from one console, so the differences above stop being three separate habits to remember.

FAQ

Codex CLI models and effort, answered

How do I set reasoning effort in Codex CLI?

Add model_reasoning_effort = "high" (or another level) to ~/.codex/config.toml, pass -c model_reasoning_effort=high for one run, or use /model inside a session and pick the level there.

What reasoning effort levels does Codex support?

Whichever ones the model advertises. OpenAI lists low, medium, high, xhigh, max and ultra as examples, and some models stop below ultra. Run codex debug models to see the levels for each model your login can use.

What is the default reasoning effort in Codex?

Each model has its own default_reasoning_level in the catalog, and they differ: some models default to low, others to medium. Set model_reasoning_effort explicitly if you want the same level across models.

How do I change the model in Codex CLI?

Pass -m with a model id for one run, type /model inside a running session, or set model in ~/.codex/config.toml as your default. /status shows which model the session is using.

How do I list the models available in Codex?

Run codex debug models. It prints the catalog for your current login as JSON, with each model slug, its context window and its reasoning levels, without calling a model. The /model picker shows the same list inside the TUI.

Can a ChatGPT login use the same models as an API key?

Not always. Model availability depends on how you signed in and on your plan. codex login status shows the auth mode, and a model your login does not cover is refused with a not supported error.

What does model_reasoning_summary do?

It controls the reasoning summaries Codex shows while the model works: auto, concise, detailed or none. It changes what you see, not how hard the model thinks. Effort is set separately with model_reasoning_effort.