Support PermissionRequest updatedInput rewrites#21433
Draft
abhinav-oai wants to merge 1 commit intoabhinav/hooks-updated-inputfrom
Draft
Support PermissionRequest updatedInput rewrites#21433abhinav-oai wants to merge 1 commit intoabhinav/hooks-updated-inputfrom
abhinav-oai wants to merge 1 commit intoabhinav/hooks-updated-inputfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
PermissionRequestcan already make an approval decision, but it cannot yet rewrite the pending tool input before Codex continues through the ordinary approval path. That leaves hook authors unable to sanitize a request at the approval boundary while still having the rewritten payload checked by the normal deny / ask machinery.What
updatedInputfromPermissionRequesthooks when paired withbehavior: "allow"; continue to reject it for deny decisions.updatedInputas a full replacement for the hook-facing input object rather than merging it into the original payload.PermissionRequestruns once.PermissionRequesta second time.PermissionRequestpass.Verification
permission_request_accepts_updated_input_for_allowupdatedInputforbehavior: "allow".permission_request_rejects_updated_input_for_denyupdatedInputis paired withbehavior: "deny".permission_request_hook_rewrites_shell_command_before_normal_approvalPermissionRequestonly saw the original input once.