codex - 💡(How to fix) Fix Feature request: add `plan_mode_model` config override for Plan mode [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#19343Fetched 2026-04-25 06:11:13
View on GitHub
Comments
1
Participants
2
Timeline
8
Reactions
0
Author
Timeline (top)
labeled ×5unlabeled ×2commented ×1

Error Message

It also makes the Plan-mode workflow less error-prone:

Root Cause

This makes Plan mode configurable in the same spirit as other mode/phase-specific settings.

It also makes the Plan-mode workflow less error-prone:

  • users no longer need to manually switch models before entering Plan mode;
  • the execution model can remain stable while Plan mode uses a different default;
  • profile-specific defaults make it possible to have different Plan-mode model choices per team, project, or workflow;
  • clearing the override cleanly returns Plan mode to the built-in preset behavior.

Code Example

model = "gpt-execute"
  plan_mode_model = "gpt-plan"

---

plan_mode_model = "gpt-top-plan"
  profile = "dev"

  [profiles.dev]
  plan_mode_model = "gpt-profile-plan"

---

model = "gpt-5.4"

plan_mode_model = "gpt-5.2"
plan_mode_reasoning_effort = "high"
RAW_BUFFERClick to expand / collapse

What variant of Codex are you using?

CLI / TUI Plan mode

What feature would you like to see?

Add a first-class plan_mode_model configuration option that lets users choose the default model used by Plan mode independently from the global model.

Today, Plan mode follows the built-in Plan preset model, which currently inherits the global model. That means users who want one model for planning and another model for normal execution need to manually switch models before/after using Plan mode, or keep separate profiles/sessions.

Requested behavior:

  • Support a top-level config value:

    model = "gpt-execute"
    plan_mode_model = "gpt-plan"
  • Support profile-level overrides:

    plan_mode_model = "gpt-top-plan"
    profile = "dev"
    
    [profiles.dev]
    plan_mode_model = "gpt-profile-plan"

    When profile dev is active, Plan mode should use gpt-profile-plan.

  • If plan_mode_model is unset, preserve the existing behavior: Plan mode uses the built-in Plan preset model, which currently follows the global model.

  • When switching into Plan mode, the TUI should apply the configured Plan-mode model override.

  • When submitting a message with Plan mode active, the submitted collaboration mode should use the configured Plan-mode model.

  • When the model/reasoning selector is used while Plan mode is active, users should be able to choose whether the change applies only to the Plan-mode override or to both the global default and the Plan-mode override.

Why this matters

This makes Plan mode configurable in the same spirit as other mode/phase-specific settings.

It also makes the Plan-mode workflow less error-prone:

  • users no longer need to manually switch models before entering Plan mode;
  • the execution model can remain stable while Plan mode uses a different default;
  • profile-specific defaults make it possible to have different Plan-mode model choices per team, project, or workflow;
  • clearing the override cleanly returns Plan mode to the built-in preset behavior.

Example configuration

model = "gpt-5.4"

plan_mode_model = "gpt-5.2"
plan_mode_reasoning_effort = "high"

Resulting behavior:

  • normal execution uses gpt-5.4;
  • Plan mode uses gpt-5.2;
  • Plan mode uses the configured Plan-mode reasoning effort;
  • removing plan_mode_model restores the existing Plan preset/global-model behavior.

Acceptance criteria

  • plan_mode_model is accepted in config.toml.
  • plan_mode_model is accepted under [profiles.<name>].
  • Profile-level plan_mode_model overrides the top-level value.
  • The generated config schema includes plan_mode_model.
  • The TUI applies the Plan-mode model override when Plan mode is active.
  • The TUI persists Plan-mode-only model changes to the appropriate config path:
    • root path when no profile is active;
    • [profiles.<active_profile>] when a profile is active.
  • Clearing plan_mode_model resets Plan mode to the built-in Plan preset model.
  • Documentation explains the new config option and fallback behavior.

Non-goals

  • This does not change the global model behavior.
  • This does not introduce automatic model routing.
  • This does not change /review model behavior.
  • This does not require Plan mode to always use a different model; it only adds an optional override.

Additional information

Related requests:

  • #13206 asks for a dedicated model config for /plan.
  • #5558 asks for separate model selection for Plan vs Execute modes.
  • #18406 asks for better model switching inside the Plan-mode approval flow.

This request is narrower: add a persisted, profile-aware Plan-mode model default via plan_mode_model, while preserving the current fallback behavior when the setting is absent.

Example implementation

A prototype implementation is available in https://github.com/aaudin90/codex/pull/1.

https://github.com/user-attachments/assets/f76c7ebb-7437-4b52-ac40-614764403fba

extent analysis

TL;DR

To add a first-class plan_mode_model configuration option, update the configuration to include the plan_mode_model key and apply the necessary changes to the TUI and model selection logic.

Guidance

  • Add a plan_mode_model configuration option to the top-level config or profile-level overrides to choose the default model used by Plan mode independently from the global model.
  • Update the TUI to apply the configured Plan-mode model override when Plan mode is active and persist Plan-mode-only model changes to the appropriate config path.
  • Ensure the generated config schema includes plan_mode_model and documentation explains the new config option and fallback behavior.
  • Review the prototype implementation in https://github.com/aaudin90/codex/pull/1 for guidance on the necessary changes.

Example

model = "gpt-5.4"
plan_mode_model = "gpt-5.2"

This configuration sets the global model to gpt-5.4 and the Plan mode model to gpt-5.2.

Notes

The implementation should preserve the existing behavior when plan_mode_model is unset, and the TUI should allow users to choose whether model changes apply only to the Plan-mode override or to both the global default and the Plan-mode override.

Recommendation

Apply the workaround by adding the plan_mode_model configuration option and updating the TUI and model selection logic, as this will provide the desired functionality without introducing unnecessary changes to the global model behavior.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING