A one-run configuration override changes how Codex behaves for the current command without rewriting /~/.codex/config.toml or any project config file. This is useful for testing a feature toggle, forcing a specific model, or adjusting an advanced setting before deciding whether it belongs in a saved profile.
The codex CLI applies CLI flags and --config overrides before profiles, project config, user config, and system config. Override keys can use dotted paths such as features.undo for nested values, and the value portion is parsed as TOML rather than JSON.
Dedicated flags such as --model, --sandbox, and --ask-for-approval are shorter when they exist, but --config covers keys that have no dedicated flag. Quote strings and arrays as TOML so the shell does not split them or change their type unexpectedly.
Related: How to list Codex feature flags
Related: How to set the default model in Codex
$ codex features list ##### snipped ##### tool_suggest stable true tui_app_server removed true undo stable false unified_exec stable true use_agent_identity under development false ##### snipped #####
The third column is the effective boolean state for the current run.
$ codex -c features.undo=true features list ##### snipped ##### tool_suggest stable true tui_app_server removed true undo stable true unified_exec stable true use_agent_identity under development false ##### snipped #####
-c is shorthand for --config.
$ codex --config model='"gpt-5.4"' exec --skip-git-repo-check "Return OK." OK
Prefer --model gpt-5.4 when setting only the model, but --config is useful when the same command also needs other override keys.
$ codex --config 'shell_environment_policy.include_only=["PATH","HOME"]' --help Codex CLI If no subcommand is specified, options will be forwarded to the interactive CLI. ##### snipped #####
--config values are parsed as TOML, so strings need quotes inside the value and arrays use square brackets with comma-separated entries.
$ codex features list ##### snipped ##### tool_suggest stable true tui_app_server removed true undo stable false unified_exec stable true use_agent_identity under development false ##### snipped #####
One-run overrides disappear as soon as the command exits.