mirror of
https://github.com/openai/codex.git
synced 2026-05-05 05:42:33 +03:00
1.3 KiB
1.3 KiB
Task 02: Granular Auto-Approval Predicates
This task is specific to codex-rs.
Status
General Status: Not started
Summary: Not started; missing Implementation details (How it was implemented and How it works).
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).
Implementation
How it was implemented
(Not implemented yet)
How it works
(Not implemented yet)
Notes
- This pairs with the existing
approval_policy = "unless-allow-listed"but adds custom logic before prompting.