model_reasoning_effort from config.toml seems overridden by last-used reasoning on fresh CLI launch
Resolved 💬 3 comments Opened Apr 11, 2026 by Michaelihc Closed Apr 11, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of Codex CLI is running?
0.120.0
What subscription do you have?
ChatGPT Pro 20x
Which model were you using?
gpt-5.4
What platform is your computer?
Microsoft Windows NT 10.0.26220.0 x64
What terminal emulator and version are you using (if applicable)?
PowerShell
What issue are you seeing?
A fresh codex session can start with the previously used reasoning effort instead of the value in ~/.codex/config.toml.
My config:
model = "gpt-5.4"
model_reasoning_effort = "high"
But after using xhigh in a prior session, a brand-new codex launch started with xhigh.
What steps can reproduce the bug?
- Set in ~/.codex/config.toml:
model = "gpt-5.4"
model_reasoning_effort = "high"
- Start codex
- Change reasoning effort to xhigh
- Exit
- Start a fresh new codex session
What is the expected behavior?
A fresh CLI launch should respect model_reasoning_effort from ~/.codex/config.toml, or the docs should explicitly state that persisted last-used state overrides config on startup.
Additional information
This may be related to the CLI 0.116.0 changelog entry saying model and reasoning effort are persisted in sqlite.
3 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
In your repro steps, step 3 says "Change the reasoning effort to xhigh". I presume you're doing this with the
/modelslash command in the TUI? This command allows you to select the model and reasoning effort, and then it writes the selection back to your global (user-level) config file. When you restart the CLI the next time — or create a new thread using/newor/clear, this will be the new default model and reasoning effort.It sounds like this is working as intended, so I'm going to close the bug report. Let me know if I misunderstood anything or you have any follow-up questions.
@etraut-openai
This is confusing behavior and is not what I would expect. In fact we have run into this confusion with several developers in my org. Writing a new value for those fields in the user level config.toml on model/reasoning change in a client is behavior that is listed anywhere in the docs, in fact the docs explicitly call it temporary.
https://developers.openai.com/codex/models#choosing-a-different-local-model-temporarily
The docs state
Choose the model Codex uses by default in the CLI and IDE.and is under the headerDefault Model.https://developers.openai.com/codex/config-basic#default-model
To me that sounds like I should be able to set a model via config.toml that is always used for new sessions, and does not get updated just because I needed to use a different model or reasoning level for something as a one off.
It seems that
managed_config.tomldoes behave the way I would expect in that you can set a default model(samedefaultterminology as the basic config file, but different behavior) and it will be used as the starting model for all new sessions.https://developers.openai.com/codex/enterprise/managed-configuration#managed-defaults-managed_configtoml