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

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:

  1. Set model_reasoning_effort to an invalid value in ~/.codex/config.toml
  2. Run codex
  3. 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?

  1. Edit ~/.codex/config.toml
  2. Set model_reasoning_effort to an invalid value (e.g. "xhigh")
  3. Run codex
  4. 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.

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