codex will silently ignore malformed config.json instead of alerting that its malformed

Resolved 💬 2 comments Opened Jun 27, 2025 by geremyCohen Closed Aug 7, 2025

What version of Codex is running?

0.1.2505172129

Which model were you using?

o4-mini

What platform is your computer?

Darwin 24.5.0 arm64 arm

What steps can reproduce the bug?

  1. Run codex with a working ~/.codex/config.json file
  2. Remove the opening curly brace of the config.json file, making it now invalid json
  3. Run codex.

What is the expected behavior?

If there is a file and it can't load it, it should throw [fatally] on startup stating the configuration could not be read.

What do you see instead?

Silent failure of loading the config.json. There is no error given that the json file was not parsed and read. Just keeps running with defaults, but user is not aware the existing config.json wasn't parsed and loaded as expected.

Additional information

_No response_

View original on GitHub ↗

2 Comments

Icelain · 1 year ago

Wrote a small fix for this. To note: codex-rs uses config.toml instead on config.json, therefore, no change there.

#1432

codex-maintainers · 1 year ago

Thank you for the feedback! Please try again on the latest version of Codex CLI. If the issue persists, we'd be happy to take a look at a PR to the codex-rs/ implementation. For more information on the project update, please see this discussion.