Skip to content

fix(codex): restore Computer Use after desktop plugin replacement - #156556

Merged
shakkernerd merged 4 commits into
openclaw:mainfrom
bdjben:codex/fix-managed-unified-computer-use
Sep 25, 2026
Merged

shakkernerd merged 4 commits into
openclaw:mainfrom
bdjben:codex/fix-managed-unified-computer-use

Conversation

@bdjben

@bdjben bdjben commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes agent turns and heartbeats failing Computer Use readiness after a macOS desktop update replaces the legacy computer-use MCP plugin with unified-computer-use.

User Impact

Managed macOS agents can start ordinary turns and use Computer Use with the newer desktop distribution. The legacy default follows the replacement automatically, including an explicitly configured pluginName: "computer-use" with its default server name. Explicit custom identities and native MCP restrictions keep their configured behavior. The managed unified runtime exposes the computer surface; separate browser integrations retain their existing ownership.

Why This Change Was Made

The affected desktop ships a skills-only legacy plugin and a disabled unified MCP template. Registering the old plugin succeeds, but no legacy MCP server appears, so the turn fails before the model turn.

The existing managed marketplace producer now prepares the official unified plugin from the selected desktop's own runtime assets and the agent's isolated home and signed Computer Use service. Native installation and cache refresh consume that prepared source. Readiness and health monitoring share the effective server identity, and the existing source fingerprint owner refreshes copied scripts even when the plugin version stays the same.

The materialized wrapper also compares its plugin entry names with the selected source. A desktop update that adds a sibling plugin refreshes its source link even when the unified plugin content is unchanged; ownership and staged replacement checks retain their existing behavior.

This addresses provisioning and source freshness. Related #149437 covers the JavaScript readiness probe; #155448 changes ordinary-turn availability without restoring this missing runtime.

The official v2026.9.6 release (eb377ac) and main at 6a8547c on 2026-09-24 still publish the desktop plugin directory through symlinks and select the legacy computer-use plugin. Neither contains a producer for the replacement unified-computer-use runtime. This is a source comparison; the live before/after execution below was performed on 2026.9.5 and a patched main candidate, not an unmodified 2026.9.6 installation.

Evidence

Real installation: before

  • OpenClaw 2026.9.5 (ec9c1a1), macOS desktop 26.917.51856 build 10492, desktop-bundled Codex CLI 0.155.0-alpha.16.
  • Restarted the actual Gateway, waited at least five minutes, and used its normal agent RPC with a fresh diagnostic session and deliver: false.
  • Prompt: Reply exactly CU_READINESS_OK. Do not use tools or send messages.
  • The request exited 1 after 5.18 seconds, before a model turn:
UNAVAILABLE (retryable: false)
Codex Computer Use readiness failed: Computer Use is installed, but the computer-use MCP server is not available.

The preferred OAuth credential was valid with no active recorded cooldown or block. Element also visibly contained the same readiness error in Agent B's direct-message room that day. Agent labels are pseudonyms.

Real installation: after

  • Installed the actual combined main candidate fd972a4d6ff288fec7bfbb82fc4fd855eca4528a, containing this PR at 0f9bd631660f7d1730adc223fba054ebc5cd6504, on the same machine through the normal npm updater. This candidate also contains the independently reviewed auth and registry fixes from fix(auth): honor renewed shared profiles over stale agent copies #155584 and fix(plugins): allow registry refresh to recover stale discovery #155630; its base is c7ee253e2c4c083ca497c1f164c9524eccfeaee0.
  • Used the canonical package composition with bundled Codex, then the supported bundled-plugin selection command. The selected owner is bundled; all 20 Codex payload files and both compiled Computer Use runtime chunks match the built artifact. Existing Codex configuration and the saved stable-channel preference were preserved. There is no checkout symlink.
  • Artifact SHA-256: 205a05e6ac9c448f43d551cd84ee0969d37ce0d9db692a9db9fe9e314028d7e6. The package retains version 2026.9.5; the commit identifies this custom main build, not an official stable release.
  • The Gateway returned ready after startup. At 2026-09-23 13:59 UTC, a fresh ordinary Gateway agent request used native Computer Use to select Element and read its accessibility state. It completed in 27.74 seconds, with status ok and final text CU_TOOLS_OK.
  • The native record contains a successful, completed cua_repl/js call with a nonempty Element accessibility result. Private inspection verified an actual Element window, the selected room, and message controls in the 494-line accessibility state. Gateway receipt, stored session, Codex binding, native thread/turn and final marker correlate. The actual initialization handshake identifies the desktop-owned native Codex 0.155.0-alpha.16 in the agent-owned home. The binding selected the primary OAuth profile; this is runtime selection evidence, not a claim about an independently inspected billing account.
  • At 14:00 UTC, sent Reply exactly MATRIX_AFTER_OK_20260923. This is a diagnostic; do not use tools. through Element in Agent A's existing Matrix conversation. Element visibly received the linked agent reply MATRIX_AFTER_OK_20260923. No session reset was used for this test. The existing Matrix session and native completed turn correlate to that marker, and this Matrix run also selected the primary OAuth profile.

