Skip to content

fix(codex): preserve allowed tools under channel policy - #122282

Merged
obviyus merged 5 commits into
openclaw:mainfrom
keshavbotagent:fix/codex-restricted-plan-progress
Aug 12, 2026
Merged

obviyus merged 5 commits into
openclaw:mainfrom
keshavbotagent:fix/codex-restricted-plan-progress

Conversation

@keshavbotagent

@keshavbotagent keshavbotagent commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes two related regressions in Codex channel runs with explicit tool policy:

  1. Any non-empty deny list marked the entire Codex native tool surface restricted. A channel or agent policy such as deny: ["tts", "music_generate"] therefore disabled unrelated native tools including plan, shell, file, image, and collaboration tools even though none was denied.
  2. When a policy genuinely must isolate Codex native tools, the policy-filtered OpenClaw update_plan replacement was deferred and successful calls were not projected as structured plan events, so channel progress lost its live checklist.

The over-broad isolation started in 409fb7abcaceb2ab2f2b584d393dd38fedb74ac5 when explicit channel policy began disabling the whole native Codex surface.

What Changed

  • Added optional harness metadata, conversationToolPolicySafeDenyTools, declaring exact known OpenClaw denies that are fully enforced outside the harness-native surface.
  • Native tools remain enabled only when every expanded deny is both a known core tool and present in that audited safe list.
  • Finite allowlists, undeclared known tools, unknown names, wildcards, and groups containing any undeclared name still isolate the complete native surface.
  • The Codex safe list is positive and conservative. It includes OpenClaw-only capabilities such as tts and music_generate; omissions and future tools fail closed.
  • For runs that still require native isolation, the OpenClaw update_plan replacement remains directly model-visible and successful calls reuse the structured plan projector.

Review Hardening

The first revision declared native overlaps. ClawSweeper correctly identified that an omitted overlap could fail open. This revision inverts the contract: a harness declares only deny names proven safe to exempt. An omitted or mistakenly unknown name now isolates the native surface, so catalog growth cannot silently weaken policy enforcement.

Security Properties

  • Denied OpenClaw tools are never added back to the catalog.
  • Only exact, known, audited safe denies preserve harness-native tools.
  • Finite allowlists remain restrictive.
  • Undeclared known tools, native overlaps, unknown names, wildcards, and mixed groups remain restrictive.
  • Even a harness that lists an unknown name cannot exempt it because core also requires isKnownCoreToolId.
  • Third-party harnesses that omit the new metadata retain the previous conservative behavior.

Codex Dependency Contract Checked

The bundled dependency is @openai/codex 0.147.0. I inspected the matching rust-v0.147.0 source at be6e8eac029b183056b7e4402879f15d2c85f61b:

  • codex-rs/core/src/tools/spec_plan.rs:848-851 assembles shell, MCP-resource, utility, and collaboration sources into one registry.
  • codex-rs/core/src/tools/spec_plan.rs:875-1040 registers the native shell, plan, request-input, apply-patch, and image capabilities.
  • codex-rs/core/src/tools/spec_plan.rs:1043-1131 registers native collaboration capabilities.
  • codex-rs/core/src/tools/hosted_spec.rs:14-45 defines the hosted web-search surface.
  • codex-rs/config/src/mcp_types.rs:209-215 and codex-rs/config/src/types.rs:853-879 expose per-tool filtering for MCP servers/plugins, not a global arbitrary native-tool deny surface.

Therefore OpenClaw must retain full native isolation whenever a policy might overlap Codex-native or unknown capabilities. The positive safe-deny declaration is the fail-closed owner boundary for exact OpenClaw-only denies.

Regression Proof

The new core regression failed before the resolver change: deny: ["tts", "music_generate"] produced pluginHarnessToolPolicyRestricted: true. It now verifies:

  • audited exact denies (tts, music_generate) do not isolate Codex native tools;
  • an undeclared known deny still isolates;
  • a declared-but-unknown name still isolates;
  • native overlaps, groups, wildcard denies, and finite allowlists still isolate;
  • the existing restricted-run coverage proves update_plan remains direct and emits a normalized structured plan event when native isolation is required.

