Resume sessions with their previously used model and reasoning effort

Open 💬 1 comment Opened Jul 10, 2026 by staskorz

What variant of Codex are you using?

Codex CLI / TUI

What feature would you like to see?

When resuming a session without explicit model overrides:

codex resume aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa

Codex should restore the latest model and reasoning effort recorded for that session.

Currently, the resumed session uses the model and reasoning effort from config.toml. Codex may warn that the session was recorded with another model, but requires the user to restore both settings manually.

Desired precedence:

  1. Explicit resume arguments such as --model or

-c model_reasoning_effort=...

  1. Model and reasoning effort persisted with the resumed session
  2. config.toml defaults, for new sessions or sessions lacking persisted values

config.toml should remain the default for new sessions. It should not silently replace the settings of an existing session.

Additional information

Codex already records model and reasoning effort in session metadata and can detect a model mismatch during resume.

Reproduction:

  1. Configure model A and reasoning effort high.
  2. Start a session.
  3. Change that session to model B and reasoning effort medium.
  4. Exit the session.
  5. Restore config.toml to model A and high.
  6. Run codex resume <SESSION_ID>.

Actual: the session resumes with model A and high.

Expected: it resumes with model B and medium.

Explicit command-line overrides should continue to win.

This matters because changing models during a long-running session can affect prompt-cache reuse, latency, cost, context handling, and behavioral continuity.

Related issue documenting the existing resume mismatch warning:
https://github.com/openai/codex/issues/19877

Observed with Codex CLI 0.144.1 on Linux.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