Skip to content

docs(codex): clarify report-mode plugin approvals - #86978

Closed
clawSean wants to merge 1 commit into
openclaw:mainfrom
clawSean:docs/codex-report-mode-approvals
Closed

clawSean wants to merge 1 commit into
openclaw:mainfrom
clawSean:docs/codex-report-mode-approvals

Conversation

@clawSean

@clawSean clawSean commented May 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Document that Codex app-server report-mode PreToolUse plugin approval requirements fail closed as denied tool calls instead of opening interactive plugin approval prompts.
  • Cross-link the general plugin hook requireApproval docs to the Codex harness runtime boundary.

Fixes #86777

Real behavior proof

  • Behavior addressed: Plugin authors could read the generic requireApproval docs and expect an interactive OpenClaw approval prompt even on Codex-native app-server report-mode PreToolUse hooks.
  • Real environment tested: Repository checkout /root/projects/openclaw-codex-report-docs, PR head 3e79956434, base origin/main, changed files docs/plugins/codex-harness-runtime.md and docs/plugins/hooks.md.
  • Exact steps or command run after this patch: Inspected source and tests with rg; reviewed the docs diff; ran git diff --check; ran node scripts/check-docs-mdx.mjs docs/plugins/codex-harness-runtime.md docs/plugins/hooks.md; ran pnpm docs:list; attempted node scripts/docs-link-audit.mjs --anchors docs/plugins/codex-harness-runtime.md docs/plugins/hooks.md.
  • Evidence after fix: Copied live terminal output from the patched checkout:
src/agents/harness/native-hook-relay.ts:1489:  return payload.openclaw_approval_mode === "report" ? "report" : undefined;
src/agents/harness/native-hook-relay.test.ts:1158:  it("reports synthetic app-server PreToolUse approval requirements without opening plugin approvals", async () => {
src/agents/harness/native-hook-relay.test.ts:1182:        openclaw_approval_mode: "report",
src/agents/pi-tools.before-tool-call.ts:798:      if (args.approvalMode === "report") {
src/agents/pi-tools.before-tool-call.ts:864:      if (args.approvalMode === "report") {
docs/plugins/codex-harness-runtime.md:101:Codex app-server report-mode `PreToolUse` events are fail-closed for plugin
docs/plugins/codex-harness-runtime.md:104:(`openclaw_approval_mode` is `"report"`), OpenClaw does not open an
docs/plugins/hooks.md:214:  In Codex app-server report-mode native `PreToolUse` relays, this is reported
Docs MDX check passed (2 files, 180ms).

The docs diff adds the report-mode boundary to docs/plugins/codex-harness-runtime.md and cross-links it from docs/plugins/hooks.md. git diff --check, targeted MDX check, and pnpm docs:list passed.

  • Observed result after fix: The docs now tell plugin authors that report-mode native PreToolUse requireApproval is reported back to Codex as a denied tool call rather than opening an interactive plugin approval prompt.
  • What was not tested: docs-link-audit could not complete locally because Mintlify link-rot failed to import react from its pnpm-isolated dependency path. The changed link targets an existing page and anchor in the same docs tree.

Verification

  • git diff --check
  • node scripts/check-docs-mdx.mjs docs/plugins/codex-harness-runtime.md docs/plugins/hooks.md
  • pnpm docs:list

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

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

I updated the proof section to include the required Steps, Evidence, and Observed result fields explicitly.

@clawsweeper

clawsweeper Bot commented May 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawSean
clawSean force-pushed the docs/codex-report-mode-approvals branch from 5cc35c9 to 3e79956 Compare May 26, 2026 17:14
@clawsweeper

clawsweeper Bot commented May 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed May 26, 2026, 1:24 PM ET / 17:24 UTC.

Summary
The PR adds Codex harness docs for report-mode native PreToolUse requireApproval denial behavior and cross-links the general plugin hook approval docs to that boundary.

PR surface: Docs +15. Total +15 across 2 files.

Reproducibility: not applicable. for a docs-only PR; source inspection of the runtime and existing relay test confirms the behavior the docs describe.

Review metrics: none identified.

Merge readiness
Overall: 🦞 diamond lobster
Proof: 🌊 off-meta tidepool
Patch quality: 🦞 diamond lobster
Result: ready for maintainer review.

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

Next step before merge
No ClawSweeper repair lane is needed; there are no actionable defects in the docs-only patch.

Security
Cleared: The PR changes only two docs files and does not touch code execution, dependencies, workflows, lockfiles, credentials, or install/release scripts.

Review details

Best possible solution:

Land the focused docs clarification after normal maintainer checks; a future interactive Codex-native plugin approval bridge should remain a separate feature discussion.

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

Not applicable for a docs-only PR; source inspection of the runtime and existing relay test confirms the behavior the docs describe.

Is this the best way to solve the issue?

Yes; documenting the current fail-closed behavior is the narrowest maintainable fix for the linked docs request, while changing interactive approval behavior would be a separate product feature.

AGENTS.md: found and applied where relevant.

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

Label changes

Label changes:

  • add P3: This is low-risk docs clarification for plugin authors, with no runtime, config, security, or upgrade surface changed.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P3: This is low-risk docs clarification for plugin authors, with no runtime, config, security, or upgrade surface changed.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • 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 +15. Total +15 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 2 15 0 +15
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 15 0 +15

What I checked:

Likely related people:

  • vincentkoc: Current main blame and file history for the Codex native hook relay, related tests, and plugin docs in this checkout all trace to c38b5033e64b71c141a2926f50b77f020b4cdcf0. (role: recent area contributor; confidence: medium; commits: c38b5033e64b; files: docs/plugins/codex-harness-runtime.md, docs/plugins/hooks.md, src/agents/harness/native-hook-relay.ts)
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.

@openclaw-barnacle openclaw-barnacle Bot added proof: supplied External PR includes structured after-fix real behavior proof. and removed triage: needs-real-behavior-proof Candidate: external PR needs after-fix proof from a real setup. labels May 26, 2026
@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. labels May 26, 2026
@clawsweeper

clawsweeper Bot commented May 26, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper PR egg

✨ Hatched: 🌱 uncommon Tiny Proofling

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: 🌱 uncommon.
Trait: keeps receipts.
Image traits: location green-check meadow; accessory lint brush; palette cobalt, lime, and pearl; mood sparkly; pose stepping out of a freshly hatched shell; shell paper lantern shell; lighting subtle sparkle highlights; background quiet workflow signs.
Share on X: post this hatch
Copy: My PR egg hatched a 🌱 uncommon Tiny Proofling 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.

@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels May 26, 2026
@davidbennett1979

Copy link
Copy Markdown
Contributor

Thanks, this matches the intended resolution for #86777.

I opened #86784 as the initial draft, but this PR is the cleaner upstream path: it documents the Codex app-server report-mode boundary in the Codex harness docs and cross-links the generic plugin requireApproval docs.

I am happy with docs-only here. A runtime approval bridge should be a separate feature/design discussion if maintainers want it later. I am closing #86784 as superseded by this PR.

@steipete steipete self-assigned this May 28, 2026
steipete added a commit that referenced this pull request May 28, 2026
Route Codex app-server report-mode PreToolUse plugin approval requirements through the matching app-server approval request instead of failing closed. Shares duplicate in-flight approvals, preserves block/rewrite fail-closed behavior, and keeps generic plugin allow-always scoped to one Codex request. Supersedes #86978; thanks @clawSean for the original docs clarification.
@steipete

Copy link
Copy Markdown
Contributor

Thanks @clawSean. I landed the replacement implementation in #87805 as 56a5d7e.

That wires Codex report-mode plugin approvals into the matching app-server approval request instead of only documenting the fail-closed behavior, so this docs-only PR is superseded and no longer needed.

@steipete steipete closed this May 28, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 29, 2026
Route Codex app-server report-mode PreToolUse plugin approval requirements through the matching app-server approval request instead of failing closed. Shares duplicate in-flight approvals, preserves block/rewrite fail-closed behavior, and keeps generic plugin allow-always scoped to one Codex request. Supersedes openclaw#86978; thanks @clawSean for the original docs clarification.
sablehead pushed a commit to sablehead/openclaw that referenced this pull request Jun 10, 2026
Route Codex app-server report-mode PreToolUse plugin approval requirements through the matching app-server approval request instead of failing closed. Shares duplicate in-flight approvals, preserves block/rewrite fail-closed behavior, and keeps generic plugin allow-always scoped to one Codex request. Supersedes openclaw#86978; thanks @clawSean for the original docs clarification.
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. proof: supplied External PR includes structured after-fix real behavior proof. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document Codex app-server report-mode handling of plugin requireApproval

3 participants