Evidence

Exact rebased head: 6a77a0414f7

  • Core harness selection: 224/224 passed across both core configurations.
  • Codex harness and run-attempt suites: 160/160 passed.
  • Core and extension production TypeScript: passed on the exact head.
  • Core and extension test TypeScript: passed during the review-fix validation cycle.
  • Plugin SDK baseline generation, drift, exports, and surface checks: passed.
  • Formatting, targeted core/extension lint, dependency pins, patch guards, dead exports, database/state, runtime-sidecar, import-cycle, webhook, and pairing guards: passed.
  • check:changed advanced through its in-scope checks but current origin/main independently fails plugins:boundary-report:ci because plugin-sdk-media-understanding-public-demotion is overdue. The same failure reproduces without this PR; remaining underlying checks were run directly and passed.

Remaining Owner Verification

  • A maintainer still needs to approve the public optional harness metadata contract.
  • This update does not claim a post-branch live Telegram/app-server deployment run; that runtime proof remains to be attached from an environment running this branch.

Final-Head Telegram Proof

Exact head: fc3473b2b09

Command shape (secrets and local paths omitted): run-mock-sut-user-e2e.mjs --backend claude-cli --dm --record ... --output ... with channels.telegram.direct["*"].tools.deny = ["tts", "music_generate"] and the Codex app-server harness selected.

Sent: Use your update_plan tool to create a plan with exactly two steps: "inspect" then "report". Mark both completed as you go. Then reply with only: PLAN_E2E_DONE

Recorded SUT timeline: typing at 4.7s; one 26-character draft at 6.0s; edits of the same draft at 7.8s and 9.8s; deletion at 14.3s. Recorded revisions:

  1. Working / ▸ inspect / ▢ report
  2. Working / ✅ inspect / ▸ report
  3. Working / ✅ inspect / ✅ report

The gateway recorded the explicit policy removing only tts. The deny no longer isolated the unrelated Codex-native planner, and Telegram received the structured native checklist through completion. Evidence files retained outside the repository: events.ndjson, summary.json, and gateway.log.

Redacted verdict JSON

{
  "head": "fc3473b2b090bc026956b6b91e4557d91b47d955",
  "scenario": "telegram-dm-codex-app-server-safe-deny",
  "policy": {"deny": ["tts", "music_generate"]},
  "recordingComplete": true,
  "sutTotals": {"typing": 4, "message": 1, "edit": 2, "delete": 1},
  "timeline": [
    {"elapsedMs": 6029, "kind": "message", "textLen": 26},
    {"elapsedMs": 7805, "kind": "edit", "textLen": 26},
    {"elapsedMs": 9818, "kind": "edit", "textLen": 26},
    {"elapsedMs": 14325, "kind": "delete"}
  ],
  "revisions": [
    "Working\n▸ inspect\n▢ report",
    "Working\n✅ inspect\n▸ report",
    "Working\n✅ inspect\n✅ report"
  ],
  "gatewayPolicyObservation": "explicit deny removed only tts",
  "verdict": "pass: unrelated Codex-native planning remained enabled and projected as structured Telegram progress"
}

@clawsweeper

clawsweeper Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@keshavbotagent
keshavbotagent force-pushed the fix/codex-restricted-plan-progress branch from b600911 to 52c6666 Compare August 11, 2026 21:29
@clawsweeper clawsweeper Bot added mantis: telegram-visible-proof Mantis should capture Telegram visible proof. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 11, 2026
@clawsweeper

clawsweeper Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed August 12, 2026, 1:15 AM ET / 05:15 UTC.

ClawSweeper review

What this changes

This PR adds an audited safe-deny declaration for exact agent harnesses and keeps OpenClaw plan progress visible when Codex native tools are intentionally isolated.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⛔ Blocked until stronger real behavior proof is added - 8 items remain

