mirror of
https://github.com/openai/codex.git
synced 2026-11-23 23:10:47 +00:00
1.0 KiB
1.0 KiB
Task 02: Granular Auto-Approval Predicates
Goal
Let users configure one or more scripts in config.toml that examine each proposed shell command and output exactly one of:
continue=> auto-approve and proceed under the sandboxdeny=> auto-reject (skip sandbox and do not run the command)user-confirm=> pause execution and open the interactive approval dialog for manual decision
If the script exits non-zero or prints anything else, default to user-confirm.
Acceptance Criteria
- New
[[auto_allow]]table inconfig.tomlsupporting one or morescript = "..."entries. - Before running any shell/subprocess, Codex invokes each configured script in order, passing the candidate command as an argument.
- If a script prints
continue/deny/user-confirm, take that action and skip remaining scripts. - If all scripts return non-zero or invalid output, pause for manual approval (existing logic).
Notes
- This pairs with the existing
approval_policy = "unless-allow-listed"but adds custom logic before prompting.