Unify approval and sandbox policy decisions to reduce security drift
What variant of Codex are you using?
CLI / core
What feature would you like to see?
Codex should have a more explicit, unified policy path for approval and sandbox decisions.
Today, related decisions appear to be handled across several areas: exec policy, sandbox selection, approval mode, hooks, guardian/user review, network approval, and retry escalation. These paths all deal with similar questions: allow, deny, ask, amend policy, sandbox, or escalate.
Because this path is security-sensitive, small differences between these decision points can be hard to reason about and may cause behavior drift across shell, patch, network, or elevated execution flows.
A useful direction might be an ordered policy pipeline where each stage returns a shared decision shape, and tool runtimes provide request facts rather than re-encoding policy logic.
This resembles a Policy / Chain of Responsibility shape, but the main goal is consistency and auditability rather than applying a pattern for its own sake.
Additional information
Non-goals:
- No broad rewrite.
- No new dependency.
- No behavior change.
- No change to user-facing approval semantics.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