feat: add ACP v1 permission presentation - #405
Merged
Merged
Conversation
nikita-ashihmin
force-pushed
the
codex/acp-v1-permission-metadata
branch
from
August 18, 2026 22:07
4a1f87a to
0c11048
Compare
EugeneTheDev
self-requested a review
August 22, 2026 07:13
Ololoshechkin
approved these changes
Aug 24, 2026
| } | ||
| if (params.additionalPermissions) return ["accept", "cancel"]; | ||
| const decisions: CommandExecutionApprovalDecision[] = ["accept"]; | ||
| if (params.proposedExecpolicyAmendment) { |
There was a problem hiding this comment.
&& params.proposedExecpolicyAmendment.length > 0 from the original CodexApprovalHandler.ts is lost, so an empty amendment array becomes an offerable allow_always decision with an empty prefix.
| return decisions; | ||
| } | ||
| if (params.additionalPermissions) return ["accept", "cancel"]; | ||
| const decisions: CommandExecutionApprovalDecision[] = ["accept"]; |
There was a problem hiding this comment.
The legacy fallback for plain commands drops both acceptForSession ("don't ask again this session") and decline (turn-continuing rejection) that the old handler always offered, and the network branch keeps only the first allow amendment, silently discarding all deny ("block this host") amendments.
Map Codex approval requests to ACP v1 permission presentation and preserve the provider's real durable choices. Split approval, MCP, metadata, plan review, and presentation logic into focused permission modules with behavioral tests.
nikita-ashihmin
force-pushed
the
codex/acp-v1-permission-metadata
branch
from
August 24, 2026 18:38
a6b5c9d to
30065fd
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
_meta.permissionpresentationTests
npm test(405 passed, 28 skipped)npm run typechecknpm run buildKnown rollout constraint
@openai/codex0.147 generated approval params do not declareavailableDecisions. The adapter validates the runtime field and fails closed withcancelwhen it is absent or malformed rather than inventing choices.