Codex CLI model switching, from /model to config.toml
Codex has the same model-juggling story as Claude Code: an in-session switch, a launch flag, a persistent config, and a layer of workflow presets on top. The pieces are just named differently, and one of them changed behavior recently. Here's the current map, plus how Codex fits into a multi-agent terminal alongside Claude Code.
The four levels
1. /model (inside a session)
Same idea as Claude Code: /model opens a picker mid-session and switches the model
for the current conversation. Useful when a task turns out harder than expected; scoped to the
session, not persisted.
2. -m / --model (at launch)
codex -m gpt-5.2-codex
codex --model gpt-5.1-codex-max "refactor the auth module"
Per-invocation. Like Claude Code's --model, this is the right lever for dedicated
per-model sessions and scripted runs.
3. ~/.codex/config.toml (the default)
# ~/.codex/config.toml
model = "gpt-5.2-codex"
model_reasoning_effort = "high" The persistent default for every session, documented in the official Codex configuration reference. This file is also where multi-provider setups live if you point Codex at other backends.
4. Profiles (per-workflow presets)
Profiles bundle a model plus settings for a workflow: a low-effort quick profile, a high-effort
deep-work profile. Heads up on the recent change: in Codex 0.134.0 and later,
--profile no longer reads [profiles.name] tables from
config.toml. Each profile now lives in its own file:
# ~/.codex/deep.config.toml
model = "gpt-5.1-codex-max"
model_reasoning_effort = "xhigh"
# launch it
codex --profile deep
If your old inline profile tables stopped working after an update, that migration is why. Move
each [profiles.name] table into ~/.codex/name.config.toml and delete
the inline table.
Reasoning effort: the second model axis
Codex models expose model_reasoning_effort from minimal up to
xhigh, and effort changes character as much as model choice does: minimal is
near-instant autocomplete energy, xhigh will sit and think. Two practical notes:
xhighis only available on the top coding models (the codex-max tier), so an effort setting can silently constrain which models make sense for a profile.- Model plus effort is really one combined dial. "gpt-5.2-codex at medium" and "gpt-5.1-codex-max at xhigh" are different tools for different jobs, the same way Haiku, Sonnet and Opus are on the Claude side.
The multi-agent angle: Codex as a gear
The reason to master this at all: a GPT-family agent sitting next to your Claude agents is the cheapest independent second opinion in the business, with failure modes uncorrelated to Claude's. The clean setup mirrors the Claude Code tmux pattern: pin each Codex configuration at launch (flag or profile file), one persistent window per agent, and never switch mid-session, so each agent keeps its context and its provider-side cache.
tmux new-window -t garage -n codex-deep
tmux send-keys -t garage:codex-deep 'codex --profile deep' C-m Model Shift treats Codex models as first-class gears: map
codex -m gpt-5.2 to 5th gear next to Haiku in 1st and Opus in 4th, and the same
lever moves you across both model families, each in its own persistent, cache-safe tab.
Cross-family code review becomes: shift to 5th, paste the diff, shift back.
Claude and Codex on one lever
Both agent families, one gearbox. Every gear a pinned, persistent session.
Get Model Shift for Mac ⇣Want GPT models without leaving Claude Code? That is claudex: a local proxy puts GPT-5.6 Sol, Terra and Luna behind Claude Code's own harness. Full setup and the gotchas we measured.
Further reading: Claude Code vs Codex: why the answer is both · Claude Code's /model command, completely explained