-a / --ask-for-approval
The flag configuring when the model requires human approval before executing a command — on-request / never.
Specs
Verified:
- Kind
- Launch flag
- Syntax
- -a <POLICY> / --ask-for-approval <POLICY>
- First seen
- —unverified
- Values (help-listed)
- on-request / never
Official help verbatim: "Configure when the model requires human approval before executing a command", with listed values `on-request` (the model decides when to ask) and `never` (never ask; execution failures return straight to the model). It is the approval knob orthogonal to the `-s/--sandbox` isolation knob. First-seen version is unverified.
Key features
- on-request: model picks when to ask
- never: no approval prompts at all
- Orthogonal to the sandbox tier
Use cases
Pair never with a suitable sandbox tier for automation; on-request for interactive work.
Install
`codex -a on-request` or `codex exec -a never -s workspace-write "..."`.
Caveats
never plus a weak sandbox means unguarded runs — keep an isolation tier even in automation.
Added
Updated
Verified