{"slug": "how-to-change-reasoning-effort-in-codex-cli-model-reasoning-effort-values-and", "title": "How to change reasoning effort in Codex CLI: model_reasoning_effort values and one-off overrides", "summary": "A developer has documented how to control reasoning effort in OpenAI's Codex CLI through the model_reasoning_effort configuration key, which accepts five levels: minimal, low, medium, high, and xhigh. The guide covers setting the value permanently in ~/.codex/config.toml, overriding it for a single run with the -c flag, switching mid-session via the /model command, and bundling settings into reusable profiles. It also notes that plan_mode_reasoning_effort and agents.default_subagent_reasoning_effort apply effort settings only to plan mode or spawned subagents, and warns that values unsupported by the active model may not take effect.", "body_md": "*Originally published at [https://aicoding-guide.com](https://aicoding-guide.com/en/posts/codex-reasoning-effort/).*\n\nCodex feels slow, or it overthinks a trivial fix. The knob for that is **reasoning effort**, the Codex counterpart of extended thinking in Claude Code, controlled by the `model_reasoning_effort` key.\n\nIn short: set `model_reasoning_effort = \"high\"` (or another value) in `~/.codex/config.toml` to change it permanently, use the `-c` flag for a single run, or `/model` during a session. The five levels are `minimal`, `low`, `medium`, `high`, and `xhigh`.\n\n**Key point**\n\nWhat you will learn\n\n- The five values and when each fits\n- Four ways to change effort: permanently, for one run, mid-session, and per profile\n- The keys that change effort only for plan mode or subagents\n\nThe configuration reference defines `model_reasoning_effort` as a string with the values `minimal | low | medium | high | xhigh`. The reference does not state a default, and it may depend on the model, so none is given here.\n\n| Value | Suited to | \n|---|---|\n| `minimal` | one-line questions, formatting fixes, anything with little to reason about | \n| `low` | small bug fixes, simple refactors | \n| `medium` | everyday feature work and investigation | \n| `high` | multi-file design changes, bugs with no obvious cause | \n| `xhigh` | hard algorithms, reviews of large changes where mistakes are costly | \n\nHigher effort means slower responses and more tokens. Keeping everyday work around `medium` and raising it only for hard tasks is the easiest routine.\n\n**Glossary**\n\n**Reasoning effort**: how much the model reasons internally before answering. It is separate from how much of the reasoning summary is displayed; hiding the display is covered in [Hiding reasoning in Codex output](https://aicoding-guide.com/en/posts/codex-hide-agent-reasoning/).\n\nOne line in `~/.codex/config.toml`:\n\n```\nmodel = \"gpt-5.5\"\nmodel_reasoning_effort = \"high\"\n```\n\nIn a trusted project you can put it in the repository's `.codex/config.toml` to affect only that project; project settings outrank user settings.\n\nTo change effort for a single invocation without touching the file, use `-c` (`--config`). Values are **parsed as TOML**, so wrap the string in double quotes and wrap the whole thing in single quotes to keep the shell from eating them.\n\n```\ncodex -c model_reasoning_effort='\"high\"' \"Find out why this test fails and fix it\"\n```\n\nThe same form works with `codex exec` from scripts. According to the docs, a value that cannot be parsed as TOML is treated as a string, so a missing pair of quotes often still works, but quoting makes the intent explicit.\n\nRun `/model` in a session to switch. The official command list describes it as choosing the active model \"and reasoning effort, when available\". Raise it before a hard investigation and drop it afterwards.\n\nRather than typing the override every time you review code, bundle the settings in a profile. Profiles live in `$CODEX_HOME` (default `~/.codex`) as `<name>.config.toml` and are selected with `--profile <name>`.\n\n```\n# ~/.codex/deep-review.config.toml\nmodel_reasoning_effort = \"xhigh\"\napproval_policy = \"on-request\"\ncodex --profile deep-review\n```\n\nKeep only the differences in the profile and shared settings in the base `config.toml`. Profiles as a whole are covered in the hub article [Configuring Codex with config.toml](https://aicoding-guide.com/en/posts/codex-config-toml/).\n\nThe configuration reference also lists keys that apply only in specific situations.\n\n| Key | Applies to | \n|---|---|\n| `plan_mode_reasoning_effort` | overrides effort in plan mode only | \n| `agents.default_subagent_reasoning_effort` | default effort for spawned subagents | \n\nIf you want deep planning but ordinary implementation, add `plan_mode_reasoning_effort = \"high\"` and leave `model_reasoning_effort` alone.\n\n**If nothing changes, check the model**\n\nA value outside what the model supports may not take effect. If `/model` shows no reasoning effort choices for the current model, that model does not expose effort. When speed and quality do not change after editing the setting, confirm the model first.\n\n`model_reasoning_effort`, with values `minimal`, `low`, `medium`, `high`, `xhigh`\n`~/.codex/config.toml`; one run: `-c model_reasoning_effort='\"high\"'`; mid-session: `/model`\n`<name>.config.toml` profile and select it with `--profile`\n`plan_mode_reasoning_effort`; subagents have `agents.default_subagent_reasoning_effort`", "url": "https://wpnews.pro/news/how-to-change-reasoning-effort-in-codex-cli-model-reasoning-effort-values-and", "canonical_source": "https://dev.to/aicoding-guide/how-to-change-reasoning-effort-in-codex-cli-modelreasoningeffort-values-and-one-off-overrides-2bf4", "published_at": "2026-09-13 15:25:00+00:00", "updated_at": "2026-09-13 15:44:17.384509+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "ai-agents", "large-language-models"], "entities": ["Codex CLI", "OpenAI", "model_reasoning_effort", "plan_mode_reasoning_effort", "agents.default_subagent_reasoning_effort"], "alternates": {"html": "https://wpnews.pro/news/how-to-change-reasoning-effort-in-codex-cli-model-reasoning-effort-values-and", "markdown": "https://wpnews.pro/news/how-to-change-reasoning-effort-in-codex-cli-model-reasoning-effort-values-and.md", "text": "https://wpnews.pro/news/how-to-change-reasoning-effort-in-codex-cli-model-reasoning-effort-values-and.txt", "jsonld": "https://wpnews.pro/news/how-to-change-reasoning-effort-in-codex-cli-model-reasoning-effort-values-and.jsonld"}}