Skip to content

[codex] Add guardian context to PermissionRequest hooks#17564

Closed
abhinav-oai wants to merge 1 commit intocodex/permission-request-hooks-basefrom
codex/permission-request-hooks-guardian
Closed

[codex] Add guardian context to PermissionRequest hooks#17564
abhinav-oai wants to merge 1 commit intocodex/permission-request-hooks-basefrom
codex/permission-request-hooks-guardian

Conversation

@abhinav-oai
Copy link
Copy Markdown
Collaborator

Summary

Stacks on #17563 and adds the guardian-specific PermissionRequest behavior.

When an approval would route through guardian, Codex now runs guardian first, passes the resulting review into the PermissionRequest hook input as advisory context, and reuses that guardian decision if matching hooks stay quiet. Hooks can still explicitly allow or deny the approval prompt.

Validation

  • just write-hooks-schema
  • just fmt
  • cargo test -p codex-hooks
  • cargo test -p codex-core permission_request_hook
  • just fix -p codex-core
  • just fix -p codex-hooks

Run guardian before Bash PermissionRequest hooks when approvals are already routed to guardian, pass the review into the hook input as advisory context, and reuse the guardian decision when hooks stay quiet.

Co-authored-by: Codex <noreply@openai.com>
@abhinav-oai abhinav-oai deleted the codex/permission-request-hooks-guardian branch April 13, 2026 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant