feat(codex): add always plugin approval mode#97123
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 27, 2026, 4:13 AM ET / 08:13 UTC. Summary PR surface: Source +143, Tests +654, Docs +11. Total +808 across 19 files. Reproducibility: not applicable. as a feature PR: current main and v2026.6.10 support only boolean or Review metrics: 2 noteworthy metrics.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Land only after sandboxed Codex config access is removed or tightly scoped, maintainers explicitly accept the remaining compatibility/security tradeoff, and redacted real Codex proof shows repeated one-shot approval plus cleanup or fail-closed behavior. Do we have a high-confidence way to reproduce the issue? Not applicable as a feature PR: current main and v2026.6.10 support only boolean or Is this the best way to solve the issue? No: the feature direction is plausible, and the cleanup/fail-closed approach matches upstream Codex constraints, but the generic sandbox allow-list expansion is broader than the narrow startup cleanup path and the real always-mode path is still not proven. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against fbfadbd806e1. Label changesLabel justifications:
Evidence reviewedPR surface: Source +143, Tests +654, Docs +11. Total +808 across 19 files. View PR surface stats
Security concerns:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: edabe7ceaf
ℹ️ 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".
|
@clawsweeper re-review Updated proof is now inspectable from the PR body instead of local-only Slack approval buttons screenshot: Resolved state screenshot: The screenshots show approval ID Maintainer acceptance for the security-boundary items called out in the review: the durable per-tool approval cleanup and the narrow sandbox allowance for |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Land-ready verification for PR #97123.
Known proof gap: local full-suite baseline is currently noisy outside the changed Codex approval surface, so the merge evidence is the repo wrapper's hosted exact-head gate plus focused PR proof. |
9fad4a0 to
31d4ea6
Compare
|
Merged via squash.
|
* feat(codex): add always plugin approval mode * fix(codex): normalize plugin approval decisions * fix(codex): fail closed on layered approval overrides
* feat(codex): add always plugin approval mode * fix(codex): normalize plugin approval decisions * fix(codex): fail closed on layered approval overrides
* feat(codex): add always plugin approval mode * fix(codex): normalize plugin approval decisions * fix(codex): fail closed on layered approval overrides
* feat(codex): add always plugin approval mode * fix(codex): normalize plugin approval decisions * fix(codex): fail closed on layered approval overrides


What Problem This Solves
Codex plugin app configuration needed a mode stricter than
auto:allow_destructive_actions: "always"should keep destructive/write plugin actions available while requiring user elicitation every time, including after a prior approval in the same session.Why This Change Was Made
This adds
"always"as a supported Codex destructive-action policy across the manifest schema, config normalization, session binding, migration contracts, command docs, and native plugin docs. For Codex app-server threads,"always"still keeps Codex read-only tools ondefault_tools_approval_mode: "auto", but clears only persisted per-toolapproval_modeleaves through Codexconfig/value/writebefore exposing write apps so prior Codex session approval cannot bypass OpenClaw plugin approval.The latest fix also passes the thread cwd into Codex config reads, treats
config/value/writeresponses withstatus: "okOverridden"as cleanup failures, and re-reads the effective cwd-scoped config after cleanup. If any durable per-tool approval override still wins from another layer, OpenClaw omits the app instead of exposing a false every-write approval guarantee.Checked upstream Codex behavior in sibling source:
../codex/codex-rs/config/src/mcp_types.rs,../codex/codex-rs/core/src/connectors.rs,../codex/codex-rs/core/src/mcp_tool_call.rs,../codex/codex-rs/app-server-protocol/src/protocol/v2/config.rs,../codex/codex-rs/app-server/src/config_manager_service.rs,../codex/codex-rs/config/src/merge.rs, and../codex/codex-rs/utils/json-to-toml/src/lib.rs.User Impact
Users can set
allow_destructive_actions: "always"for Codex apps to require approval for every destructive plugin tool call while leaving read-only plugin tools usable without prompts. Existingtrue,false, and"auto"behavior remains unchanged.Evidence
node scripts/run-vitest.mjs extensions/codex/src/app-server/config.test.ts extensions/codex/src/app-server/plugin-thread-config.test.ts extensions/codex/src/app-server/elicitation-bridge.test.ts extensions/codex/src/app-server/session-binding.test.ts extensions/codex/doctor-contract-api.test.ts extensions/codex/src/app-server/request.test.ts extensions/codex/src/migration/provider.test.tspassed: 7 files, 244 tests.git diff --checkpassed.pnpm format:docs:checkpassed.c06f61d:pnpm tsgo:prodpassed,node scripts/run-vitest.mjs extensions/codex/src/app-server/elicitation-bridge.test.tspassed: 1 file, 49 tests, andgit diff --checkpassed.9fad4a0:node scripts/run-vitest.mjs extensions/codex/src/app-server/plugin-thread-config.test.tspassed: 1 file, 24 tests;pnpm tsgo:prodpassed;pnpm exec oxfmt --write --threads=1 extensions/codex/src/app-server/plugin-thread-config.ts extensions/codex/src/app-server/plugin-thread-config.test.ts extensions/codex/src/app-server/attempt-startup.tscompleted;git diff --checkpassed; fresh autoreview completed with no accepted/actionable findings.plugin:d500955f-e007-4fa8-a1fe-911e0e7ebe06withAllow Once,Allow Always, andDenybuttons.Allow Once, Slack showedPlugin approval: Allowed once, andplugin.approval.waitDecisionreturneddecision: "allow-once"for the same approval ID in.mem/main/proofs/demo-49-openclaw-codex-dev-slack-plugin-buttons/raw/plugin-approval-wait-decision-redo2.json. Inspectable resolved-state screenshot: https://ik.imagekit.io/fpjzhqpv1/openclaw/pr-97123/openclaw-pr-97123-slack-approval-resolved-redo2_909x5V0EC.png.uvx showboat verify .mem/main/proofs/demo-49-openclaw-codex-dev-slack-plugin-buttons/raw/showboat-summary.mdpassed. This redo uses a controlled liveplugin.approval.requestto prove Slack button rendering and resolution; the earlier Google Calendar request had already created the event without presenting a fresh Slack approval card.