codex exec
A non-interactive execution mode of Codex suited to scripting and CI scenarios; it runs in a read-only sandbox by default, and --sandbox workspace-write must be passed explicitly to allow code modification.
Timeline (last 90 days)
Codex's `codex exec` is a non-interactive run mode; unlike the interactive TUI, it runs in a read-only sandbox by default and the agent cannot write files; to let it modify code and trigger tests, you must explicitly pass `--sandbox workspace-write`.
`codex exec`'s `-c key=value` can override any configuration key, and a value that is not valid TOML is treated as a string, so `-c model_reasoning_effort=medium` is a valid form.
All Facts (2)
Codex's `codex exec` is a non-interactive run mode; unlike the interactive TUI, it runs in a read-only sandbox by default and the agent cannot write files; to let it modify code and trigger tests, you must explicitly pass `--sandbox workspace-write`.
50%Unverified`codex exec`'s `-c key=value` can override any configuration key, and a value that is not valid TOML is treated as a string, so `-c model_reasoning_effort=medium` is a valid form.
50%