Keep open: the proposed fail-closed shape is plausible, but a required direct audit of the pinned Codex runtime is unavailable and the posted Telegram proof names an earlier head rather than the current one.

Priority: P2
Reviewed head: cac136372e37428d290e60a5c127fa3cd17ae6df
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The patch has focused source coverage, but current-head real proof and the mandatory dependency audit are still missing.
Proof confidence 🦪 silver shellfish (2/6) Needs stronger real behavior proof before merge: The PR body contains a useful redacted Telegram verdict, but it names fc3473b2b09 rather than current head cac1363; attach redacted exact-head evidence after rebase. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: The PR body contains a useful redacted Telegram verdict, but it names fc3473b2b09 rather than current head cac1363; attach redacted exact-head evidence after rebase. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 7 items Current-main regression path: Current main computes plugin native-surface restriction from any restrictive explicit policy, so a deny such as tts enters the isolation path.
Proposed fail-closed resolver: The branch preserves native tools only when each expanded deny is both a known core tool and listed by the harness; unknown and undeclared names remain restrictive.
Restricted-run security boundary: When restricted, the Codex request builder disables native code mode and inherited/configured MCP servers, so an unsafe exemption could preserve a capability that the policy intended to isolate.
Findings 1 actionable finding [P1] Audit each safe deny against the pinned Codex registry
Security Needs attention Safe-deny inventory lacks independently inspectable upstream audit: Each listed name can prevent native/MCP isolation for a deny policy, but the required exact Codex source checkout is unavailable to validate the claimed absence of overlap.

How this fits together

Channel and agent tool policies are prepared by the core harness selector before a Codex app-server run begins. The Codex plugin either retains its native surface for audited OpenClaw-only denies or replaces it with filtered OpenClaw tools and projects plan updates into channel progress.

flowchart LR
  Policy[Channel tool policy] --> Selector[Harness policy selection]
  Selector --> Check{Every deny audited safe?}
  Check -->|yes| Native[Codex native tools]
  Check -->|no| Filtered[Filtered OpenClaw tools]
  Filtered --> Plans[Plan event projection]
  Native --> Progress[Channel progress]
  Plans --> Progress
Loading

Decision needed

Question Recommendation
Should this public safe-deny contract proceed only after an owner independently verifies the pinned Codex native and MCP surfaces and current-head proof? Perform the pinned-source audit: Verify every declared safe deny against Codex 0.147.0 and refresh the proof from the rebased head before merge.

Why: The contract deliberately controls when an explicit tool deny does not isolate native capabilities, but the required dependency source is unavailable to this review worker.

Before merge

  • Add real behavior proof - Needs stronger real behavior proof before merge: The PR body contains a useful redacted Telegram verdict, but it names fc3473b2b09 rather than current head cac1363; attach redacted exact-head evidence after rebase. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Audit each safe deny against the pinned Codex registry (P1) - This public exemption list determines when an explicit deny leaves native and inherited MCP surfaces enabled. The required direct ../codex audit is unavailable here, so each entry must be verified against pinned 0.147.0 source or removed before merge; this is a late finding because the list is unchanged since the earlier reviewed head.
  • Resolve security concern: Safe-deny inventory lacks independently inspectable upstream audit - Each listed name can prevent native/MCP isolation for a deny policy, but the required exact Codex source checkout is unavailable to validate the claimed absence of overlap.
  • Resolve merge risk (P1) - The new public safe-deny list can leave native and MCP capability available under a policy deny if any entry overlaps the pinned Codex runtime; direct upstream-source confirmation is currently unavailable.
  • Resolve merge risk (P1) - The posted Telegram verdict identifies fc3473b2b09, while the current PR head is cac1363 and includes later policy/security work; exact-head behavior proof is needed.
  • Resolve merge risk (P1) - This bug-fix PR adds net 79 production lines, so the added SDK contract and plan-projection boundary need explicit pre-merge justification.
  • Complete next step (P2) - This needs a maintainer-accessible upstream audit and refreshed proof, not an automated code repair.

Findings

  • [P1] Audit each safe deny against the pinned Codex registry — extensions/codex/harness.ts:23-39
  • [high] Safe-deny inventory lacks independently inspectable upstream audit — extensions/codex/harness.ts:23
Agent review details

Security

Needs attention: The safe-deny list is a security boundary and cannot be cleared without the required direct pinned-Codex audit.

PR surface

Source +79, Tests +88, Docs +9, Generated 0. Total +176 across 27 files.

View PR surface stats
Area Files Added Removed Net
Source 7 91 12 +79
Tests 3 90 2 +88
Docs 1 9 0 +9
Config 0 0 0 0
Generated 16 16 16 0
Other 0 0 0 0
Total 27 206 30 +176

Review metrics

Metric Value Why it matters
Production versus test LOC production +91/-12 (net +79); tests +90/-2 (net +88) The bug fix grows production code to add a public contract and a plan-projection path, so that growth needs owner-level justification.
Public harness contract 1 optional SDK field added The new safe-deny declaration changes behavior available to existing and future harness plugins.

Mantis proof suggestion

Telegram Desktop proof can show that an audited safe deny preserves live checklist updates while restrictive policies still isolate native tools. A maintainer can ask Mantis to capture proof by posting this exact PR comment:

@openclaw-mantis telegram desktop proof: verify on the current head that deny ["tts","music_generate"] preserves Codex checklist updates while a native-control deny remains isolated.

Merge-risk options

Maintainer options:

  1. Verify the exemption before merge (recommended)
    Rebase, audit the pinned Codex runtime and MCP surfaces, then attach exact-head redacted Telegram evidence for safe and restrictive denies.
  2. Pause on the conservative behavior
    Keep the existing isolation behavior if the safe-deny inventory cannot be independently proven against the pinned runtime.

Technical review

Best possible solution:

Rebase to current main, audit every safe-deny entry against checked-out @openai/codex 0.147.0 source, and attach redacted proof from the resulting exact head covering both safe-deny retention and native/MCP isolation.

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

Yes, source-reproducible: current main marks any restrictive explicit policy as native-surface restricted, including a deny-only policy. No local runtime execution was performed.

Is this the best way to solve the issue?

Unclear: the positive safe-deny design is the safer shape, but its correctness depends on an unavailable direct audit of the exact Codex runtime surface.

Full review comments:

  • [P1] Audit each safe deny against the pinned Codex registry — extensions/codex/harness.ts:23-39
    This public exemption list determines when an explicit deny leaves native and inherited MCP surfaces enabled. The required direct ../codex audit is unavailable here, so each entry must be verified against pinned 0.147.0 source or removed before merge; this is a late finding because the list is unchanged since the earlier reviewed head.
    Confidence: 0.98
    Late finding: first raised on code an earlier review cycle already covered.

Overall correctness: patch is incorrect
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 00fc1bd12382.

Labels

Label changes:

  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The PR body contains a useful redacted Telegram verdict, but it names fc3473b2b09 rather than current head cac1363; attach redacted exact-head evidence after rebase. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • remove proof: sufficient: Current real behavior proof status is insufficient, not sufficient.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦪 silver shellfish, so this older rating label is no longer current.
  • remove status: ⏳ waiting on author: Current PR status label is status: 📣 needs proof.

Label justifications:

  • P2: This is a bounded regression in policy-controlled Codex channel runs rather than a broad runtime outage.
  • merge-risk: 🚨 compatibility: A new public harness property changes whether explicit tool denies preserve an existing harness native surface.
  • merge-risk: 🚨 security-boundary: An incorrectly audited safe-deny entry can keep native or MCP capability reachable despite a policy deny.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: The PR body contains a useful redacted Telegram verdict, but it names fc3473b2b09 rather than current head cac1363; attach redacted exact-head evidence after rebase. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • mantis: telegram-visible-proof: Mantis should capture Telegram visible proof. The change affects visible Telegram plan-progress behavior and can be demonstrated in a short redacted recording.

