Skip to content

feat(approvals) RejectConfig for request_permissions#14118

Merged
dylan-hurd-oai merged 1 commit intomainfrom
dh--request-permissions--approval-policy
Mar 10, 2026
Merged

feat(approvals) RejectConfig for request_permissions#14118
dylan-hurd-oai merged 1 commit intomainfrom
dh--request-permissions--approval-policy

Conversation

@dylan-hurd-oai
Copy link
Copy Markdown
Collaborator

@dylan-hurd-oai dylan-hurd-oai commented Mar 9, 2026

Summary

We need to support allowing request_permissions calls when using Reject policy

Screenshot 2026-03-09 at 12 06 40 PM

Note that this is a backwards-incompatible change for Reject policy. I'm not sure if we need to add a default based on our current use/setup

Testing

  • Added tests
  • Tested locally
@dylan-hurd-oai
Copy link
Copy Markdown
Collaborator Author

@codex review

Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0e28720f3d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

/// Reject prompts triggered by execpolicy `prompt` rules.
pub rules: bool,
/// Reject approval prompts related to built-in permission requests.
pub request_permissions: bool,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep RejectConfig backward-compatible on deserialization

Adding request_permissions as a required field without a serde default makes old Reject payloads fail to decode. Existing configs/clients that only send sandbox_approval, rules, and mcp_elicitations will now error instead of loading. This introduces a breaking change for persisted config and API consumers; deserialize missing request_permissions as false to keep compatibility.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@celia-oai I think this is my primary concern here - the other values are not optional, so it feels a bit weird to make this one optional. but conflicts with backwards-compatibility

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the correct thing to do here is prob to make Reject an experimental field, since i think we'll keep making breaking changes here as we iterate

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, can do!

@dylan-hurd-oai dylan-hurd-oai merged commit 6da84ef into main Mar 10, 2026
31 checks passed
@dylan-hurd-oai dylan-hurd-oai deleted the dh--request-permissions--approval-policy branch March 10, 2026 01:16
@github-actions github-actions bot locked and limited conversation to collaborators Mar 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

3 participants