Skip to content

fix(plugins): reject known-incompatible Codex runtimes - #168930

Merged
steipete merged 4 commits into
mainfrom
upd/upd-l1543
Oct 11, 2026
Merged

steipete merged 4 commits into
mainfrom
upd/upd-l1543

Conversation

@steipete

@steipete steipete commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

A partial core update can leave Codex 2026.9.5 or 2026.9.6 installed. Their open-ended plugin API range admits them even though their lazy runtime imports require the removed agent-harness-task-runtime SDK subpath.

Fixes #168748. Related: #168498, #168749, #166588.

User Impact

Admission rejects only official version-bound runtimes below their known compatibility floor. Codex's floor is 2026.9.7. Compatible packages remain loadable when they are older than the host, including Codex 2026.10.1 on OpenClaw 2026.10.2, so registry lag does not itself disable the runtime.

Below-floor packages are unavailable before registration, with update/repair guidance and a linked-source remedy. Saved enablement is preserved. Core update, Doctor, and standalone plugin updates still converge eligible packages to the host cohort; explicit selectors and source ownership retain their existing behavior. Failed plugins update commands display their sanitized reason without requiring debug output.

Why This Change Was Made

The plugin owner supplies one minimum-compatible-version literal next to each version-bound runtime entry, with a comment to bump it when an SDK subpath used by that runtime is removed. Admission reads the immutable manifest's package identity and compares it with that floor, independently of the host-version target used by update convergence.

This replaces the overly broad older-than-host rejection. It does not restore the Tasks SDK or add a module-graph scan, config/CLI option, dependency, schema change, or persisted disablement.

Evidence

Current correction head: aab2fd9f5dc929b04d79a60f33ecf6ca850b9a1f.

Published-source verification used npm view @openclaw/codex versions time --json and scanned the published tarball sources:

Codex release Removed SDK import
2026.9.5 Present: native-subagent-monitor-B1hxzIOy.mjs
2026.9.6 tarball Present: native-subagent-monitor-D3filLY2.mjs
2026.9.7 tarball Absent; first fixed successor, published 2026-09-30
2026.9.8 and 2026.9.9 Absent

The revised regression failed against the older-than-host gate for both the floor release and Codex 2026.10.1 on host 2026.10.2. After the correction, both register and execute the probe; 2026.9.6 is rejected with the floor and repair hint.

  • 33 focused admission and update-cohort checks passed.
  • Final standalone six-case regression: six passed; 0.236s test time, 21.81s command wall time with shared compiler preparation.
  • check:changed passed for all four changed files, including core/test typechecks, lint, export and policy guards.
  • Madge: zero cycles.
  • Automated Codex review again returned HTTP 401. Independent local review found no actionable issues.
  • A timing-only test invocation was interrupted before tests ran when concurrent lint removed its temporary config file. It was rerun after lint completed.
  • CI seconds for the new head are pending; this lane stops after pushing the reviewed correction.

Prior evidence retained for unchanged behavior: the 1,654-pass importer sweep (two existing platform skips), prior full build/checks, and isolated live proof with published Codex 2026.9.5. That Gateway remained ready, reported the plugin unavailable, and rejected an agent request at runtime selection with owner-plugin-degraded. plugins doctor showed the repair hint. plugins update codex --accept-capabilities then installed host-matching 2026.9.9; after restart the plugin was active and Doctor returned ok: true. No provider credentials were used, and the isolated Gateway/state were cleaned up.

Total PR LOC: production +98/-59; tests +214/-4; docs +13/-0.

Keep version-bound official runtime admission and standalone plugin updates on the host release cohort. Report repair guidance before stale Codex can register lazy runtime callbacks, and preserve plugin update failure reasons. Fixes #168748; refs #168498, #168749.
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation cli CLI command changes commands Command implementations size: M labels Oct 11, 2026
@steipete
steipete marked this pull request as ready for review October 11, 2026 06:04
@clawsweeper

clawsweeper Bot commented Oct 11, 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.

@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 11, 2026
@clawsweeper

clawsweeper Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Rejects known-incompatible official Codex packages before registration, aligns standalone plugin updates with host cohorts, and preserves actionable failure reasons.

Example: OpenClaw 2026.10.1 starts with @openclaw/codex 2026.9.5 after a partial update.

  • Before: Codex registers, but agent turns fail when a deferred import reaches the removed SDK export.
  • After: Codex is reported unavailable before registration, with repair guidance; saved enablement remains intact.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and source-supported; direct evidence for the corrected acceptance behavior remains at the production-loader harness boundary.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; the correction exercises real loader admission through fixtures, and the body reports an earlier isolated Gateway rejection and plugin recovery run without attached runtime output.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: A partially updated installation can look healthy while every Codex-backed turn fails, and the attempted plugin update can hide its recovery reason.
Reason: The released-package incident and independently verified floor justify the narrow fix; maintainer-authored direction settles the admission tradeoff.

Merge readiness

✅ Ready for maintainer review

Keep open: this PR addresses a confirmed released-package incompatibility that current main still admits; no concrete introduced defect was found.

Priority: P1
Reviewed head: aab2fd9f5dc929b04d79a60f33ecf6ca850b9a1f

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The supplied correction evidence does not include captured shipped-entry-point output for compatible below-host admission or a latest-stable updater-to-candidate run with settings intact.
Agent review details

How this fits together

Plugin discovery supplies package metadata to runtime admission; admitted plugins register capabilities, while CLI update and Doctor reuse the official runtime catalog for recovery.

