Skip to content

fix(codex): keep newer Desktop app-servers eligible - #126450

Merged
jalehman merged 1 commit into
mainfrom
fix/codex-desktop-version-floor
Aug 19, 2026
Merged

jalehman merged 1 commit into
mainfrom
fix/codex-desktop-version-floor

Conversation

@jalehman

Copy link
Copy Markdown
Contributor

Related: #125882
Follow-up to #125883

AI-assisted: yes. I reviewed the implementation and its upstream Codex contract directly.

What Problem This Solves

Fixes an issue where users starting Codex Computer Use through Codex Desktop would again lose the Desktop runtime after a routine update beyond 0.148.0-alpha.15. OpenClaw treated that release-specific ceiling as an incompatibility and fell back to the managed 0.147.0 package before normal readiness and capability validation.

The ceiling was already stale when it merged: Codex had released 0.148.0-alpha.23.

Why This Change Was Made

The managed @openai/codex artifact remains exactly pinned to 0.147.0. External app-servers must still report valid SemVer at or above the stable 0.147.0 floor, but newer versions may initialize with the existing warning and proceed through normal startup, readiness, and required-operation validation.

This is an availability tradeoff, not a forward-compatibility guarantee. Upstream Codex initialization exposes the CLI build version through userAgent, but no server protocol/schema version or server-declared capability contract. OpenClaw also opts into Codex's explicitly unstable experimental API. A CLI-version ceiling therefore has no upstream compatibility semantics and guarantees recurring rejection as Desktop advances.

The separate selected-distribution provisioning/fallback invariant remains owned by #126080. This PR does not change provisioning or fallback mechanics; it removes only upper-bound-triggered fallbacks.

User Impact

Codex Desktop app-server releases newer than 0.148.0-alpha.15, including 0.148.0-alpha.23, remain selected long enough to run OpenClaw's normal readiness and Computer Use checks. Older, malformed, unversioned, and same-core prerelease versions remain rejected. Genuine runtime incompatibilities still surface through their normal startup or capability diagnostics.

Evidence

  • Failed first on merged main: the focused client suite rejected 0.148.0-alpha.23, 0.148.0, and 1.0.0 at the former maximum-version branch (3 failures; 40 tests passed).
  • Focused post-fix proof: 102/102 client and managed-fallback tests passed. Coverage confirms 0.148.0-alpha.23 remains the selected Desktop client without package fallback and retains rejection for missing, malformed, below-floor, and same-core prerelease versions.
  • pnpm check:changed passed, including extension typecheck, test typecheck, lint, import-cycle, dependency, formatting, and architecture guards.
  • pnpm build passed.
  • pnpm docs:list passed; all four Codex compatibility docs now describe the minimum-only admission policy.
  • Fresh Codex autoreview: 0 findings; patch correct with 0.98 confidence.
  • Direct upstream inspection: ../codex/codex-rs/app-server-protocol/src/protocol/v1.rs and ../codex/codex-rs/app-server/src/request_processors/initialize_processor.rs expose no server protocol version or server capability set; ../codex/codex-rs/login/src/auth/default_client.rs builds userAgent from CARGO_PKG_VERSION; ../codex/codex-rs/app-server/README.md explicitly gives experimental APIs no backward-compatibility guarantee. The initialize files are unchanged from rust-v0.147.0 through rust-v0.148.0-alpha.23 while V2 surfaces continue evolving.
  • Existing macOS production proof on fix(codex): Computer Use fails when Desktop bundles a newer app-server #125883 exercised the restored floor-only policy through Desktop 0.148.0-alpha.15, initialize, readiness, thread/start, a normal turn, and native Computer Use operations. This follow-up adds no new live Desktop run.
  • Delta: production -12 lines, tests -24, docs -3; no dependency or lockfile change.

@clawsweeper

clawsweeper Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation extensions: codex labels Aug 19, 2026
@jalehman
jalehman marked this pull request as ready for review August 19, 2026 22:01
@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Aug 19, 2026
@clawsweeper clawsweeper Bot added 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. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 19, 2026
@clawsweeper

clawsweeper Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed August 19, 2026, 6:08 PM ET / 22:08 UTC.

ClawSweeper review

What this changes

The PR removes the maximum accepted Codex app-server version so newer Desktop, custom, and remote servers can initialize instead of falling back solely because their SemVer is newer.

Merge readiness

⚠️ Ready for maintainer review - 5 items remain

Keep this maintainer PR open for a compatibility-policy decision: it changes all external Codex server admission, but the required direct upstream Codex inspection and a real newer-Desktop flow are unavailable in this review environment.

