Skip to content

fix(macos): accept canonical Codex plugin config - #166510

Merged
steipete merged 1 commit into
mainfrom
fix/macos-codex-config-fix27
Oct 7, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/macos-codex-config-fix27

Conversation

@steipete

@steipete steipete commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes valid Codex plugin configuration hiding a paired Mac's native session catalog. The native validator rejects canonical fields such as sessionCatalog, and its activation check incorrectly requires agent-facing supervision tools to be enabled.

User Impact

Paired Macs can advertise their Codex catalog with canonical config, including sessionCatalog and omitted supervision.enabled. Explicit catalog opt-out, plugin policy, and native stdio/user-home restrictions remain enforced. The macOS first-run opt-out remains intact. No config migration, schema, protocol, or dependency change is required.

The affected path reads local config when preparing a remote node connection and again for list/transcript requests. It is not the settings or onboarding decoder. Validation failures suppress the advertised capability and commands; direct calls report the catalog disabled. A compatible Node worker fallback can mask the native failure.

Why This Change Was Made

The canonical owners are extensions/codex/src/app-server/config-parsing.ts, session-discovery-config.ts, the plugin manifest, and the SDK SecretInput schema. The mirror in apps/macos/Sources/OpenClaw/NodeMode/MacNodeCodexThreadCatalog.swift now follows those contracts and uses sessionCatalog.enabled for catalog activation. It leaves the raw config intact, including fields the native catalog does not consume.

The generated Swift Gateway models expose config/schema payloads as AnyCodable; they do not contain a reusable Codex config model or validator. This repair retains the native validator and checks one shared config fixture through both the Swift reader and the canonical manifest/runtime parser.

Drift audit

All fields below are optional unless explicitly identified as required within an object. Unconsumed options remain in the raw config; their runtime defaults belong to the plugin.

Field or behavior Canonical owner Previous native behavior
sessionCatalog Optional strict object Rejected as unknown
sessionCatalog.enabled Optional boolean, defaults true; controls catalog independently of supervision Not recognized; catalog incorrectly required supervision.enabled == true
sessionCatalog.homes Optional array of nonblank strings or strict objects with required nonblank path and optional nonblank label Not recognized
supervision.enabled Optional boolean, defaults false; controls agent-facing tools Already optional in decoding, but incorrectly used as catalog switch
computerUse.liveTestTimeoutMs, toolCallTimeoutMs Optional positive numbers, default 60,000 each Rejected
computerUse.healthCheckEnabled Optional boolean, default false Rejected
computerUse.healthCheckIntervalMinutes Optional 30/60/120/240, default 60 Rejected
computerUse.pluginCacheMode Optional shared/independent, default independent Rejected
computerUse.strictReadiness, autoRepair Optional booleans, default false Rejected
appServer.loopDetectionPreToolUseRelay, enableUltrafast Optional booleans, default true Rejected
appServer.cyberFailover Optional strict object; optional mode (auto/off, default auto), nonblank model (plugin-owned default), positive cooloffMs (default 600,000) Rejected
appServer.turnCompletionIdleTimeoutMs, postToolRawAssistantCompletionIdleTimeoutMs Retired, rejected by strict owner Still accepted
appServer.authToken, headers.* String or SDK SecretInput with required source, provider, id; sources include store Rejected store; other secret grammars match
appServer.approvalPolicy Runtime accepts never, on-request, and the on-failure alias; rejects retired untrusted Accepted untrusted
appServer.serviceTier Manifest admits string/null; runtime trims/normalizes aliases Native validates string/null and leaves the unconsumed value untouched

Other fields match the runtime parser's optionality and validation: dynamic tools, discovery, existing computer-use options, supervision/endpoints, remaining app-server options, network proxy, and experimental settings. codexPlugins remains independently parsed by the canonical runtime; malformed policy data does not invalidate the catalog config. Native command/arguments/clearEnv normalization and fallback defaults are unchanged.

Canonical-layer discrepancies found during the audit are outside this native fix: the manifest still lists retired approvalPolicy: untrusted; its timeout minimum is 1 while runtime accepts any positive number; some manifest strings permit blanks that runtime rejects; runtime service-tier preprocessing drops nonstrings that manifest admission rejects. No owner schema is changed here.

Evidence

