Resume sessions with their previously used model and reasoning effort
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:
- Explicit resume arguments such as
--modelor
-c model_reasoning_effort=...
- Model and reasoning effort persisted with the resumed session
config.tomldefaults, 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:
- Configure model A and reasoning effort
high. - Start a session.
- Change that session to model B and reasoning effort
medium. - Exit the session.
- Restore
config.tomlto model A andhigh. - 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.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