codex /model slash command mutates config.toml

Resolved 💬 2 comments Opened Mar 17, 2026 by ljnelson Closed Mar 17, 2026

What version of Codex CLI is running?

codex-cli 0.115.0-alpha.27

What subscription do you have?

Employer-provided

Which model were you using?

Various

What platform is your computer?

Darwin 24.6.0 arm64 arm

What terminal emulator and version are you using (if applicable)?

Terminal.app

What issue are you seeing?

(Codex instructed me to file this report.)

When you change models in the TUI via the /model command, the resulting selection is written to your config.toml. I had assumed (and Codex's documentation has led me to believe) that config.toml is a read-only file.

Codex's output/instructions: "The official Codex docs describe ~/.codex/config.toml as the place for user-level defaults, and they describe /model as a slash command to choose the active model for an interactive session. In the same slash-command doc, /experimental is explicitly documented as saving feature choices to config, and /statusline is explicitly documented as persisting to config.toml, but /model is not described that way. That makes /model read more like a session control than a persistent settings editor. (developers.openai.com (https://developers.openai.com/codex/config-basic))"

"So my read is: current Codex behavior appears to persist /model selections to config.toml, but the docs do not clearly say that, and the docs’ wording arguably suggests the opposite. I would treat this as an undocumented behavior or a docs/product mismatch, not as you misreading the feature."

What steps can reproduce the bug?

  • launch codex
  • type "/model" and make a new selection
  • observe that config.toml has changed

What is the expected behavior?

Configuration files in most programs are read-only. This one seems to be a strange, surprising hybrid of initial settings and session state.

Additional information

_No response_

View original on GitHub ↗

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