Priority: P1
Reviewed head: 124823feca312da45b2020e033a0788f99e0eca1
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and net-negative, but its broadened experimental-runtime policy lacks the direct upstream and real-flow evidence needed for a higher rating.
Proof confidence 🌊 off-meta tidepool Not applicable: The repository metadata identifies this as a maintainer PR; the cited earlier Desktop run is useful context but does not independently demonstrate this head's 0.148.0-alpha.23 change.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The repository metadata identifies this as a maintainer PR; the cited earlier Desktop run is useful context but does not independently demonstrate this head's 0.148.0-alpha.23 change.
Evidence reviewed 6 items Changed admission rule: The PR removes the upper-bound comparison, so every parseable version at or above 0.147.0, including the added 1.0.0 case, passes initialize admission.
Later operations are not startup capability validation: Shared startup performs initialize, installs local runtime handlers, and applies auth; conversation setup sends thread/start only later, so an accepted incompatible server can fail after selection rather than at the admission gate.
Current-main predecessor policy: Current main retains the 0.148.0-alpha.15 ceiling and documents that raising it requires equivalent upstream protocol and live Computer Use proof.
Findings 1 actionable finding [P1] Keep forward admission tied to a verified compatibility boundary
Security None None.

Live Verification

Command: pnpm openclaw --help

Result: PASS (completed)

pnpm openclaw --help
runner@runnervm76f27:/tmp/clawsweeper-live-proof-126450-Rg27Hg/target$ pnpm openclaw --help
$ node scripts/run-node.mjs --help
pnpm openclaw --help
[openclaw] Building TypeScript (dist is stale: missing_build_stamp - build stamp missing).
[openclaw] Building bundled plugin assets.
[canvas] build: node scripts/bundle-a2ui.mjs
[log] ‹DIR›/a2ui.bundle.js  chunk │ size: 399.96 kB
[log] ‹DIR›/a2ui-v0.9.bundle.js  chunk │ size: 615.66 kB
[log]
[success] rolldown v1.2.0 Finished in 110.39 ms
[diffs] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts curated
[diffs-language-pack] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts full
[discord] build: node --import tsx ../../scripts/build-discord-activity-sdk.mts
[tsdown-build] invocation 1/2 finished in 0.7s
node_modules/web-tree-sitter/web-tree-sitter.js (2343:30) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2343:31 ]
      │
 2343 │           ASM_CONSTS[start] = eval(func);
      │                               ──┬─
      │                                 ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

node_modules/web-tree-sitter/web-tree-sitter.js (2366:32) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2366:33 ]
      │
 2366 │           moduleExports[name] = eval(func);
      │                                 ──┬─
      │                                   ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

node_modules/playwright-core/lib/coreBundle.js (65821:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65821:29 ]
       │
 65821 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

node_modules/playwright-core/lib/coreBundle.js (65828:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65828:29 ]
       │
 65828 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

[tsdown-build] invocation 2/2 finished in 13.0s
[plugin-control-plane-loads] verified 36 built modules with native require and checked doctor closures
runtime-postbuild: 10 phases completed in 3951ms (slowest: built plugin control-plane loads 3316ms)

OpenClaw 2026.8.1 (124823f) — All your chats, one OpenClaw.

Usage: openclaw [options] [command]

Options:
  --container ‹name›   Run the CLI inside a running Podman/Docker container named ‹name› (default: env OPENCLAW_CONTAINER)
  --dev                Dev profile: isolate state under ~/.openclaw-dev, default gateway port 19001, and shift derived ports (browser/canvas)
  -h, --help           Display help for command
  --log-level ‹level›  Global log level override for file + console
… output truncated …

Assertions:

  • PASS expect_output: Usage: openclaw

How this fits together

The Codex plugin selects a managed or external app-server, validates its initialize handshake, then uses that process for authentication and later thread and Computer Use operations. This change broadens the initialize-stage admission rule while later runtime operations remain separate.

flowchart LR
A[Desktop custom or remote server] --> B[Initialize handshake]
B --> C[SemVer admission]
C --> D[Auth and runtime handlers]
D --> E[Thread and Computer Use operations]
C --> F[Managed fallback when rejected]
Loading

Decision needed

Question Recommendation
Should OpenClaw admit every future external SemVer release, including custom and remote servers, or only the verified Desktop selection while a real protocol-capability admission contract is designed? Scope Desktop admission and prove it: Accept the known newer Desktop build on the managed Desktop path while retaining a bounded or contract-backed rule for custom and remote app-servers.

Why: The code cannot infer whether a CLI version is an adequate compatibility signal for an explicitly experimental upstream protocol, and the broader external-runtime policy affects existing fallback behavior.

Before merge

  • Keep forward admission tied to a verified compatibility boundary (P1) - This change makes every newer external server—including 1.0.0—pass initialize, but shared startup only initializes and applies auth; thread/start is performed later. The previous main policy explicitly required upstream protocol and live-flow proof before extending the ceiling, so scope the relaxation to the verified Desktop path or replace the release ceiling with an authoritative protocol or capability check.
  • Resolve merge risk (P1) - Merging admits unverified future external app-servers, including custom and remote 1.x servers, while the selected process is not capability-tested before later thread operations.
  • Resolve merge risk (P2) - The prior managed Desktop fallback on an above-ceiling version is removed without independent upstream-source proof or a real Desktop 0.148.0-alpha.23 flow at this PR head.
  • Complete next step (P2) - A protected maintainer PR needs an explicit compatibility-policy choice and direct upstream evidence before merge.

Findings

  • [P1] Keep forward admission tied to a verified compatibility boundary — extensions/codex/src/app-server/client.ts:1016
Agent review details

Security

None.

PR surface

Source -12, Tests -24, Docs -3. Total -39 across 8 files.

View PR surface stats
Area Files Added Removed Net
Source 2 3 15 -12
Tests 2 14 38 -24
Docs 4 17 20 -3
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 8 34 73 -39

Review metrics

Metric Value Why it matters
Production versus test delta production +3/-15 (net -12); tests +14/-38 (net -24); docs +17/-20 (net -3) The bug-fix removes the runtime ceiling rather than adding code, but it materially broadens an external compatibility policy.

Stored data model

Persistent data-model change detected: vector/embedding metadata: docs/plugins/codex-harness-reference.md. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Add a compatibility boundary before merge (recommended)
    Use an upstream-backed protocol or capability gate, or narrowly retain the existing bound outside the selected Desktop flow, then show the newer Desktop path reaching a real operation.
  2. Accept broad external-version support
    Merge the floor-only policy only if maintainers explicitly accept that external future versions may fail after initialization instead of taking the former version-based fallback.

Technical review

Best possible solution:

Replace the release-number ceiling with an authoritative protocol or capability contract, or scope the relaxation to the selected Desktop path and prove the newer Desktop initialize, thread, and Computer Use flow.

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

Yes, source-reproducible: current main rejects a parseable version above 0.148.0-alpha.15 at the initialize gate; this read-only review did not execute the harness.

Is this the best way to solve the issue?

No—not yet: accepting every newer external release is broader than the reported Desktop case and lacks independently checked upstream protocol and real-flow evidence.

Full review comments:

  • [P1] Keep forward admission tied to a verified compatibility boundary — extensions/codex/src/app-server/client.ts:1016
    This change makes every newer external server—including 1.0.0—pass initialize, but shared startup only initializes and applies auth; thread/start is performed later. The previous main policy explicitly required upstream protocol and live-flow proof before extending the ceiling, so scope the relaxation to the verified Desktop path or replace the release ceiling with an authoritative protocol or capability check.
    Confidence: 0.87

Overall correctness: patch is incorrect
Overall confidence: 0.84

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P1: This affects the Codex Desktop and app-server workflow used for agent and Computer Use runs.
  • add merge-risk: 🚨 compatibility: The PR changes which external app-server versions existing Desktop, custom-command, and remote configurations may run.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The repository metadata identifies this as a maintainer PR; the cited earlier Desktop run is useful context but does not independently demonstrate this head's 0.148.0-alpha.23 change.

Label justifications:

  • P1: This affects the Codex Desktop and app-server workflow used for agent and Computer Use runs.
  • merge-risk: 🚨 compatibility: The PR changes which external app-server versions existing Desktop, custom-command, and remote configurations may run.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: The repository metadata identifies this as a maintainer PR; the cited earlier Desktop run is useful context but does not independently demonstrate this head's 0.148.0-alpha.23 change.

Evidence

What I checked:

Likely related people:

  • TheAngryPit: Authored the predecessor pull request that established the current floor-and-ceiling admission policy. (role: author of merged predecessor; confidence: high; commits: e00f86019827; files: extensions/codex/src/app-server/client.ts, extensions/codex/src/app-server/version.ts)
  • Vitor Cepeda Lopes: Authored the current-main merge commit for the predecessor version-admission change. (role: recent area contributor; confidence: high; commits: e00f86019827; files: extensions/codex/src/app-server/client.ts, extensions/codex/src/app-server/version.ts)
  • steipete: Feature history shows repeated Codex app-server lifecycle and SemVer work, including the SemVer comparison refactor. (role: long-term area contributor; confidence: medium; commits: 111b3a157ed1; files: extensions/codex/src/app-server/client.ts, extensions/codex/src/app-server/shared-client.ts)

Rank-up moves

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

  • Inspect the exact upstream Codex initialize and protocol contract from a local Codex checkout.
  • Provide a redacted Desktop 0.148.0-alpha.23 run through initialize, thread start, and a Computer Use operation.
  • Record the maintainer decision on whether custom and remote servers share the Desktop admission policy.

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.

@jalehman
jalehman merged commit 841f25e into main Aug 19, 2026
231 of 232 checks passed
@jalehman
jalehman deleted the fix/codex-desktop-version-floor branch August 19, 2026 22:36
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 20, 2026
pash-openai added a commit that referenced this pull request Aug 21, 2026
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 extensions: codex maintainer Maintainer-authored PR 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: S status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant