Expose structured permission changes in ACP metadata - #342
Open
nikita-ashihmin wants to merge 1 commit into
Open
Expose structured permission changes in ACP metadata#342nikita-ashihmin wants to merge 1 commit into
nikita-ashihmin wants to merge 1 commit into
Conversation
nikita-ashihmin
force-pushed
the
codex/permission-scope-metadata
branch
from
July 29, 2026 09:20
cdbe53b to
274d991
Compare
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.
Summary
Expose the exact consequence of Codex permission options through a shared, versioned option-level metadata contract:
{ "_meta": { "permission": { "version": 1, "changes": [] } } }Each change includes a producer-supplied human-readable
descriptionplus structured operation, target, matcher, lifetime, and access information where Codex provides it.Why
ACP already standardizes the option decision category through
kind(allow_once,allow_always,reject_once, orreject_always), the button text throughname, and selection throughoptionId. It does not currently describe the exact policy change behind an option.Clients therefore cannot reliably explain whether an always option grants a command prefix, one network host, filesystem writes under a root, or a broader runtime permission. Parsing display labels is lossy and couples clients to one agent.
This metadata deliberately describes only the exact consequence of the option. It does not duplicate ACP button semantics and does not carry the request reason.
Contract
The common
_meta.permissionobject contains:version: 1changesdescriptionon every changepolicy_rulechanges withoperationandruleBehaviorgrantchanges with explicit lifetimeExample command policy amendment:
{ "type": "policy_rule", "operation": "add", "ruleBehavior": "allow", "description": "Allow commands starting with npm install", "targets": [ { "type": "command", "matcher": { "type": "argv_prefix", "argv": ["npm", "install"] } } ] }Codex coverage
The original
_meta.codexdecision payload remains alongside the common metadata, so existing clients and response handling are unchanged.Compatibility
This uses the existing ACP
_metaextension point and requires no protocol-version change. Clients that do not recognize the contract ignore it and continue using standard ACP fields. Missing common metadata means the exact structured consequence is unknown; it must not be interpreted as unrestricted access.Tests