By Tomás Herrera, NBT
If you use both Codex and Claude Code, you've probably noticed that the same task can feel fast and sharp in one session and slow and over-thought in the next. Often the cause isn't the tool at all. It's which model and which reasoning effort the session started with, and where that setting came from.
Both tools let you choose a model and how hard it thinks, and both let you set that globally, per project and per session. The names and files are different, though, and a couple of the defaults surprise people. This piece puts them side by side. Facts come from the Claude Code model configuration page and the Codex config reference, both read on 6 December 2026.
For the broader comparison of the two agents, see our Claude Code vs Codex vs Copilot CLI piece.
The quick map
| What | Claude Code | Codex |
|---|---|---|
| User config | ~/.claude/settings.json | ~/.codex/config.toml |
| Project config | .claude/settings.json | .codex/config.toml (loaded only for trusted projects) |
| Model key | "model" | model |
| Effort key | effortLevel, or per model in modelSettings | model_reasoning_effort |
| Change for one session | --model, --effort, --settings | --profile <name> with a profile file |
| Change mid-session | /model, /effort | (see your client) |
| Planning gets its own setting | opusplan alias (different model for planning) | plan_mode_reasoning_effort (different effort for planning) |
Claude Code: choosing the model
Claude Code accepts aliases as well as full model names. The ones you'll use most:
-
sonnet: the latest Sonnet, for daily coding. -
opus: the latest Opus, for harder reasoning.bestmeans the same. -
haiku: fast, for simple tasks. -
sonnet[1m]andopus[1m]: the same models with a 1 million token context window. -
opusplan: uses Opus in plan mode, then switches to Sonnet to carry out the plan. -
default: goes back to your account's runtime default.
Where the setting comes from, in priority order:
-
/model <alias>during a session (or/modelalone for a picker). -
claude --model <alias>at startup. - The
ANTHROPIC_MODELenvironment variable. - The
modelkey in a settings file. -
ANTHROPIC_DEFAULT_MODEL, a default for new sessions.
The trap here: an exported ANTHROPIC_MODEL in your shell profile beats the model key in every settings file. If a project's settings say opus and you keep getting Sonnet, check your environment first.
Claude Code: choosing effort
The current models (the 5.5 family, Opus 5, Sonnet 5, Opus 4.8 and 4.7, and Fable models) support five levels: low, medium, high, xhigh, max. Opus 4.6 and Sonnet 4.6 skip xhigh. If you pick a level the model doesn't support, Claude Code falls back to the highest supported level below it.
Two defaults are worth knowing. Opus 5.5, Sonnet 5.5, Haiku 5.5 and Fable 5.2 default to medium. Opus 4.7 defaults to xhigh. So moving from an older model to a newer one can make sessions feel quicker and less thorough, with no setting changed.
Resolution order, highest first:
- The
CLAUDE_CODE_EFFORT_LEVELenvironment variable. - A level you pick in the session:
/effort high, the slider from/effort, or the/modelpicker. -
--effortat launch. - Your settings: a saved level for that model, or the
effortLevelkey. - The model's own default.
Some details that trip people up:
-
effortLevelacceptslow,medium,highorxhigh, but notmax. - In your user settings file, a top-level
effortLevelis ignored for Opus 5.5, Sonnet 5.5, Haiku 5.5, Fable 5.2 and newer models. Set a per-model level inmodelSettingsinstead, or puteffortLevelin project, local or managed settings. -
/effort autoclears your saved level for the current model. - For one hard question without changing the session, put the word
ultrathinkin your prompt. It asks for deeper reasoning on that turn only.
A project file that pins both:
{ "model": "opus", "effortLevel": "high" } Codex: choosing the model and effort
Codex keeps everything in TOML. In ~/.codex/config.toml:
model = "your-model-name" model_reasoning_effort = "high" model_reasoning_summary = "concise" plan_mode_reasoning_effort = "xhigh" What each key does, per the reference:
-
model: the model to use. Set it to one your signed-in account or workspace has. -
model_reasoning_effort: a level the selected model advertises, such aslow,medium,high,xhigh,maxorultra. The docs are explicit that the available levels depend on the model and client, so check what your model offers before copying someone else's file. -
model_reasoning_summary:auto,concise,detailedornone. It controls how much of the reasoning summary you see, not how much reasoning happens. -
model_verbosity:low,mediumorhigh, an optional override for how long answers are. -
plan_mode_reasoning_effort: a separate effort level used in plan mode.
For per-project settings, put a .codex/config.toml in the repository. Codex loads it only after you trust the project, and project files can't set some keys, including profile.
For one-off setups, Codex uses profile files next to your config: $CODEX_HOME/<name>.config.toml, selected with --profile <name>. A deep.config.toml with a higher effort and a quick.config.toml with a lower one gives you two modes you can pick at launch.
The planning difference
This is the most interesting design difference. Claude Code's opusplan changes the model between planning and doing: Opus thinks, Sonnet types. Codex's plan_mode_reasoning_effort keeps the model and changes the effort. Both aim at the same thing, spending more on the plan than on the mechanical edits, by different routes.
In practice:
- Claude Code:
/model opusplan, then press Shift+Tab to enter plan mode for the planning part. - Codex: set
plan_mode_reasoning_effortone or two steps abovemodel_reasoning_effort.
A setup that works for both
- Global default at medium or high. It's the right level for most edits in either tool.
- Project override only when the project needs it. A gnarly legacy codebase can justify
highorxhighin its project config. Commit that file so teammates get the same behaviour. - Spend extra on planning, not typing.
opusplanin Claude Code,plan_mode_reasoning_effortin Codex. - Escalate per question, not per session.
ultrathinkin Claude Code, or a deeper profile in Codex for the one hard bug. - Check the environment when results feel off.
ANTHROPIC_MODELandCLAUDE_CODE_EFFORT_LEVELbeat Claude Code's settings files. In Codex, check which profile you launched with.
Checking what you actually got
In Claude Code, /model shows the current model and /status shows which settings files loaded. In Codex, look at your launch command and active profile. When a session feels wrong, check these before rewriting your prompt. Very often the prompt was fine and the session was on a smaller model, or at a lower effort, than you thought.
