Skip to content

[codex] Document Codex report-mode plugin approvals - #86784

Closed
davidbennett1979 wants to merge 1 commit into
openclaw:mainfrom
davidbennett1979:codex/document-codex-plugin-approval-report-mode-main
Closed

davidbennett1979 wants to merge 1 commit into
openclaw:mainfrom
davidbennett1979:codex/document-codex-plugin-approval-report-mode-main

Conversation

@davidbennett1979

Copy link
Copy Markdown
Contributor

Summary

  • Clarifies the native Codex routing docs for plugin hook-level requireApproval during app-server PreToolUse report mode.
  • Documents that hook-level plugin requireApproval is reported back to Codex as a deny/block reason in report mode, rather than opening an OpenClaw plugin approval prompt.
  • Keeps Codex PermissionRequest approval routing distinct from plugin before_tool_call requireApproval behavior.

Refs #86777.

Why

The current behavior is safe, but surprising for plugin authors. A local plugin symptom was: a before_tool_call hook returning requireApproval during Codex app-server PreToolUse report mode blocked safely, but no approval card appeared. From a plugin/user perspective this can look like approval routing is broken unless the report-mode behavior is documented.

Validation

  • git diff --check

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: XS triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 26, 2026
@clawsweeper

clawsweeper Bot commented May 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed May 26, 2026, 3:16 AM ET / 07:16 UTC.

Summary
The PR adds a native Codex routing note in docs/tools/acp-agents.md explaining that plugin hook requireApproval in app-server PreToolUse report mode becomes a deny/block response rather than an OpenClaw approval prompt.

PR surface: Docs +3. Total +3 across 1 file.

Reproducibility: yes. for the underlying behavior and docs gap: current main lacks the report-mode requireApproval clarification, while source and tests show the PreToolUse report-mode approval becomes a deny response. No live runtime repro was needed for this docs-only patch review.

Review metrics: none identified.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🌊 off-meta tidepool
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none

Next step before merge
No repair job is needed; the branch is already a focused docs patch and only needs normal maintainer review, ready state, and CI/check completion.

Security
Cleared: The PR changes only a public docs Markdown page and introduces no code execution, dependency, workflow, secret, or supply-chain surface.

Review details

Best possible solution:

Land the focused docs clarification once the draft is ready and checks are acceptable, then close the paired documentation issue.

Do we have a high-confidence way to reproduce the issue?

Yes for the underlying behavior and docs gap: current main lacks the report-mode requireApproval clarification, while source and tests show the PreToolUse report-mode approval becomes a deny response. No live runtime repro was needed for this docs-only patch review.

Is this the best way to solve the issue?

Yes: a docs-only clarification is the narrowest maintainable fix for the documented safe-but-surprising behavior. A richer interactive native approval bridge would be a separate product/API feature, not a prerequisite for this PR.

AGENTS.md: found and applied where relevant.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 4beadbf9519e.

Label changes

Label changes:

  • add P3: This is a low-risk documentation clarification for plugin authors about already-tested Codex report-mode behavior.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Real behavior proof is not required because this PR only changes files under docs/.

Label justifications:

  • P3: This is a low-risk documentation clarification for plugin authors about already-tested Codex report-mode behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Real behavior proof is not required because this PR only changes files under docs/.
Evidence reviewed

PR surface:

Docs +3. Total +3 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 1 4 1 +3
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 4 1 +3

