[codex] Explain one-shot exec approval prompts#97081
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 27, 2026, 3:39 PM ET / 19:39 UTC. Summary PR surface: Source +228, Tests +127. Total +355 across 65 files. Reproducibility: yes. Source inspection and Mantis evidence show the current PR head still omits the new reason from Telegram approval payload construction, so the Telegram prompt reproduces the old policy wording for redirected non-persistable commands. Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. 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: Keep one canonical fix that carries the unavailable reason into every visible approval renderer, including Telegram native and forwarding payloads, then require a passing Telegram Desktop proof on the final head. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection and Mantis evidence show the current PR head still omits the new reason from Telegram approval payload construction, so the Telegram prompt reproduces the old policy wording for redirected non-persistable commands. Is this the best way to solve the issue? No. A typed unavailable reason is the right fix shape, but this implementation is incomplete until the reason is passed through Telegram native and forwarding payload builders and verified with real Telegram proof. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c52adf7505a7. Label changesLabel justifications:
Evidence reviewedPR surface: Source +228, Tests +127. Total +355 across 65 files. View PR surface stats
Acceptance criteria:
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
|
Mantis Telegram Desktop ProofSummary: Mantis captured Telegram Desktop approval prompts; this PR still shows the same Allow Always unavailable wording.
Motion-trimmed clips: |
|
I took a pass over the new Telegram Desktop proof result and would treat it as a blocking proof failure, not just missing evidence. The branch adds That means the transport-visible path exercised by the proof is either not receiving |




What Problem This Solves
Fixes #97069.
Redirected or otherwise non-persistable exec commands such as
openclaw --version 2>&1can correctly hide Allow Always, but the prompt blamed the effective approval policy. That madeask=on-misslook likeask=alwayseven though the hidden button was caused by one-shot command persistence safety.Why This Change Was Made
The exec approval request only carried
unavailableDecisions: ["allow-always"], so Control UI, forwarded chat approvals, native/reaction prompts, and gateway resolve errors could not tell whether Allow Always was hidden by policy or because the command could not be safely persisted.This adds a typed
allowAlwaysUnavailableReasonand threads it through the gateway protocol, exec hosts, pending tool details, approval view model, forwarded/native rendering, reaction metadata, and i18n copy. Codex upstream was checked in../codex/codex-rs/app-server-protocol/src/protocol/common.rsand../codex/codex-rs/app-server-protocol/src/protocol/v2/item.rs; the upstream app-server approval params do not carry OpenClaw Allow Always persistence reasons, so this stays in OpenClaw's gateway approval protocol and renderers.User Impact
Users still get the same safe one-shot behavior for redirected/non-persistable commands, but the prompt now explains that the command cannot be safely saved as an Allow Always rule instead of incorrectly saying the effective approval policy requires approval every time.
Evidence
node scripts/run-vitest.mjs packages/gateway-protocol/src/exec-approvals-validators.test.ts src/infra/exec-approvals-policy.test.ts src/gateway/server-methods/server-methods.test.ts src/infra/exec-approval-reply.test.ts src/infra/exec-approval-forwarder.test.ts ui/src/ui/controllers/exec-approval.test.ts ui/src/ui/views/exec-approval.test.ts src/agents/bash-tools.exec-host-gateway.test.ts src/agents/bash-tools.exec-host-node.test.ts src/plugin-sdk/approval-reaction-runtime.test.ts src/plugin-sdk/approval-renderers.test.ts src/agents/embedded-agent-subscribe.handlers.tools.test.ts src/infra/approval-view-model.test.tspassed 6 Vitest shards in 34.98s.pnpm ui:i18n:checkpassed.pnpm changed:lanes --jsonreportedcore,coreTests,extensions, andextensionTestslanes.env OPENCLAW_CHECK_CHANGED_REMOTE_CHILD=1 OPENCLAW_CHANGED_LANES_RAW_SYNC=1 CI=1 PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN=false corepack pnpm check:changedpassed guards and core/core-test/extensions/extension-test typechecks; it was interrupted during core lint so this PR could be pushed at maintainer request..agents/skills/autoreview/scripts/autoreview --mode localreported clean: no accepted/actionable findings.pnpm check:changedwas blocked locally because Crabbox 0.18.0 is below the blacksmith-testbox minimum of 0.22.0.