Codex crashes on startup for invalid enum values in config.toml
Resolved 💬 4 comments Opened Jan 12, 2026 by yash27-lab Closed Jan 13, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
codex-cli 0.42.0
What subscription do you have?
ChatGPT Plus
Which model were you using?
_No response_
What platform is your computer?
Macos
What issue are you seeing?
Codex CLI fails to start if config.toml contains an invalid enum value
(e.g. model_reasoning_effort = "xhigh").
This is a recoverable user input error and should not cause a hard startup failure.
Reproduction:
- Set model_reasoning_effort to an invalid value in ~/.codex/config.toml
- Run
codex - Codex exits with an error and does not start
Current behavior:
- Codex aborts startup with a config parsing error
Expected behavior:
- Print a clear error explaining the invalid value
- Show allowed values
- Suggest the closest valid option
- Fall back to a safe default or provide a guided fix
This would improve robustness and UX without changing defaults.
What steps can reproduce the bug?
- Edit ~/.codex/config.toml
- Set model_reasoning_effort to an invalid value (e.g. "xhigh")
- Run
codex - Codex exits with a config parsing error and does not start
What is the expected behavior?
Codex should not hard-fail on startup for an invalid enum value.
It should explain the invalid value, list allowed values, and either
fall back to a safe default or provide a guided fix.
Additional information
This failure is user-recoverable and similar errors have occurred when
config values changed between versions.
Improving error handling here would prevent startup lockouts.
4 Comments
There is no crash on startup in this case. The CLI is designed to report an error and quit if there is an invalid config key. Our philosophy is that it's better to report an error in this case rather than proceed with (potentially) incorrect configuration values.
Thanks for the clarification — that makes sense.
My intent was to improve DX by making the invalid-config failure more
actionable (e.g., clearly listing allowed enum values and a suggested fix),
not to proceed with potentially incorrect defaults.
On Tue, Jan 13, 2026 at 4:45 PM Eric Traut @.***> wrote:
When open my codex cli config with
model_reasoning_efforttoxhighit fails to start.According to Open AI docs the value
xhighis a valid config parameter.@dostiharise, this bug report is not related to the issue you're seeing. If you'd like to report a problem, please open a new issue and provide details and repro steps.