What I checked:

  • Root and scoped policy read: Read the full root AGENTS.md and docs/AGENTS.md; the docs policy affected link/location review and the validation expectation for docs-only changes. (AGENTS.md:1, 4beadbf9519e)
  • PR diff is narrowly docs-only: The submitted patch modifies only docs/tools/acp-agents.md, adding the report-mode requireApproval clarification next to the native Codex routing paragraph. Public docs: docs/tools/acp-agents.md. (docs/tools/acp-agents.md:173, 97aa7c305c78)
  • Current docs gap remains on main: Current main describes PermissionRequest routing through OpenClaw approvals but does not yet distinguish hook-level requireApproval in report mode. Public docs: docs/tools/acp-agents.md. (docs/tools/acp-agents.md:173, 4beadbf9519e)
  • Runtime report-mode behavior matches the docs claim: When a plugin hook returns requireApproval and approvalMode is report, runBeforeToolCallHook returns a blocked failure using the approval description/title rather than calling requestPluginToolApproval. (src/agents/pi-tools.before-tool-call.ts:863, 4beadbf9519e)
  • Native relay forwards report mode to the hook path: The native PreToolUse relay reads openclaw_approval_mode: report, passes approvalMode: report, and renders blocked outcomes as PreToolUse block responses. (src/agents/harness/native-hook-relay.ts:939, 4beadbf9519e)
  • Existing test covers deny/report result: The test named reports synthetic app-server PreToolUse approval requirements without opening plugin approvals asserts permissionDecision: deny and uses the approval description as the reason. (src/agents/harness/native-hook-relay.test.ts:1158, 4beadbf9519e)

Likely related people:

  • Kaspre: Authored the Codex native-hook-relay change whose commit message explicitly includes running the approval relay in report mode and keeping relay pre-tool decisions deny-only. (role: native relay feature contributor; confidence: high; commits: 69a0c925b890, 96959ec3d78e; files: src/agents/harness/native-hook-relay.ts, src/agents/harness/native-hook-relay.test.ts)
  • steipete: Recently modified the app-server approval path in src/agents/pi-tools.before-tool-call.ts and is co-authored on the native relay work that shaped this behavior. (role: recent approval-path contributor; confidence: medium; commits: d9af23fb5af5, 69a0c925b890; files: src/agents/pi-tools.before-tool-call.ts, src/agents/harness/native-hook-relay.ts)
  • kevinslin: Authored the Codex harness docs reorganization that added the current codex-harness-runtime page and touched docs/tools/acp-agents.md. (role: Codex docs structure contributor; confidence: medium; commits: ce0584af89bb; files: docs/tools/acp-agents.md, docs/plugins/codex-harness-runtime.md)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels May 26, 2026
@clawsweeper

clawsweeper Bot commented May 26, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper PR egg

✨ Hatched: 🥚 common Pearl Patch Peep

Hatch command

Comment @clawsweeper hatch when this PR is hatchable.

Hatchability rules:

  • Merged PRs are hatchable.
  • Open PRs are hatchable when they are status: 👀 ready for maintainer look, status: 🚀 automerge armed, or labeled clawsweeper:automerge.
  • Closed unmerged PRs are hatchable only when one of those hatchable labels is still present in the durable record.

Rarity: 🥚 common.
Trait: sleeps inside passing CI.
Image traits: location merge queue dock; accessory lint brush; palette seafoam, black, and opal; mood watchful; pose nestled inside a glowing shell; shell soft velvet shell; lighting golden review-room light; background subtle branch markers.
Share on X: post this hatch
Copy: My PR egg hatched a 🥚 common Pearl Patch Peep in ClawSweeper.

What is this egg doing here?
  • Eggs appear after the PR passes real-behavior proof. It is here for vibes, not verdicts: it does not change labels, ratings, merge decisions, or automation.
  • The shell reacts to review momentum: open follow-up work warms it up, re-review makes it wobble, and a clean final review lets it hatch.
  • Hatchability usually comes from sufficient real-behavior proof, no blocking P0/P1/P2 findings, no security attention needed, and clean correctness. A merged PR is already final, so merge makes the egg hatchable independently.
  • The hatch is seeded from this repository and PR number, so the same PR keeps the same creature; the reviewed head SHA can only change safe visual details.
  • Rarity is just collectible sparkle: 🥚 common, 🌱 uncommon, 💎 rare, ✨ glimmer, and 🌈 legendary.

@davidbennett1979

Copy link
Copy Markdown
Contributor Author

Closing as superseded by #86978, which covers the intended docs-only fix for #86777 more completely and is ready for maintainer review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant