Repository navigation
Conversation
|
Codex review: found issues before merge. Reviewed August 7, 2026, 11:36 AM ET / 15:36 UTC. ClawSweeper reviewWhat this changesThis PR moves configured MCP execution into OpenClaw’s Codex dynamic-tool bridge and persists native-capability authority for scheduled agent turns. Regression provenancePossible regression — probable (reproduction; reviewed change). No predecessor PR is attributed. Merge readinessKeep open: the patch has a concrete cloud-admission regression for symbolic MCP grants, and its persisted native-authority boundary still needs direct Codex contract verification and maintainer approval. Priority: P1 Review scores
Verification
How this fits togetherScheduled automations carry a creator-derived tool authority into isolated agent turns. The Codex harness assembles callable tools, while OpenClaw owns configured MCP transports, policy, and credentials. flowchart LR
A[Creator agent turn] --> B[Persisted cron authority]
B --> C[Isolated scheduled turn]
C --> D[Codex tool assembly]
D --> E[OpenClaw MCP runtime]
D --> F[Native capability surface]
E --> G[Automation result]
F --> G
Decision needed
Why: This selects a durable authority boundary that can widen or suppress scheduled access across upgrades; source review cannot choose that product and security contract. Before merge
Findings
Agent review detailsSecurityNeeds attention: The persisted native-capability boundary cannot receive its required direct Codex dependency review because sibling Codex source is unavailable. Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Extend cloud admission to treat Do we have a high-confidence way to reproduce the issue? Yes: current main proves the reported static-versus-dynamic MCP split, and the PR’s cloud admission logic misses symbolic grants that current source expands into callable MCP tools. Is this the best way to solve the issue? No: consolidating configured MCP ownership in OpenClaw is coherent, but this patch must also block symbolic MCP caps from cloud execution and receive an accepted native-authority contract decision. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 5e477aff2adc. LabelsLabel justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (20 earlier review cycles; latest 8 shown)
|
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
157ecfe to
cf61b5e
Compare
cf61b5e to
157ecfe
Compare
|
Applied the accepted hardening at
Exact-head build, branch autoreview, focused contract suites, and the remote changed gate are green. The PR body now includes the live proof and direct sibling Codex contract evidence. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
b73910e to
11277f1
Compare
Closes #113475
What Problem This Solves
Fixes an issue where Codex-backed
agentTurnautomations could be created successfully but later run without OpenClaw-configured MCP tools or the expected Codex-native capability surface. The scheduled turn could therefore complete without performing its intended MCP-backed work.Why This Change Was Made
OpenClaw-configured MCP servers are now materialized inside Codex attempts as dynamic tools before final policy filtering. Their callable tool names participate in the creator-derived
toolsAllowcap, while invocation and credentials remain owned by OpenClaw. Codex-native MCP remains owned by Codex and is not rewritten by this patch.Scheduled turns also persist an internal versioned native-capability policy:
inheritis stamped for creator-derived default/wildcard tool access and allows the currently authorized Codex-native surface.disabledis stamped for explicit finite tool caps and forces the OpenClaw runtime so a narrow OpenClaw allowlist cannot accidentally widen into opaque native shell, app, or MCP access.This policy is intentionally a coarse native boundary, not a frozen per-app grant list. An
inheritjob re-evaluates current Codex configuration and restrictions when it runs: revoked or unavailable capabilities remain unavailable, and later configuration changes can change the inherited native surface. Exact OpenClaw, plugin, and configured-MCP tool names remain bounded bytoolsAllowand the ordinary current policy intersection.The creator policy is carried in the signed agent-runtime identity and persisted only as internal cron authority. It is preserved through continuation and fallback paths. There is no new user-facing configuration setting, and no MCP credentials or transport configuration are persisted in the job.
For existing jobs,
openclaw doctor --fixmigrates unambiguous v1 authority from their durable cap: wildcard jobs becomeinherit, while finite or empty caps becomedisabled. Missing or malformed authority fails visibly with reauthorization guidance. Routine schedule, delivery, name, enablement, message, and model edits preserve existing authority; explicit tool-runtime mutations require fresh creator authority.User Impact
New Codex-created automations can use OpenClaw-configured MCP tools that were available and allowed when the job was created. Those tools remain subject to the stored cap and all current non-sender restrictions.
Default-cap jobs can retain Codex-native app access through the
inheritboundary. Explicitly finite jobs remain narrow and run without the opaque Codex-native surface. Existing unambiguous jobs are migrated in place; ambiguous jobs stop before execution with an actionable Doctor/reauthorization diagnostic instead of silently running with the wrong tool surface.Cloud workers do not yet transport inherited native authority or OpenClaw-configured MCP runtimes. Admission keeps a scheduled turn on its worker only when the stored cap provably cannot reach the current static MCP surface, including a disabled or requester-scoped server or a server-wide
toolFilter.exclude: ["*"]. It does not reverse-map creator-visible tool IDs to raw MCP names: sanitization, truncation, and collision suffixes make that mapping non-invertible. A same-namespace per-tool filter or session denial therefore remains fail-closed to local reclaim. If that filtering was intentional, the operator must update or reauthorize the automation so its stored cap reflects the current tool surface.Evidence
2978742fb3e49496bf85674cead561d9a449ead9.$autoreviewreported no accepted/actionable findings for the implementation and each subsequent cleanup diff.e3056f49b47b4e2b9d097bbd55c1cc6302fb7152,pnpm buildpassed, including published runtime assembly, plugin SDK export verification, CLI bootstrap validation, and the Control UI production build.e3056f49b47b4e2b9d097bbd55c1cc6302fb7152, live Codex configured-MCP proof passed in 272.47 seconds:cleanup_probetool exactly once;A dedicated read-only ChatGPT app replaced unavailable Todoist for the hosted-app proof. On preceding head
e3056f49b47b4e2b9d097bbd55c1cc6302fb7152, a real Codex creator turn created an isolated automation without a custom restriction; the authoritative SQLite row storedtoolsAllowIsDefault = trueandscheduledNativePolicy.mode = inherit. The forced scheduled run calledcodex_apps.openclaw_cron_authority_proof.list_api_endpointssuccessfully and finished withHOSTED_APP_SCHEDULED_OK_182. The transcript recorded the native tool call/result withisError: false, and a credential-pattern scan found no bearer tokens, API keys, access tokens, refresh tokens, or authorization headers. The job, gateway, isolated state, and temporary OAuth profile were removed after proof. This PR intentionally does not freeze an exact creator-time per-app grant list.Direct Codex Contract Verification
Verified directly against sibling Codex source at
7431f10d0d4b4ecf5df08a853b41859013b17e45:../codex/codex-rs/app-server-protocol/src/protocol/v2/thread.rs:128../codex/codex-rs/app-server/src/request_processors/thread_processor.rs:1255../codex/codex-rs/core/src/session/mod.rs:654../codex/codex-rs/core/src/tools/spec_plan.rs:1066../codex/codex-rs/app-server/src/request_processors/thread_processor.rs:3525Change Size
Whole PR:
+4125/-1753across 125 files. Production/non-test changes are+1762/-714(net+1048); tests are+2363/-1039(net+1324). The production growth establishes the signed creator-policy boundary, canonical cron persistence and migration, configured-MCP dynamic-tool bridge, runtime/worker enforcement, diagnostics, and cleanup across the affected execution surfaces. Final hardening centralizes the MCP-specific lazy-load gate, preserves utility-only MCP projections, and exempts only provably disabled servers from cloud reclaim while ambiguous per-tool changes remain fail-closed.Live Review Artifact
The redacted live transcript from the preceding runtime head, focused non-Codex add/update proof, and explicit maintainer acceptance of the re-evaluated
inheritmodel are recorded in #119299 (comment).