flowchart TD
  A[Installed plugin package] --> B[Manifest metadata]
  B --> C[Runtime admission]
  D[Official runtime catalog] --> C
  C --> E[Capability registration]
  D --> F[CLI and Doctor convergence]
  F --> A
Loading

Technical review

Best possible solution:

Keep the verified compatibility floor at the existing admission boundary and recover eligible packages through the established update and Doctor owners.

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

Published package inspection confirms the removed import in Codex 2026.9.5 and 2026.9.6, while current main admits their declared ranges; no target code or tests were executed during this read-only review.

Is this the best way to solve the issue?

The verified floor is a focused solution that preserves lazy loading, compatible registry lag, saved policy, and existing recovery owners without restoring retired SDK APIs.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 948e76d89203.

Provenance checked

  • Version-bound runtime catalog and saved policy keeps the original intent (f638cbd: Preserve Codex allow, deny, and entry policy during the temporary package gap after core updates; the PR relocates that catalog and updates its consumers together.)
  • Retired Tasks SDK keeps the original intent (refactor: remove Tasks and TaskFlow runtime #159179: Tasks SDK APIs were intentionally removed without a compatibility facade; incompatible old packages must migrate to retained owners.)
  • Concise CLI failure diagnostics keeps the original intent (688f68e: Preserve actionable update reasons while keeping nested causes and stacks behind explicit diagnostic intent; this extends the same behavior to plugin updates.)
  • Lazy plugin registration keeps the original intent (05a2844: Managed instances retain callback and dependency ownership while preserving deferred loading; the new metadata check runs before runtime imports.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Zavian Wang: Raw commit 9a11e76 adds src/commands/doctor/shared/configured-runtime-plugin-installs.ts:61 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 9a11e764589c; files: src/commands/doctor/shared/configured-runtime-plugin-installs.ts)
  • Vincent Koc: Raw commit ebd59f1 adds src/cli/failure-output.ts:13 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: ebd59f1e01da; files: src/cli/failure-output.ts)

PR surface

Source +39, Tests +210, Docs +13. Total +262 across 16 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 11 98 59 +39
Tests 3 214 4 +210
Docs 2 13 0 +13
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 16 325 63 +262

Review metrics

Metric Value Why it matters
Production versus test changes Production +98/-59; tests +214/-4 Production growth largely relocates the existing runtime catalog and adds focused admission and recovery wiring; tests exercise package selection, lazy runtime admission, and redacted diagnostics.

Labels

Label changes:

No label changes.

Label justifications:

  • P1: The confirmed released-version skew prevents Codex-backed agent turns from replying until operator recovery.
  • merge-risk: 🚨 compatibility: Official Codex packages below 2026.9.7 become unavailable despite satisfying their declared API range; the maintainer-authored direction accepts this narrow tradeoff and preserves compatible older packages.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rank-up moves

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

  • Record sanitized Gateway or CLI output showing a published compatible Codex package below the host version remains usable, alongside the existing incompatible-package recovery case.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only; repair and merge need explicit maintainer commands such as @clawsweeper autofix or @clawsweeper automerge.

History

Review history (1 earlier review cycle)
  • reviewed 2026-10-11T06:11:51.377Z sha 9aba0ff :: needs maintainer review before merge. :: none

Reviewed October 11, 2026, 2:53 AM ET / 06:53 UTC (Revision 2).

Use the published Codex 2026.9.7 compatibility floor for admission rather than the host release cohort. Keep older compatible packages loadable while update and repair converge them. Refs #168930.
@steipete steipete changed the title fix(plugins): keep stale Codex runtimes unavailable after updates fix(plugins): reject known-incompatible Codex runtimes Oct 11, 2026
@steipete
steipete merged commit 5cb977c into main Oct 11, 2026
129 checks passed
@steipete
steipete deleted the upd/upd-l1543 branch October 11, 2026 07:00
RomneyDa pushed a commit that referenced this pull request Oct 12, 2026
…tes (#168930)

A partial update could leave @openclaw/codex 2026.9.5 installed on a newer host; its open-ended pluginApi range admitted it and every turn failed on the removed agent-harness-task-runtime SDK subpath. Version-bound official runtimes below a published compatibility floor (codex 2026.9.7) are now unavailable at admission with update repair / plugins update guidance; compatible older versions keep loading while update and repair converge them to the host cohort. plugins update now prints failure reasons. Fixes #168748, #168749. Refs #168498.

(cherry picked from commit 5cb977c)

Backport notes: test-only conflict in src/cli/failure-output.test.ts: the branch's update-reason test also covered non-JSON update; took this commit's table-driven plugins update test and kept a non-JSON update row so the branch coverage is preserved.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 12, 2026
…tes (openclaw#168930)

A partial update could leave @openclaw/codex 2026.9.5 installed on a newer host; its open-ended pluginApi range admitted it and every turn failed on the removed agent-harness-task-runtime SDK subpath. Version-bound official runtimes below a published compatibility floor (codex 2026.9.7) are now unavailable at admission with update repair / plugins update guidance; compatible older versions keep loading while update and repair converge them to the host cohort. plugins update now prints failure reasons. Fixes openclaw#168748, openclaw#168749. Refs openclaw#168498.
RomneyDa added a commit that referenced this pull request Oct 12, 2026
…170306)

Backport main PR #168930 to release/2026.10.3. Preserve the stable runtime
collector while moving official runtime policy to its plugin owner.

Backport-of: 5cb977c

Co-authored-by: Peter Steinberger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes commands Command implementations docs Improvements or additions to documentation merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

1 participant