These results cover an actual native Computer Use execution and the existing Matrix message path. They do not claim that every agent or every Computer Use action was exercised.

Retained live installation proof at 2fb5149 (2026-09-25)

  • Built and installed PR revision 2fb514992c2b0fc9f3205a69fe3a77555fafed28 as a self-contained OpenClaw 2026.9.6 npm package with the bundled Codex plugin. The package integrity checker passed, and the tarball's dist/build-info.json and the live /opt/homebrew/lib/node_modules/openclaw/dist/build-info.json both identify this full commit. Artifact SHA-256: 5e92c850285bfa4d0dda7218c25f0ee1074b60596f64763b1e5c6c34c0c6ec3f.
  • Replaced the standard global npm installation and restarted its launchd Gateway. No state snapshot or full backup was made. The live package path is the npm installation, not a checkout symlink. Startup took longer than the CLI's 45-second wait while existing agent databases opened; /readyz subsequently reported ready: true with no failing components and no event-loop degradation. Gateway health reported ok: true, including Matrix connected.
  • Sent a fresh, non-delivering diagnostic through the ordinary Gateway agent command to Agent A with an explicit new session. It requested only a read of Element's accessibility state. The request completed with status ok and final marker NATIVE_CU_PR156556_OK. Its native Codex rollout contains a completed cua_repl/js call to cua.getApp("Element"), followed by a nonempty Element window/accessibility result. This proves execution on the actual installed PR head, without sending or changing a Matrix message. Agent labels are pseudonyms.
  • The saved updater preference remains stable. The live agent run logged a separate native prompt annotation would restore redacted evidence transcript-persistence warning after the native turn; the Computer Use call and final reply completed. That warning is not attributed to this PR.

Regression and static validation

  • The unchanged producer copied the disabled template; the materialization regression failed before the fix and passed afterward.
  • Additional red/green controls cover unused runtime assets with custom identities and same-version changes to plugin scripts.
  • At revision 2fb5149, the new test file passed 4/4, and the existing managed-marketplace suite passed 10/10. Coverage includes two isolated agent homes, installation/reinstallation from the prepared source, incomplete-runtime refusal, native-policy preservation, and generation freshness.
  • After merging current main and resolving its publisher refactor, the five affected Codex test files passed 195/195 in 58.00 seconds wall time (including 18.95 seconds for a cold compiled-worker preparation). The conflict resolution keeps unified-runtime freshness matching in main's publishManagedWrapper entry point.
  • On the earlier patch, the complete scoped static check passed all 27 stages, including production and test type graphs, dead-export checks, selected lint, ownership guards, and runtime import-cycle checks.
  • Independent ownership review and final exact-patch AutoReview were clean at P0/P1. Revision 2fb5149 also passed the focused plugin-contract check, the Codex startup and unified-runtime tests (8/8), and a local AutoReview with no P0-P2 findings. Relevant native installation, environment, and configuration-precedence contracts were verified against both 0.155.0-alpha.16 and 0.155.1 source.

The historical CI failure on 2fb5149 came from the newer main baseline's UpdateStepResult import in package-update-npm-pack.ts; #157659 repaired it in main. That failed run is retained as historical evidence, not reported as a pass.

Sibling refresh correction at 7ef7033

The publisher regression adds a sibling directory and marketplace entry without changing unified content, then loads the sibling manifest through the prepared marketplace's advertised source. It failed on 2fb5149 with ENOENT and passes with the freshness correction. The unified test file passes 5/5 (104 ms of test execution; 30.55 seconds total with compiled-worker preparation), including the existing isolated-home, custom-identity, native-policy, and incomplete-runtime controls. Formatting, focused syntax lint, and changed-file ratchets pass. The correction's independent AutoReview reports no P0–P2 findings.

The earlier installed macOS proof remains applicable to the unchanged runtime preparation and native launch contracts; no new live installation or Gateway restart was performed for this correction. Blacksmith Testbox verified the exact candidate tree 23898bd35b093684bb019eb02fc76c1de73e9ff8: 200/200 tests across six affected files passed in 44.79 seconds, and targeted type-aware lint passed with 0 warnings and 0 errors. The new sibling case took 12 ms remotely. Independent review of the complete publication and rollback owner also found no new defect. The normal PR CI run checks the integrated merge result; its status is reported in the PR checks.

Public evidence omits network addresses, room identifiers, account identifiers, and real agent names.

Desktop bundles can retain a skills-only computer-use plugin after moving the MCP server to unified-computer-use. Prepare the official unified launch descriptor in each managed home and use that source for native installation, cache refresh, readiness, and health checks.

Preserve custom identities, native MCP policy, legacy desktops, and separate browser plugins. Track the official source tree so same-version asset updates refresh the prepared plugin without modifying the desktop bundle or importing its user cache.

Validation: producer regression red/green, same-version hook refresh red/green, scoped Computer Use and auth-bridge tests, both extension type graphs, and the complete unskipped check-changed gate.
@clawsweeper

clawsweeper Bot commented Sep 23, 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 extensions: codex size: L labels Sep 23, 2026
@clawsweeper clawsweeper Bot added P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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 Sep 23, 2026
@clawsweeper

clawsweeper Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 25, 2026, 11:26 AM ET / 15:26 UTC (Revision 4).

ClawSweeper review

What this changes

The bundled Codex plugin prepares the newer desktop Computer Use runtime in isolated agent homes and refreshes its marketplace wrapper when the desktop plugin set changes.

Merge readiness

✅ Ready for maintainer review

Keep this PR open. Current main and the latest release still use the legacy marketplace wrapper, while the branch addresses the replacement desktop plugin. Installed macOS evidence shows a native Computer Use call completing after the fix; the latest sibling-refresh correction has focused regression coverage. No definite introduced defect was found.

Priority: P1
Reviewed head: 7ef7033b7d52732b99e88df9a72bbf40b7edb456

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Strong installed-runtime proof supports a focused plugin repair, while the newest refresh edge is supported by regression coverage rather than a second live run.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The changed Codex marketplace producer feeds the native app-server installation path. An installed macOS build at the earlier PR revision completed a normal Gateway agent request with a native cua_repl/js Computer Use call and nonempty Element state; the latest sibling-refresh addition has focused regression evidence but no separate live desktop-update replay. Existing installation state was carried through the reported package upgrade, and the generated wrapper is republished from its owned source.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The changed Codex marketplace producer feeds the native app-server installation path. An installed macOS build at the earlier PR revision completed a normal Gateway agent request with a native cua_repl/js Computer Use call and nonempty Element state; the latest sibling-refresh addition has focused regression evidence but no separate live desktop-update replay. Existing installation state was carried through the reported package upgrade, and the generated wrapper is republished from its owned source.
Evidence reviewed 6 items Current main still uses the legacy wrapper: The fetched main implementation links the selected desktop marketplace's plugin directory and has no unified-runtime preparation file.
Introduced runtime preparation: The pinned PR diff selects the unified plugin, validates the desktop runtime assets, and writes an isolated-home launch descriptor.
Sibling refresh and regression coverage: The wrapper compares source and prepared plugin names before reusing a materialized marketplace; the new test adds a sibling entry and verifies that its advertised source becomes readable.
Findings None None.
Security None None.

How this fits together

OpenClaw prepares an isolated Codex home before an agent turn. Codex app-server then discovers the prepared desktop plugin, installs or checks its MCP server, and exposes Computer Use to the turn.

flowchart LR
  A[Agent Computer Use settings] --> B[Selected macOS desktop]
  B --> C[Managed marketplace wrapper]
  A --> C
  C --> D[Codex app-server]
  D --> E[Computer Use readiness]
  E --> F[Agent turn]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +383, Tests +363, Docs +20. Total +766 across 12 files.

View PR surface stats
Area Files Added Removed Net
Source 6 450 67 +383
Tests 5 413 50 +363
Docs 1 22 2 +20
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 12 885 119 +766

Review metrics

Metric Value Why it matters
Code growth production +383 net lines, tests +363 net lines The production growth has a stated purpose: preparing the desktop-owned runtime and keeping its managed source current.

Technical review

Best possible solution:

Keep desktop runtime preparation and refresh in the Codex plugin, with isolated-home ownership and native MCP restrictions preserved across desktop updates.

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

Yes. An installed 2026.9.5 Gateway failed before the model turn, and current main retains the same legacy wrapper; an unmodified 2026.9.6 installation was not separately exercised.

Is this the best way to solve the issue?

Yes. Preparing the selected desktop's unified plugin in the existing managed marketplace owner is a focused repair, and the branch preserves custom identities and native policy checks.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 25d74027a95d.

Labels

Label changes:

No label changes.

Label justifications:

  • P1: The reported desktop update can stop managed macOS agent turns before Computer Use becomes available.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The changed Codex marketplace producer feeds the native app-server installation path. An installed macOS build at the earlier PR revision completed a normal Gateway agent request with a native cua_repl/js Computer Use call and nonempty Element state; the latest sibling-refresh addition has focused regression evidence but no separate live desktop-update replay. Existing installation state was carried through the reported package upgrade, and the generated wrapper is republished from its owned source.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed Codex marketplace producer feeds the native app-server installation path. An installed macOS build at the earlier PR revision completed a normal Gateway agent request with a native cua_repl/js Computer Use call and nonempty Element state; the latest sibling-refresh addition has focused regression evidence but no separate live desktop-update replay. Existing installation state was carried through the reported package upgrade, and the generated wrapper is republished from its owned source.

Evidence

What I checked:

  • Current main still uses the legacy wrapper: The fetched main implementation links the selected desktop marketplace's plugin directory and has no unified-runtime preparation file. (extensions/codex/src/app-server/computer-use-marketplace.ts:98, 25d74027a95d)
  • Introduced runtime preparation: The pinned PR diff selects the unified plugin, validates the desktop runtime assets, and writes an isolated-home launch descriptor. (extensions/codex/src/app-server/computer-use-unified.ts:24, 7ef7033b7d52)
  • Sibling refresh and regression coverage: The wrapper compares source and prepared plugin names before reusing a materialized marketplace; the new test adds a sibling entry and verifies that its advertised source becomes readable. (extensions/codex/src/app-server/computer-use-marketplace-unified.test.ts:155, 7ef7033b7d52)
  • Real behavior proof in the PR body: The contributor reports an installed macOS package at revision 2fb5149: a normal Gateway agent request completed a native cua_repl/js call, returned nonempty Element accessibility state, and finished successfully. An earlier installed candidate showed the before/after readiness failure and recovery. The later sibling-refresh correction was validated with a focused fixture, not another live installation. (2fb514992c2b)
  • Codex dependency contract: The sibling Codex source recognizes the reserved bundled marketplace path and its name. This is an affirmative dependency signal because the PR prepares a marketplace for Codex app-server to consume; the sibling README identifies the checkout as openai/codex. (codex-rs/core-plugins/src/marketplace_policy_tests.rs:479, be2951ea34f0)
  • Feature history: Main-branch history connects the managed marketplace and desktop-generation paths to earlier Computer Use work by Josh Avant and later Codex refactoring by Peter Steinberger; this is routing context, not proof that either introduced the reported failure. (extensions/codex/src/app-server/computer-use-marketplace.ts, a833ca972b55)

Likely related people:

  • joshavant: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Ben Badejo: 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.

History

Review history (3 earlier review cycles)
  • reviewed 2026-09-23T14:08:37.630Z sha 0f9bd63 :: needs changes before merge. :: none
  • reviewed 2026-09-24T22:54:52.076Z sha 2fb5149 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-24T23:18:49.642Z sha 2fb5149 :: needs maintainer review before merge. :: none

Benjamin Badejo added 2 commits September 25, 2026 01:19
…fied-computer-use

# Conflicts:
#	extensions/codex/src/app-server/computer-use-marketplace.ts
@shakkernerd
shakkernerd merged commit 07347ac into openclaw:main Sep 25, 2026
120 of 121 checks passed
@shakkernerd

Copy link
Copy Markdown
Contributor

Fixed: managed macOS Computer Use follows desktop plugin replacement while keeping the prepared marketplace current.

With thanks to @bdjben.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 26, 2026
…enclaw#156556)

Restore managed macOS Computer Use after desktop plugin replacement and keep sibling plugin sources available across marketplace updates.

Reviewed-by: @shakkernerd
Co-authored-by: Shakker <[email protected]>
roboclaw-bot added a commit that referenced this pull request Sep 27, 2026
Backport Telegram #157349: bb6bb77
Backport OpenCode #158056: beadb8c
Backport Codex #156556: 07347ac

Preserve Telegram replaceability and current-writer authority through every
network queue and repeated flood wait. Restore OpenCode v1/v2 catalog and
activity using the released 2.0.16 contract, isolated cwd and preserved
launcher resolution. Normalize the documented empty activity watermark.

Prepare the selected desktop's unified Computer Use artifacts without
preseeding a renamed cache identity. Effective native disable and MCP/tool
policy precede feature enablement and replacement installation.

The development-snapshot operation-ID/filter/flag accusations were disproven
against released tag 3a103fe0aff726a4edc7492f03f7b88195d9e4c9; do not migrate
working released APIs to an unrelated development contract.

Independent correction review and 55 focused cases pass; unchanged original
proof is retained. The identical marketplace selector moved to its existing
owner and the cache-policy regression to a standalone file for frozen budgets.
Their 23 boundary cases, lint, frozen ratchets and Madge pass.
Installed CLI, Telegram Test Server and signed macOS/TCC gaps remain explicit.
Publication is held by the prepared PR size-policy decision.

Co-authored-by: Ayaan Zaidi <[email protected]>
Co-authored-by: Ben Badejo <[email protected]>
Co-authored-by: Shakker <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: vyctorbrzezowski <[email protected]>
Co-authored-by: steipete <[email protected]>
Co-authored-by: jalehman <[email protected]>
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 P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L 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.

2 participants