Reviewed and tested head: 28dc11045f449b0995bb2b2384992f598c52561c.

  • Baseline at d70a16aab07cb1911884ec9ae9129899852437dc: the new Swift regression throws invalidAppServerConfiguration for a canonical config containing sessionCatalog without supervision.enabled; default catalog advertisement also fails. The shared complete-config fixture fails on the same unchanged reader.
  • Fixed native app and test bundle build: swift build --package-path apps/macos --build-system native --build-tests passed. Apple Mermaid resources were generated with node scripts/prepare-apple-mermaid.mjs.
  • Five audited Swift tests passed in 0.064 seconds (including three parameterized canonical configs and the expanded rejection table), using the built Swift Testing bundle in an OS sandbox denying operator-home access, preferences/Keychain IPC, network, and unrelated process launches. This is native config-boundary proof, not a live Gateway or GUI claim. The full native suite was not run: it requires a disposable macOS host, and ordinary PR CI deliberately excludes native Swift test jobs.
  • node scripts/run-vitest.mjs extensions/codex/src/app-server/config-native-contract.test.ts test/scripts/lint-suppressions.test.ts --maxWorkers=1 passed. Final local fixture run: 0.476 seconds test time, 363.38 seconds runner time, largely compiled-worker preparation. On exact-head CI, the shared fixture test took 84 ms; its dedicated shard took 28.68 s (112 s job including setup).
  • Extension-test typecheck, Swift lint, pinned SwiftFormat checks, and git diff --check passed.
  • Runtime import cycles: 0. Madge cycles: 0 (therefore no new component).
  • Independent isolated autoreview: no actionable P0–P2 findings.
  • Net production LOC: +50 (bug-fix exception; tests, fixture, and docs excluded).
  • Exact-head CI run 37589197853 passed, including openclaw/ci-gate. CodeQL shard selection initially failed because the GitHub PR-files API returned truncated JSON; its failed-job rerun passed. Two cancelled auto-response jobs also passed their reruns.
  • Broader local changed-file checks passed their ratchets, boundaries, formatting, and both extension typechecks, then hit the existing 600-second deadline in the production/full-tree Knip scans (no findings emitted; script scan passed). No timeout, suppression, baseline, or ignore was changed. All selected macOS and shared-kit Periphery scans passed on the exact head. The full local changed-check command did not finish past the Knip step; this timeout is not claimed as a clean scan or a source finding.

@clawsweeper

clawsweeper Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation app: macos App: macos extensions: codex size: M labels Oct 7, 2026
@steipete
steipete marked this pull request as ready for review October 7, 2026 07:44
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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 Oct 7, 2026
@clawsweeper

clawsweeper Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 7, 2026, 3:52 AM ET / 07:52 UTC.

ClawSweeper review

What this changes

The macOS native Codex catalog accepts canonical plugin configuration and uses the catalog’s own enable setting independently of agent-facing supervision tools.

Merge readiness

✅ Ready for maintainer review

This remains a useful, focused repair: current main and the latest release still incorrectly require supervision for native catalog access. No blocking correctness finding was identified.

Priority: P2
Reviewed head: 28dc11045f449b0995bb2b2384992f598c52561c

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused contract-parity repair with meaningful regression coverage and no identified blocking defect.
Proof confidence 🌊 off-meta tidepool Not applicable: Repository State identifies a MEMBER-authored PR, so ordinary external-contributor proof is exempt. Supplied sandboxed Swift tests exercise the changed native config reader and advertisement boundary, but do not claim live catalog transport coverage. No stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Repository State identifies a MEMBER-authored PR, so ordinary external-contributor proof is exempt. Supplied sandboxed Swift tests exercise the changed native config reader and advertisement boundary, but do not claim live catalog transport coverage. No stored-data contract changes.
Evidence reviewed 9 items Pinned introduction and merge ownership: The introduced delta is the recorded merge-base-to-head change. Inspection of the test merge’s raw commit confirmed its parents are the pinned main SHA followed by the exact PR head; its result changes only the six introduced paths.
Repair remains necessary on main: The fetched main implementation still checks supervisionEnabled, defaults an entry without config to supervision disabled, and excludes sessionCatalog from accepted configuration keys. The PR instead checks the independently validated catalog setting.
Latest release retains the defect: The release file retrieved through GitHub still contains supervisionEnabled and requires it to be true for advertisement. No shipped fix is claimed.
Findings None None.
Security None None.

How this fits together

A paired Mac reads its local plugin configuration to advertise Codex session browsing and authorize subsequent catalog requests. Eligible requests use the native user-home App Server and return session metadata or transcript pages to the Gateway.

flowchart TD
  A[Local plugin configuration] --> B[Native configuration validator]
  B --> C[Plugin policy and catalog opt-out]
  C --> D[Transport and home restrictions]
  D --> E[Paired Mac catalog capability]
  E --> F[Gateway catalog request]
  F --> C
  D --> G[Native App Server reads]
  G --> H[Session metadata or transcript page]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +148, Tests +15, Docs +3, Other +17. Total +183 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 1 148 0 +148
Tests 1 15 0 +15
Docs 1 5 2 +3
Config 0 0 0 0
Generated 0 0 0 0
Other 3 140 123 +17
Total 6 308 125 +183

Review metrics

Metric Value Why it matters
Production versus regression growth production +50; tests −18; shared fixture +148 The production growth has a stated configuration-parity justification, while both languages consume one shared fixture.

Technical review

Best possible solution:

Keep native catalog admission aligned with the canonical plugin schema and independent catalog switch, with shared cross-language regression coverage.

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

Yes, from source: valid config containing sessionCatalog is rejected on current main, and omitted supervision prevents advertisement. The supplied regressions target both failures; this review did not execute them.

Is this the best way to solve the issue?

Yes. Matching the existing canonical config contract and retaining independent catalog opt-out is a focused repair; the shared fixture guards cross-language drift.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 56bd0430d532.

Labels

Label changes:

  • add P2: This repairs a bounded native catalog failure for paired Macs using valid plugin configuration.
  • 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: Repository State identifies a MEMBER-authored PR, so ordinary external-contributor proof is exempt. Supplied sandboxed Swift tests exercise the changed native config reader and advertisement boundary, but do not claim live catalog transport coverage. No stored-data contract changes.

Label justifications:

  • P2: This repairs a bounded native catalog failure for paired Macs using valid plugin configuration.
  • 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: Repository State identifies a MEMBER-authored PR, so ordinary external-contributor proof is exempt. Supplied sandboxed Swift tests exercise the changed native config reader and advertisement boundary, but do not claim live catalog transport coverage. No stored-data contract changes.

Evidence

What I checked:

  • Pinned introduction and merge ownership: The introduced delta is the recorded merge-base-to-head change. Inspection of the test merge’s raw commit confirmed its parents are the pinned main SHA followed by the exact PR head; its result changes only the six introduced paths. (28dc11045f44)
  • Repair remains necessary on main: The fetched main implementation still checks supervisionEnabled, defaults an entry without config to supervision disabled, and excludes sessionCatalog from accepted configuration keys. The PR instead checks the independently validated catalog setting. (apps/macos/Sources/OpenClaw/NodeMode/MacNodeCodexThreadCatalog.swift:304, 56bd0430d532)
  • Latest release retains the defect: The release file retrieved through GitHub still contains supervisionEnabled and requires it to be true for advertisement. No shipped fix is claimed. (apps/macos/Sources/OpenClaw/NodeMode/MacNodeCodexThreadCatalog.swift:304, fc23bc864e45)
  • Existing canonical activation contract: The plugin registers its catalog whenever sessionCatalog.enabled is not false, while supervision.enabled separately gates agent-facing tools. The Swift changes follow this existing contract rather than adding a competing capability. (extensions/codex/index.ts:212, 28dc11045f44)
  • Configuration boundary and dependency scope: The canonical schemas define optional catalog homes, computer-use settings, and App Server fields. The new contract test executes OpenClaw’s manifest admission and plugin parser against shared fixture bytes; it does not import or exercise the sibling Codex implementation. No changed Codex protocol or harness contract establishes a dependency-specific inspection gate. (extensions/codex/src/app-server/config-native-contract.test.ts:8, 28dc11045f44)
  • Opt-out and request authorization preserved: Advertisement retains global plugin policy, entry disable, allow/deny checks, stdio-only transport, and user-home restrictions. List and transcript entry points reread local configuration and reject disabled catalogs before invoking the client. Added store references are validated but are not resolved or executed by this native reader. (apps/macos/Sources/OpenClaw/NodeMode/MacNodeCodexThreadCatalog.swift:294, 28dc11045f44)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • vincentkoc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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.

@steipete
steipete merged commit 526ed33 into main Oct 7, 2026
211 of 214 checks passed
@steipete
steipete deleted the fix/macos-codex-config-fix27 branch October 7, 2026 08:18
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 8, 2026
Fix paired Macs hiding the native Codex catalog when canonical plugin config includes sessionCatalog or newer computer-use, app-server, and SecretInput options. Use sessionCatalog.enabled independently of agent-facing supervision, preserving explicit opt-out and native transport/home restrictions.

Keep the native reader strict, reject retired options, and share a config fixture with the canonical manifest/runtime parser. The Swift regression fails on the original main reader and passes after the repair. Swift build, focused native tests, typechecks, cycle checks, lint, independent review, and exact-head selected CI passed.

Full native suite was not run; broad local production/full-tree Knip scans timed out at their existing 600-second limit without findings. See the PR for the complete drift audit and validation evidence.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: macos App: macos docs Improvements or additions to documentation extensions: codex P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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.

1 participant