Evidence

Security concerns:

  • [high] Safe-deny inventory lacks independently inspectable upstream audit — extensions/codex/harness.ts:23
    Each listed name can prevent native/MCP isolation for a deny policy, but the required exact Codex source checkout is unavailable to validate the claimed absence of overlap.
    Confidence: 0.98

What I checked:

Likely related people:

  • Peter Steinberger: Current-main blame identifies this commit for the policy preparation lines that the PR changes. (role: introduced current harness-policy handoff; confidence: high; commits: 8876528f7c0e; files: src/agents/harness/selection.ts, extensions/codex/src/app-server/run-attempt-tools.ts)
  • Ayaan Zaidi: Recent file history includes work on the affected Codex harness path. (role: recent Codex harness contributor; confidence: medium; commits: ec4ae78b752e; files: extensions/codex/harness.ts)
  • obviyus: The PR discussion records approval of the safe-deny owner boundary and the branch includes the computer-control isolation hardening commit. (role: recent security-boundary reviewer; confidence: medium; commits: c8ec3ec90c04; files: extensions/codex/harness.ts, extensions/codex/src/app-server/thread-requests.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Attach redacted Telegram or gateway evidence from the rebased current head.
  • Have an owner cite the directly inspected @openai/codex 0.147.0 files that rule out every safe-deny overlap.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • 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.

History

Review history (3 earlier review cycles)
  • reviewed 2026-08-11T22:02:12.737Z sha 52c6666b607f9586847f960ad45f20c76a925f81 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-11T23:12:50.508Z sha d9a487d61f094956cd50bf363c9b74182ea91ac8 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-12T05:08:48.662Z sha c8ec3ec :: needs maintainer review before merge. :: none

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

To use Codex here, create a Codex account and connect to github.

@keshavbotagent
keshavbotagent force-pushed the fix/codex-restricted-plan-progress branch from 52c6666 to d9a487d Compare August 11, 2026 23:05
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation agents Agent runtime and tooling labels Aug 11, 2026
@keshavbotagent keshavbotagent changed the title fix(codex): show plans in policy-restricted channel runs fix(codex): preserve allowed tools under channel policy Aug 11, 2026
@keshavbotagent

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 11, 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: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@openclaw-barnacle openclaw-barnacle Bot added the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Aug 11, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. and removed mantis: telegram-visible-proof Mantis should capture Telegram visible proof. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. labels Aug 11, 2026
@obviyus obviyus self-assigned this Aug 12, 2026
@keshavbotagent
keshavbotagent force-pushed the fix/codex-restricted-plan-progress branch from d9a487d to c118a75 Compare August 12, 2026 04:18
@keshavbotagent

keshavbotagent commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor Author

Addressed the valid security finding in final rebased head 6a77a0414f7:

  • Replaced the omission-sensitive native-overlap inventory with a positive conversationToolPolicySafeDenyTools exemption list.
  • Core now preserves native tools only when every expanded deny is both a known core tool and explicitly audited safe. Undeclared, future, or unknown names fail closed—even if a harness mistakenly lists an unknown name.
  • Audited the boundary against the local pinned Codex rust-v0.147.0 source at be6e8eac029b183056b7e4402879f15d2c85f61b; exact source locations and the revised contract are documented in the PR body.
  • Added regression coverage for audited safe denies, an omitted known deny, a declared unknown deny, native overlap, groups, wildcard, and finite allowlist.
  • Exact-head results: 224 core policy tests and 160 Codex tests passed; core/extension production types and SDK drift passed. Full direct lint/guard lanes also passed.

The PR body now explicitly leaves the public SDK contract decision and live deployed runtime proof to owner verification; no live proof is being inferred from mocked tests.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@keshavbotagent
keshavbotagent force-pushed the fix/codex-restricted-plan-progress branch from c118a75 to 6a77a04 Compare August 12, 2026 04:33
@openclaw-barnacle openclaw-barnacle Bot removed the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Aug 12, 2026
@obviyus

obviyus commented Aug 12, 2026 •

Copy link
Copy Markdown
Collaborator

Current-head maintainer review (6a77a0414f7): one policy-bypass blocker before landing.

Main regression reproduced through a real Telegram/Codex app-server turn. Same prompt and harness, one config difference:

  • control: native structured checklist progressed inspect → report → complete
  • deny: ["tts", "music_generate"]: native planning disappeared; only raw OpenClaw update_plan rows were projected

The gateway recorded the deny removing only tts, then marked the whole harness surface restricted. This confirms the user-visible regression the PR targets.

Blocking inventory finding: extensions/codex/harness.ts currently lists browser, computer, nodes, mobile_ui, and screen as safe denies. OpenClaw provisions Codex-side Computer Use through a plugin MCP server (extensions/codex/src/app-server/computer-use.ts, configured by extensions/codex/src/app-server/config-parsing.ts). Native isolation is also the mechanism that disables inherited MCP servers (extensions/codex/src/app-server/thread-requests.ts). Therefore deny: ["computer"] currently skips isolation and can leave the Codex computer-control MCP surface reachable despite the explicit deny. Those overlapping control names must not be in the safe-deny inventory.

Dependency gate checked directly against the pinned @openai/codex 0.147.0 source (rust-v0.147.0, be6e8eac029b):

  • codex-rs/core/src/tools/spec_plan.rs: shell, MCP-resource, utility, and collaboration/native registrations
  • codex-rs/config/src/mcp_types.rs and codex-rs/config/src/types.rs: per-MCP-server enabled_tools / disabled_tools; no arbitrary global native-tool deny surface

The positive safe-deny design is the right fail-closed shape. I’ll remove the overlapping control names, rerun focused proof, and attach the after-fix Telegram result.

@keshavbotagent

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@obviyus

obviyus commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Maintainer decision: approved.

The optional public conversationToolPolicySafeDenyTools contract is the correct owner boundary. Core stays harness-agnostic; exact-policy harnesses positively declare only canonical OpenClaw denies already enforced outside their native surface. Omissions, unknown names, finite allows, wildcards, and undeclared names fail closed. The Codex declaration has been audited against pinned 0.147.0 and the overlapping computer-control family was removed on fc3473b2b09.

The redacted final-head Telegram verdict JSON is now in the PR body. It records the exact policy, timeline, structured plan revisions, gateway policy observation, and pass claim without account or host identifiers.

@obviyus
obviyus force-pushed the fix/codex-restricted-plan-progress branch from fc3473b to c8ec3ec Compare August 12, 2026 05:01
@obviyus
obviyus enabled auto-merge (squash) August 12, 2026 05:01
@clawsweeper clawsweeper Bot added mantis: telegram-visible-proof Mantis should capture Telegram visible proof. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 12, 2026
@obviyus
obviyus disabled auto-merge August 12, 2026 05:10
@obviyus
obviyus enabled auto-merge (squash) August 12, 2026 05:10
@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 12, 2026
@obviyus
obviyus merged commit 3807eb9 into openclaw:main Aug 12, 2026
123 checks passed
@keshavbotagent
keshavbotagent deleted the fix/codex-restricted-plan-progress branch August 12, 2026 05:35
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 13, 2026
)

Preserve Codex native tools when conversation policies deny only audited OpenClaw capabilities. Fail closed for computer-control denies and retain structured plan progress.

Co-authored-by: Ayaan Zaidi <[email protected]>
Co-authored-by: Kelaw - Keshav's Agent <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation extensions: codex mantis: telegram-visible-proof Mantis should capture Telegram visible proof. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: S status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants