Skip to content

fix(codex): refresh stale isolated Computer Use bundles - #126080

Merged
jalehman merged 6 commits into
openclaw:mainfrom
bdjben:codex/fix-isolated-computer-use-bundle-refresh
Aug 19, 2026
Merged

jalehman merged 6 commits into
openclaw:mainfrom
bdjben:codex/fix-isolated-computer-use-bundle-refresh

Conversation

@bdjben

@bdjben bdjben commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Important

Rebased onto current main after #125883 and #126450 landed. This PR now
contains only the signed native Computer Use bundle synchronization,
containment, tests, and documentation. External app-server admission is not
part of this diff. The earlier composite production run remains historical
behavior proof for the refresh path described below.

What Problem This Solves

Users running Codex with isolated per-agent homes can lose working Computer Use
after the selected ChatGPT or Codex desktop distribution is updated.

OpenClaw previously treated any executable agent-local Computer Use client as
permanently reusable. An isolated agent could therefore have all of these at
the same time:

  • a current Codex app-server;
  • a current computer-use plugin cache;
  • a current global Computer Use service;
  • an older, complete, validly OpenAI-signed native client under its private
    CODEX_HOME.

The plugin could initialize and expose genuine Computer Use tools, but native
invocation could still fail at the client/service boundary. In the real
installation below, a genuine get_app_state invocation returned:

Computer Use server error -10000: Sender process is not authenticated

The affected bundle was neither corrupt nor unsigned. It was a validly signed
older generation, so the former executable-only predicate considered it
healthy and never refreshed it.

Fix

This change makes the existing Computer Use provisioning owner synchronize the
native distribution under an isolated CODEX_HOME with the selected trusted
desktop distribution before a cold app-server startup.

Platform scope

This changes only OpenClaw's existing macOS native Computer Use provisioning
path. The synchronized artifact is a macOS .app, and the implementation
returns unsupported before source discovery or inspection whenever
platform !== "darwin". Linux and Windows therefore do not invoke codesign,
plutil, Apple trust requirements, or .app copying, and their existing Codex
startup behavior is unchanged. A focused non-macOS regression test covers that
early-exit contract.

Selected source and signed-identity contract

OpenClaw now:

  1. resolves the existing ordered desktop candidates before deciding that the
    isolated target is reusable;
  2. prefers assets associated with the selected appServer.command when those
    assets are available and trusted, while preserving the resolver's existing
    ordered fallback candidates;
  3. requires the outer service and nested client to satisfy explicit Apple code
    requirements:
    • Apple generic anchor;
    • OpenAI Team Identifier 2DC432GLL2;
    • outer bundle identifier com.openai.sky.CUAService;
    • nested client identifier com.openai.sky.CUAService.cli;
  4. runs strict signature verification for both bundles and deep verification
    for the outer service;
  5. compares the complete identity consumed by this integration:
    • outer bundle identifier;
    • outer CFBundleShortVersionString;
    • outer CFBundleVersion;
    • outer CDHash;
    • outer Team Identifier;
    • nested client bundle identifier;
    • nested client CDHash;
    • nested client Team Identifier;
  6. reuses the isolated copy only when that identity exactly matches the
    selected signed source.

This is intentionally synchronization, not a numeric "newer version wins"
policy. The compatibility/provenance unit is the selected Desktop distribution.

The user-scoped ~/.codex/computer-use copy is used below only as corroborating
evidence. It is not promoted to the provisioning source. The provisioning
owner now excludes both homeScope: "user" and every explicit CODEX_HOME
override from native bundle replacement, so synchronization is limited to the
standard OpenClaw-owned isolated home.

Staging, rollback, and races

For a missing, incomplete, or mismatched target, OpenClaw:

  1. copies the selected source to a staging directory on the target filesystem;
  2. verifies that staging has the exact signed identity inspected from source;
  3. re-inspects source before the swap, detecting a Desktop update during copy;
  4. snapshots the original target's filesystem ownership and signed identity;
  5. moves the original target to a rollback path;
  6. moves the verified staged tree into the target path;
  7. verifies the installed target before removing the rollback copy.

Each rename is atomic, but the complete replacement is deliberately described
as a staged swap rather than a single atomic exchange: there is a brief interval
between moving the old target aside and installing the staged target.

Failures are conservative:

  • a staged/source mismatch is rejected before the target is touched;
  • an unchanged stale or incomplete target can be replaced;
  • a concurrent installer that already installed the selected identity is kept;
  • an unexpected concurrent generation is preserved instead of overwritten;
  • a failed installed target is removed only when it is still the staged
    filesystem tree owned by this invocation;
  • the previous target is restored when this invocation still owns the empty
    target path;
  • user-scoped and explicitly configured Codex homes never enter this native
    bundle replacement path;
  • the rest of the isolated CODEX_HOME is never replaced or shared.

Owned-path containment

The caller supplies the effective agent directory as the trusted ownership
boundary for native-service provisioning. Before source or target inspection,
OpenClaw rejects a symlinked ownership root, isolated Codex home,
computer-use parent, or final service-app target. Missing owned descendants
are created one component at a time and then revalidated as real directories.

The transaction captures the canonical service parent and its device/inode/real
path identity, derives staging and backup paths from that canonical parent, and
revalidates the parent and staging identities around copy, rename, rollback, and
cleanup operations. If the owned path is rebound, publication stops and path-based
rollback or cleanup is skipped rather than following the replacement path.
Aliases above the caller-designated agent-directory boundary retain their existing
compatibility; user-scoped homes and explicit CODEX_HOME overrides remain outside
native bundle replacement.

Outcomes now distinguish installed, refreshed, already_current,
source_missing, and unsupported.

Lifecycle and performance boundary

Synchronization remains a cold app-server startup preflight.

Within one Gateway process:

  • concurrent calls for the same target and selection share one operation;
  • calls for the same target but different selections serialize and re-evaluate;
  • a successful synchronization is cached for that exact target/selection,
    avoiding repeated codesign and plutil work on ordinary turns;
  • completed synchronization state is held in a bounded 64-entry LRU; eviction
    only causes a later trusted reinspection and never mutates the target;
  • changing selection invalidates the previous completed selection, including
    when the new selection subsequently fails;
  • missing-source results and failures are not cached.

This PR intentionally does not poll Desktop files while a Gateway/app-server
client remains warm, invalidate an active thread, or restart the Gateway.
After ChatGPT or Codex Desktop updates, the documented invalidation boundary is
a Gateway restart followed by cold app-server startup.

User impact

Operators can retain per-agent CODEX_HOME isolation without manually deleting
native bundles or sharing the entire user-scoped Codex home. After a Desktop
update and Gateway restart, a subsequently cold-started isolated agent keeps a
matching bundle, installs a missing one, or refreshes a complete-but-mismatched
signed generation while preserving auth, config, plugin state, and threads.
User-scoped homes and explicit CODEX_HOME overrides retain ownership of their
existing native service app.

There is no new configuration option, dependency, public plugin API, persistent
sidecar state, homeScope change, or automatic Gateway restart.

Evidence

Real macOS production proof of the refresh path

Complete line-oriented redacted artifact:
comment 5336833505
(SHA-256 dbd189736518040a34a1bbe169acdfeda6fa9846e33f26c5793324d60d7df1fb).

Production exercised refresh implementation head
fb0bf42c94e66fab35e71fa2357ca4694a872bb2, which is an ancestor of
current PR head
18dd3db77a093244aa073fe58041e04cd8217e0f. The current-head delta adds owned-path containment and
focused regression coverage; it does not change the signed source-selection,
identity-comparison, or native MCP behavior exercised below. At the tested
refresh head, auth-bridge.ts and computer-use-service.ts were object-identical
to the running production build:

auth-bridge.ts:
  tested head  f2a47a3ed1b0a1168f2fdf3212064566c4a950ee
  tested build f2a47a3ed1b0a1168f2fdf3212064566c4a950ee

computer-use-service.ts:
  tested head  7fca14fcb64e5fda60f53117cab903c42f61bf71
  tested build 7fca14fcb64e5fda60f53117cab903c42f61bf71

An ordinary cold acquisition of an isolated CODEX_HOME produced this signed
generation transition without a manual copy, repair command, or intervening
Gateway restart:

selected trusted source:
  build:                            1000761
  outer CDHash:                     f4fcdc11ff65b810195ae7119d56021c4e92a07d
  nested CDHash:                    099beab9164eaa8dc1dd6288210cac38a7a4d9e7
  OpenAI Team/bundle requirements:  PASS

isolated target before:
  complete, executable, strictly signed
  build:                            1000502
  outer CDHash:                     2ce8ac267121a9035983fbdfba42963a1f87d482
  nested CDHash:                    3c3b8f4061cc8037124bfafda3c99aab6aefb837

isolated target after cold acquisition:
  build:                            1000761
  outer and nested inodes:          changed
  outer/nested hashes:              MATCH selected source
  signature and Team/bundle checks: PASS
  staging artifacts:                0
  backup artifacts:                 0

The refreshed client then ran from the same isolated CODEX_HOME. The selected
Desktop app-server (codex-cli 0.148.0-alpha.15) initialized OpenClaw's V2
thread and real computer-use MCP path, after which the same production turn
recorded:

computer-use/get_app_state(TextEdit)  Ok; CUA App Version 1000761
computer-use/type_text(TextEdit)      Ok; entered all four requested lines
computer-use/get_app_state(TextEdit)  Ok; accessibility state and screenshot
                                          contained all four lines

native Computer Use results:          3 Ok / 0 Error
Computer Use failures or timeouts:    0
AppleScript/shell/browser/node-tool substitutions: 0
Gateway PID after operation:          unchanged
surrounding isolated home:            preserved

This demonstrates the changed behavior end to end: the complete but stale,
validly OpenAI-signed isolated bundle was synchronized to the selected trusted
generation before client launch, isolation was preserved, and the refreshed
native client successfully performed and visibly verified real Computer Use
operations. The linked artifact retains the exact timestamps, signed identities,
inode/hash transition, process tree, initialization records, native tool records,
visible TextEdit result, cleanup checks, preservation checks, and post-operation
service health.

Pre-fix code contract

At the composite base,
extensions/codex/src/app-server/computer-use-service.ts returned
already_installed as soon as the nested executable passed X_OK. That return
happened before desktop candidates were resolved and before source/target
identity inspection.

The old test encoded the same behavior as:

reuses a complete home-owned client without consulting desktop sources

The selected-source resolver already existed in
extensions/codex/src/app-server/desktop-app-paths.ts; this PR keeps that
selection policy and fixes the provisioning decision that consumes it.

Provisioning remains in auth-bridge.ts before a new isolated app-server is
launched. Warm acquisition can return before that preflight, which is why this
change claims a cold-start repair rather than hot filesystem polling.

BEFORE: real production installation

OpenClaw runtime base:
  d5f8d87ec72b383b6318d5183c6c33f38bce5316

Composition:
  #125883 exact head: e8a5035ca6bf2604665aad6c54d2c346221bc3a6
  #125362 exact head: 77f4df4e36dc5aa8d50d9c26c94aa1e2e7b3c3bc

Home scope:
  isolated per-agent CODEX_HOME

Isolated homes inspected:
  6

The six production agent homes are labeled agent1 through agent6 below.
Only agent names and private path prefixes were replaced. Version/build values,
bundle IDs, Team IDs, CDHashes, signature results, timestamp, native method,
elapsed time, and native error are exact observations.

Component Version Build Outer CDHash Nested client CDHash
Selected Desktop source 26.817.1000761 1000761 f4fcdc11ff65b810195ae7119d56021c4e92a07d 099beab9164eaa8dc1dd6288210cac38a7a4d9e7
User-home reference 26.817.1000761 1000761 f4fcdc11ff65b810195ae7119d56021c4e92a07d 099beab9164eaa8dc1dd6288210cac38a7a4d9e7
agent1 isolated home 26.721.1000502 1000502 2ce8ac267121a9035983fbdfba42963a1f87d482 3c3b8f4061cc8037124bfafda3c99aab6aefb837
agent2 isolated home 26.721.1000502 1000502 2ce8ac267121a9035983fbdfba42963a1f87d482 3c3b8f4061cc8037124bfafda3c99aab6aefb837
agent3 isolated home 26.721.1000502 1000502 2ce8ac267121a9035983fbdfba42963a1f87d482 3c3b8f4061cc8037124bfafda3c99aab6aefb837
agent4 isolated home 26.721.1000502 1000502 2ce8ac267121a9035983fbdfba42963a1f87d482 3c3b8f4061cc8037124bfafda3c99aab6aefb837
agent5 isolated home 26.721.1000502 1000502 2ce8ac267121a9035983fbdfba42963a1f87d482 3c3b8f4061cc8037124bfafda3c99aab6aefb837
agent6 isolated home 26.721.1000502 1000502 2ce8ac267121a9035983fbdfba42963a1f87d482 3c3b8f4061cc8037124bfafda3c99aab6aefb837

All eight rows passed both applicable strict OpenAI code requirements. Every
row reported:

outer bundle identifier:  com.openai.sky.CUAService
nested bundle identifier: com.openai.sky.CUAService.cli
Team Identifier:          2DC432GLL2
outer requirement:        PASS
nested requirement:       PASS

The failure therefore involved an older valid OpenAI-signed generation being
reused solely because its executable existed.

The invoking isolated home's plugin cache had already advanced while its native
application remained at build 1000502. A genuine invocation then produced:

timestamp: 2026-08-18T22:09:42.047Z
plugin:    computer-use@openai-bundled
method:    get_app_state
elapsed:   approximately 49 ms
result:    Computer Use server error -10000:
           Sender process is not authenticated

The request payload and user prompt are intentionally omitted. This is strong
mixed-generation evidence and makes that mismatch the leading mechanism. The
private native authentication handshake is not public, so this PR does not
claim mathematically proven causality before the post-install test below.

Focused verification

node scripts/run-vitest.mjs extensions/codex/src/app-server/computer-use-service.test.ts

Test Files  1 passed
Tests       19 passed
Duration    8.96s

The suite covers:

  1. missing-target installation;
  2. exact signed-identity reuse;
  3. process-lifetime successful-sync reuse without reinspection/copy;
  4. bounded completed-sync eviction and safe reinspection;
  5. old-selection cache invalidation after a different selection fails;
  6. complete but stale validly signed generation refresh;
  7. missing or untrusted source preservation;
  8. incomplete target replacement;
  9. staged identity mismatch rollback and cleanup;
  10. same-generation concurrent winner preservation;
  11. unexpected concurrent-generation preservation;
  12. different-selection serialization and A -> B -> A refresh;
  13. non-macOS behavior;
  14. selected app-server source preference;
  15. symlinked ownership-root rejection without external mutation;
  16. symlinked isolated-home rejection without external mutation;
  17. symlinked computer-use parent rejection without external mutation;
  18. symlinked final service-target rejection without following it;
  19. parent-rebind detection with safe publication and cleanup refusal.

The stale-generation regression fails against the pre-fix contract: old code
returns already_installed, never consults the source, and leaves build
1000502 in place.

Combined focused bridge verification:

Test Files  2 passed
Tests       110 passed

The bridge suite includes explicit regressions proving that auto-install does
not invoke native service replacement for either homeScope: "user" or an
explicit CODEX_HOME, while retaining the positive isolated-home case.

Additional checks:

focused Vitest (2 files / 110 tests)              PASS
full repository `check:test-types`                 PASS
oxfmt --check (6 changed files)                    PASS
oxlint (5 changed TypeScript files)                PASS
max-lines and assertion-safety ratchets            PASS
git diff --check                                   PASS

The live macOS codesign route and explicit Team/bundle requirements were
also exercised directly against current and stale signed real distributions,
producing the results above.

AFTER: production restart, on-demand refresh, and real native operation

Runtime and refresh-head provenance

The operator restarted the production Gateway after installing refresh implementation
head fb0bf42c94e66fab35e71fa2357ca4694a872bb2 as a parent of integration commit
d43c92193777860da8b249d7ee0dd8af90c464c4. Current PR head
18dd3db77a093244aa073fe58041e04cd8217e0f retains that functional path and adds the
owned-path containment
described and regression-tested above.

The running bundle identifies its immediately preceding production integration as:

version:  2026.8.1
commit:   fd501f91776fb0a4513b18a2fb60ced39fb3ff46
build ID: 2026.8.1-fd501f91776f-2026-08-19T00-16-36.234Z

The only source difference between tested refresh head fb0bf42 and that emitted runtime
is the final test-only bounded-cache guard in computer-use-service.test.ts. The
production TypeScript and emitted refresh behavior under test are byte-identical to that
tested head. The production composite also contains exact
parent head e8a5035ca6bf2604665aad6c54d2c346221bc3a6 and the separately tested Matrix
head 77f4df4e36dc5aa8d50d9c26c94aa1e2e7b3c3bc.

The new Gateway process started at 2026-08-19 04:32:09.833 +03:00, became ready at
04:39:28.499, and remained the same PID through the proof. No additional restart,
manual bundle replacement, or direct filesystem repair was performed.

Post-restart, pre-request baseline

At 2026-08-19 05:01:46 +03:00:

plugins.entries.codex.config.appServer.command: absent
plugins.entries.codex.config.appServer.homeScope: absent
effective ordinary harness home scope: agent
computerUse.enabled: true
computerUse.autoInstall: true
computerUse.autoRepair: true
managed selection order: desktop-first
temporary staging/backup artifacts: 0

The selected app-server was the ChatGPT Desktop executable:

/Applications/ChatGPT.app/Contents/Resources/codex
codex-cli 0.148.0-alpha.15

The selected signed Computer Use source was:

<ChatGPT.app>/Contents/Resources/cua_node/lib/node_modules/@oai/sky/Codex Computer Use.app
version/build:          26.817.1000761 / 1000761
outer identifier:       com.openai.sky.CUAService
nested identifier:      com.openai.sky.CUAService.cli
Team Identifier:        2DC432GLL2
outer CDHash:            f4fcdc11ff65b810195ae7119d56021c4e92a07d
nested client CDHash:    099beab9164eaa8dc1dd6288210cac38a7a4d9e7
nested client SHA-256:   9d55690c0aee43e006f6b1304da80bf8e3f89f6209ca1d823e43a8b836a24057
strict signature checks: PASS

One isolated production home, sanitized here as agent1, provided the clean refresh
control. It had no running app-server/client and still contained the older complete,
validly signed generation:

version/build:          26.721.1000502 / 1000502
outer inode:            83063031
nested client inode:    83063268
outer CDHash:            2ce8ac267121a9035983fbdfba42963a1f87d482
nested client CDHash:    3c3b8f4061cc8037124bfafda3c99aab6aefb837
nested client SHA-256:   4222fbefbde6e2ce3713fb0b28a9ab0dd6463fcf20db6ef74817d69df84bf5a9
Team Identifier:        2DC432GLL2

That is the exact state that current main incorrectly treats as reusable solely because
the nested executable exists.

On-demand signed-generation transition

At 05:05:37.057, an ordinary production VoiceClaw request selected agent1 and caused
its cold isolated app-server acquisition. No internal repair command or status probe was
issued. The request was a benign visible-GUI task: create a new TextEdit document, enter
a four-sentence poem, and verify it.

The PR refreshed only that isolated home before its native client started:

Field Before After Selected source
Build 1000502 1000761 1000761
Outer inode 83063031 112654392 separate Desktop source inode
Nested client inode 83063268 112654506 separate Desktop source inode
Outer CDHash 2ce8ac267121a9035983fbdfba42963a1f87d482 f4fcdc11ff65b810195ae7119d56021c4e92a07d f4fcdc11ff65b810195ae7119d56021c4e92a07d
Nested CDHash 3c3b8f4061cc8037124bfafda3c99aab6aefb837 099beab9164eaa8dc1dd6288210cac38a7a4d9e7 099beab9164eaa8dc1dd6288210cac38a7a4d9e7
Nested SHA-256 4222fbef...bf5a9 9d55690c...a24057 9d55690c...a24057

Both the installed outer app and nested client passed strict codesign verification and
the explicit OpenAI bundle-ID/Team-ID requirements. After completion:

.service-app.staging-* count: 0
.service-app.backup-* count: 0

No staging, backup, .bak, or synchronization debris remained under any of the six
isolated Computer Use directories.

The resulting process tree proved that isolation was retained:

Gateway
  -> /Applications/ChatGPT.app/Contents/Resources/codex app-server --listen stdio://
       CODEX_HOME=<agent1-isolated-home>
       -> <agent1-isolated-home>/computer-use/Codex Computer Use.app/
          Contents/SharedSupport/SkyComputerUseClient.app/Contents/MacOS/
          SkyComputerUseClient mcp
       -> second scoped SkyComputerUseClient mcp

Both clients executed from the refreshed isolated build 1000761; their working
directory was the matching isolated plugin cache
computer-use/1.0.1000761. The already-running signed user-scope native service remained
owned by ChatGPT. No new user-scope service was installed or replaced.

Real Computer Use behavior

The same production turn then used the real computer-use@openai-bundled MCP surface:

Local time (+03:00) Native operation Result
05:05:55–05:05:57.493 computer-use/get_app_state on TextEdit Ok; reported CUA App Version: 1000761, new Untitled window, focused empty text area
05:06:02–05:06:04.329 computer-use/type_text Ok; entered four sentences
05:06:02–05:06:04.436 second computer-use/get_app_state Ok; accessibility state and screenshot contained all four sentences

The production task completed successfully at 05:06:14.154 after 37.097s; the Codex
turn itself reported 29.659s. Its final answer accurately stated that the new TextEdit
document had been created, populated, and visibly verified.

Negative assertions from the complete rollout:

OpenClaw node computer tool: not called
computer.act / screen.snapshot: not called
AppleScript / osascript: not called
shell UI automation: not used
managed browser: not used
Computer Use MCP failures/timeouts: 0
fallback after Computer Use failure: none
old -10000 sender-authentication error: absent
old -10013 client/server mismatch error: absent

The only shell command in the turn read the installed Computer Use skill instructions;
the GUI work itself was performed by the three native Computer Use MCP calls above.

This also directly exercises the stacked runtime-admission behavior against the exact
Desktop runtime present on this Mac: codex-cli 0.148.0-alpha.15 initialized, exposed
the expected Computer Use tools, and completed real get_app_state, type_text, and
verification calls. This is evidence for that exact newer Desktop runtime; it does not
claim an unbounded protocol guarantee for every possible future version.

Isolated-home preservation

The synchronization did not replace the broader isolated home. Pre-existing persistent
files retained their inodes and creation dates, including the agent's config.toml,
state, logs, goals, memories, and queue databases. Expected per-turn WAL/log/session
changes occurred, while the targeted durable changes were limited to the isolated
Computer Use app and matching computer-use/1.0.1000761 plugin cache.

Postcondition and deployment scope

After the request:

Gateway PID: unchanged since the operator restart
Gateway HTTP: 200
Gateway event loop: not degraded
Matrix accounts: 6/6 running, connected, healthy, ready
Matrix restartPending: false for all accounts
Matrix reconnectAttempts: 0 for all accounts
Matrix lastError: null for all accounts
Gateway-to-Synapse established sockets: 6
post-request Matrix errors/exits: 0

Across the six isolated homes, four had naturally passed through qualifying cold
app-server preflight and matched build 1000761; two that had not yet done so remained
at build 1000502. This confirms the documented on-demand per-home boundary rather than
an eager all-home mutation during installation or Gateway startup.

The private unredacted transcript and identity capture were retained locally in a small
restricted evidence file. The public proof above changes only the agent label and private
home prefix; timestamps, versions, build numbers, inodes, hashes, tool names, durations,
results, and health assertions are exact.

Diff accounting

Production TypeScript: +356 / -42
Test TypeScript:       +423 / -23
Documentation:          +13 /  -3
Total:                 +792 / -68

The production delta implements the trust and lifecycle boundary absent from
the executable-only predicate: signature requirements, outer/nested identity
inspection, staged verification, rollback ownership, race handling,
selection-aware serialization, and process-lifetime inspection caching.

  • AI-assisted
  • Failure and rollback behavior manually reviewed
  • Focused regression and bridge suites passed
  • Real signed BEFORE evidence captured and sanitized
  • Clean-checkout GitHub CI
  • Post-install, pre-restart identity snapshot
  • Operator-directed post-restart real-world Computer Use proof

Directly inspectable redacted trace

The complete line-oriented final-head macOS artifact is published in
PR comment 5336833505
with redacted artifact SHA-256
dbd189736518040a34a1bbe169acdfeda6fa9846e33f26c5793324d60d7df1fb.

It contains the fresh current-main executable-only source boundary at
2a469c1cb2e1
,
final-PR-head containment and production-blob identity output, strict signed
source/target identities before and after refresh, the inode/build/hash transition,
the isolated CODEX_HOME process tree, real 0.148.0-alpha.15 V2 thread/start and Computer Use MCP initialization records, three timestamped native
computer-use@openai-bundled MCP completion records, the exact TextEdit verification
excerpt, zero fallback/tool-substitution assertions, cleanup results, non-CU home
preservation, and post-operation Gateway/Matrix health.

@clawsweeper

clawsweeper Bot commented Aug 18, 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 size: L triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Aug 18, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 18, 2026
@clawsweeper

clawsweeper Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

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

ClawSweeper review

What this changes

This PR replaces stale signed Computer Use bundles in OpenClaw-owned isolated macOS Codex homes with a verified bundle selected during cold app-server startup.

Merge readiness

⚠️ Needs maintainer review before merge - 7 items remain

Keep open: the main bug remains, but the refresh path can pair a custom or relocated selected app-server with a fallback bundle from a different desktop distribution.

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

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The production proof is strong, but the source-selection defect blocks confidence in the patch for documented command overrides.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (logs): The submitted redacted macOS trace demonstrates a stale signed bundle becoming a matching bundle followed by successful native Computer Use operations; the later containment changes are covered by focused regression evidence.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Verified Sufficient (logs): The submitted redacted macOS trace demonstrates a stale signed bundle becoming a matching bundle followed by successful native Computer Use operations; the later containment changes are covered by focused regression evidence.
Evidence reviewed 6 items Current-main gap: Current main returns as soon as the nested client is executable, before desktop candidates are resolved or identities are compared; the reported stale-but-complete bundle behavior therefore remains unfixed.
Changed refresh entry: The PR now resolves candidates before accepting a target as current, which makes candidate provenance part of every stale-bundle replacement.
Custom-command mismatch: Configured or environment-selected commands are accepted as arbitrary executables, while the desktop resolver recognizes only two exact standard application paths and otherwise returns the generic fallback order.
Findings 1 actionable finding [P1] Keep custom app-server bundles out of the fallback sync
Security Needs attention Fallback source is not bound to the selected app-server: An unmatched custom command uses a generic signed desktop fallback, allowing replacement of the isolated native client from a different distribution than the one OpenClaw launches.

Live Verification

Command: pnpm test extensions/codex/src/app-server/computer-use-service.test.ts

Result: FAIL (partial) — step 2 expect_output Codex Computer Use native service: expected terminal output was not visible within 30 seconds: "Codex Computer Use native service"

pnpm test extensions/codex/src/app-server/computer-use-service.test.ts
runner@runnervm76f27:/tmp/clawsweeper-live-proof-126080-ipuuve/target$ pnpm test extensions/codex/src/app-server/computer-use-service.test.ts
$ node --import tsx scripts/test-projects.mts extensions/codex/src/app-server/computer-use-service.test.ts
pnpm test extensions/codex/src/app-server/computer-use-service.test.ts
[test] starting test/vitest/vitest.extension-codex.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-126080-ipuuve/target

 ✓  extension-codex  extensions/codex/src/app-server/computer-use-service.test.ts (19 tests) 933ms

 Test Files  1 passed (1)
      Tests  19 passed (19)
   Start at  22:51:00
   Duration  21.89s (transform 17.44s, setup 838ms, import 19.83s, tests 933ms, environment 0ms)

[test] passed 1 Vitest shard in 26.25s
runner@runnervm76f27:/tmp/clawsweeper-live-proof-126080-ipuuve/target$ pnpm test extensions/codex/src/app-server/computer-use-service.test.ts
$ node --import tsx scripts/test-projects.mts extensions/codex/src/app-server/computer-use-service.test.ts
[test] starting test/vitest/vitest.extension-codex.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-126080-ipuuve/target






























Assertions:

  • FAIL expect_output: Codex Computer Use native service

How this fits together

The Codex plugin prepares an agent-specific Codex home before launching a local app-server. Native Computer Use provisioning chooses a desktop bundle, validates it, and places it in that isolated home for the subsequent tool client.

flowchart LR
  A[App-server command] --> B[Desktop bundle selection]
  C[Agent Codex home] --> D[Native bundle provisioning]
  B --> D
  D --> E[Identity and ownership checks]
  E --> F[Staged replacement]
  F --> G[Computer Use client]
  G --> H[Codex app-server tools]
Loading

Decision needed

Question Recommendation
For an explicit or relocated app-server command, should native bundle replacement require a bundle proven to belong to that exact desktop distribution instead of using the generic desktop fallback? Require selected-distribution provenance: Derive or recognize a service bundle only from the selected command’s desktop application and skip replacement when no trusted associated bundle exists.

Why: The safe source boundary determines whether a routine cold start can overwrite an isolated client with a signed but incompatible distribution; local code cannot infer the intended compatibility policy for arbitrary command overrides.

Before merge

  • Keep custom app-server bundles out of the fallback sync (P1) - For a configured or relocated appServer.command, this resolver recognizes only the two hard-coded standard desktop paths; otherwise it selects the generic ChatGPT/Codex fallback. The new staged path can then replace a stale isolated bundle with one from a different desktop distribution, defeating the selected-source invariant. Restrict replacement to a bundle proven to belong to the selected command, or preserve the target when that cannot be established, and cover the unmatched-command case.
  • Resolve security concern: Fallback source is not bound to the selected app-server - An unmatched custom command uses a generic signed desktop fallback, allowing replacement of the isolated native client from a different distribution than the one OpenClaw launches.
  • Resolve merge risk (P2) - A configured or relocated app-server can be paired with a separately signed fallback bundle, reintroducing the compatibility failure the synchronization is meant to prevent.
  • Resolve merge risk (P1) - The patch adds net 608 production TypeScript lines to a startup/security boundary; its larger staged-swap surface needs the source-selection invariant resolved before merge.
  • Resolve merge risk (P1) - Direct upstream Codex runtime inspection is unavailable in this checkout, so this review cannot clear external runtime-contract claims beyond the local source-selection defect.
  • Complete next step (P2) - A maintainer must choose whether explicit and relocated app-server commands require strict same-distribution bundle provenance before a narrow repair can proceed.

Findings

  • [P1] Keep custom app-server bundles out of the fallback sync — extensions/codex/src/app-server/computer-use-service.ts:95-98
  • [medium] Fallback source is not bound to the selected app-server — extensions/codex/src/app-server/computer-use-service.ts:95
Agent review details

Security

Needs attention: Signed fallback bundles are trusted by Apple identity but are not proven to belong to the selected external app-server.

PR surface

Source +608, Tests +610, Docs +13. Total +1231 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 3 660 52 +608
Tests 2 633 23 +610
Docs 1 16 3 +13
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 1309 78 +1231

Review metrics

Metric Value Why it matters
Production versus test delta production +660/-52 (net +608); tests +633/-23 (net +610); docs +16/-3 The security-sensitive startup repair grows materially, so the selected-source invariant should be settled before accepting the added replacement machinery.

Stored data model

Persistent data-model change detected: vector/embedding metadata: extensions/codex/src/app-server/computer-use-service.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: canonical
Canonical: #126080
Summary: This PR is the remaining native bundle-synchronization work; the linked merged app-server admission PRs are adjacent changes.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Bind replacement to the selected desktop app (recommended)
    Before merge, ensure custom and relocated commands cannot refresh from an unrelated fallback bundle, with regression coverage for an unmatched command.
  2. Accept cross-distribution pairing
    Merge the current fallback behavior only if maintainers intentionally accept that a signed bundle from another desktop distribution may replace the selected client.

Technical review

Best possible solution:

Make replacement source provenance match the actual selected desktop app-server; when that association cannot be proven, preserve the existing bundle rather than synchronize from another desktop distribution.

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

Yes for the source-level violation: configure a custom or relocated app-server command while a standard desktop app exists, and the resolver falls back to that other distribution before replacement. A live mismatched-desktop run remains useful to measure the operator-visible failure.

Is this the best way to solve the issue?

No: staging and containment are substantial, but the source selector does not preserve the selected-distribution invariant for custom commands.

Full review comments:

  • [P1] Keep custom app-server bundles out of the fallback sync — extensions/codex/src/app-server/computer-use-service.ts:95-98
    For a configured or relocated appServer.command, this resolver recognizes only the two hard-coded standard desktop paths; otherwise it selects the generic ChatGPT/Codex fallback. The new staged path can then replace a stale isolated bundle with one from a different desktop distribution, defeating the selected-source invariant. Restrict replacement to a bundle proven to belong to the selected command, or preserve the target when that cannot be established, and cover the unmatched-command case.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P1: An established custom app-server override can receive an incompatible native bundle after a cold startup.
  • merge-risk: 🚨 compatibility: The new replacement path can change an existing isolated home from its selected distribution to another desktop distribution.
  • merge-risk: 🚨 security-boundary: The PR copies and replaces a signed native application, but fallback signing does not prove provenance to the selected app-server.
  • merge-risk: 🚨 availability: A mismatched native client can prevent Computer Use from starting after the gateway restarts.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (logs): The submitted redacted macOS trace demonstrates a stale signed bundle becoming a matching bundle followed by successful native Computer Use operations; the later containment changes are covered by focused regression evidence.
  • proof: sufficient: Contributor real behavior proof is sufficient. The submitted redacted macOS trace demonstrates a stale signed bundle becoming a matching bundle followed by successful native Computer Use operations; the later containment changes are covered by focused regression evidence.

Evidence

Security concerns:

  • [medium] Fallback source is not bound to the selected app-server — extensions/codex/src/app-server/computer-use-service.ts:95
    An unmatched custom command uses a generic signed desktop fallback, allowing replacement of the isolated native client from a different distribution than the one OpenClaw launches.
    Confidence: 0.98

What I checked:

Likely related people:

  • jalehman: Authored the current PR tip and the adjacent current-main desktop app-server selection change. (role: recent app-server selection contributor; confidence: medium; commits: c5d9239ce135, 841f25eae629; files: extensions/codex/src/app-server/computer-use-service.ts, extensions/codex/src/app-server/desktop-app-paths.ts, extensions/codex/src/app-server/config-runtime.ts)

Rank-up moves

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

  • Resolve the selected-command versus fallback-bundle policy and add a regression for an unmatched or relocated desktop command.

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 (6 earlier review cycles)
  • reviewed 2026-08-18T23:39:15.004Z sha 06ec9e06e701f47b4be2992ffe43039984884372 :: needs real behavior proof before merge. :: [P1] Preserve user-scoped Codex homes | [P2] Bound completed synchronization entries
  • reviewed 2026-08-18T23:59:39.707Z sha dae02b44cd49d058c1246fbefee53d10e6624b36 :: needs real behavior proof before merge. :: [P1] Do not replace user-scoped Computer Use bundles | [P2] Bound completed synchronization entries | [P1] Keep the runtime fence source-validated
  • reviewed 2026-08-19T00:38:33.643Z sha fb0bf42c94e66fab35e71fa2357ca4694a872bb2 :: needs real behavior proof before merge. :: [P1] Restore a source-validated runtime fence
  • reviewed 2026-08-19T02:22:33.425Z sha fb0bf42c94e66fab35e71fa2357ca4694a872bb2 :: needs real behavior proof before merge. :: [P1] Keep external app-server admission source-validated
  • reviewed 2026-08-19T05:18:40.204Z sha fb0bf42c94e66fab35e71fa2357ca4694a872bb2 :: found issues before merge. :: [P1] Reject symlinked service roots before replacing the bundle | [P1] Restore a source-validated external runtime fence
  • reviewed 2026-08-19T11:43:55.848Z sha 813fda1045986e01988427f802cebd0be6ed19d3 :: found issues before merge. :: [P1] Restore a source-validated external runtime fence

@openclaw-barnacle openclaw-barnacle Bot removed the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Aug 18, 2026
@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 19, 2026
@bdjben

bdjben commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Aug 19, 2026
@bdjben

bdjben commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor Author

Inspectable final-head macOS refresh and native-operation trace

This is the line-oriented redacted artifact requested in the latest ClawSweeper review. It supplements the PR body’s narrative evidence; it does not change the PR head or implementation.

Redacted artifact SHA-256: dbd189736518040a34a1bbe169acdfeda6fa9846e33f26c5793324d60d7df1fb

Expand the complete redacted trace

PR #126080 inspectable final-head macOS trace (redacted)

Capture window: 2026-08-19 05:01:46–05:14:01 +03:00
Native operation window: 2026-08-19 02:05:37–02:06:14Z
Redaction: the production agent is agent1; its private home prefix, route identifiers,
session identifiers, and host identifiers are omitted. Versions, commits, timestamps,
bundle identifiers, Team Identifier, CDHashes, SHA-256 values, inode transitions, native
tool names/results, durations, and visible TextEdit result are retained.

1. Source boundary and final-head identity

fresh main source snapshot (queried 2026-08-19T02:40Z):
  2a469c1cb2e1da9a43dd425170aa23027cc5d5e2

extensions/codex/src/app-server/computer-use-service.ts:
  65  if (await hasExecutableClient(params.targetPath)) {
  66    return { status: "already_installed", changed: false, targetPath: params.targetPath };
  67  }
  68  const candidates =
  ...
  74  const sourcePath = await findUsableServiceApp(candidates);

source observation:
  a complete stale target exits at lines 65–66 before source discovery or
  source/target identity comparison.

PR final head:
  fb0bf42c94e66fab35e71fa2357ca4694a872bb2

installed source checkout:
  d43c92193777860da8b249d7ee0dd8af90c464c4

running emitted integration:
  fd501f91776fb0a4513b18a2fb60ced39fb3ff46
  build ID 2026.8.1-fd501f91776f-2026-08-19T00-16-36.234Z

$ git merge-base --is-ancestor fb0bf42c94e66fab35e71fa2357ca4694a872bb2 \
    d43c92193777860da8b249d7ee0dd8af90c464c4
exit=0 (PASS)

$ git diff --name-status \
    fb0bf42c94e66fab35e71fa2357ca4694a872bb2..fd501f91776fb0a4513b18a2fb60ced39fb3ff46 \
    -- extensions/codex/src/app-server
M  extensions/codex/src/app-server/computer-use-service.test.ts

production blob identity at final PR head and running emitted integration:
  auth-bridge.ts:
    fb0bf42  f2a47a3ed1b0a1168f2fdf3212064566c4a950ee
    fd501f9  f2a47a3ed1b0a1168f2fdf3212064566c4a950ee
  computer-use-service.ts:
    fb0bf42  7fca14fcb64e5fda60f53117cab903c42f61bf71
    fd501f9  7fca14fcb64e5fda60f53117cab903c42f61bf71

interpretation:
  within this PR's Codex app-server surface, the sole source difference is
  the final bounded-cache test guard;
  both changed production files are object-identical to final PR head.

2. Pre-request cold isolated-home baseline

No appServer.command or homeScope override was present. The effective harness home
scope was agent; Computer Use, auto-install, and auto-repair were enabled. agent1
had no running app-server or native client before the request.

selected app-server:
  <ChatGPT.app>/Contents/Resources/codex
  codex-cli 0.148.0-alpha.15

selected signed Computer Use source:
  <ChatGPT.app>/Contents/Resources/cua_node/lib/node_modules/@oai/sky/
    Codex Computer Use.app
  version/build:        26.817.1000761 / 1000761
  outer identifier:     com.openai.sky.CUAService
  nested identifier:    com.openai.sky.CUAService.cli
  Team Identifier:      2DC432GLL2
  outer CDHash:          f4fcdc11ff65b810195ae7119d56021c4e92a07d
  nested CDHash:         099beab9164eaa8dc1dd6288210cac38a7a4d9e7
  nested SHA-256:        9d55690c0aee43e006f6b1304da80bf8e3f89f6209ca1d823e43a8b836a24057
  strict outer verify:   PASS
  strict nested verify:  PASS
  explicit Team/ID requirements: PASS

agent1 isolated target before request:
  version/build:        26.721.1000502 / 1000502
  outer inode:          83063031
  nested client inode:  83063268
  outer CDHash:          2ce8ac267121a9035983fbdfba42963a1f87d482
  nested CDHash:         3c3b8f4061cc8037124bfafda3c99aab6aefb837
  nested SHA-256:        4222fbefbde6e2ce3713fb0b28a9ab0dd6463fcf20db6ef74817d69df84bf5a9
  Team Identifier:      2DC432GLL2
  strict outer verify:   PASS
  strict nested verify:  PASS

temporary staging/backup artifacts before request: 0

This is a complete, executable, validly OpenAI-signed but mismatched generation—the
specific state admitted by the executable-only early return above.

3. On-demand refresh transition

An ordinary user task began at 2026-08-19T02:05:37.057Z. It requested a new TextEdit
document, four sentences of text, and visible verification. It was not an internal
repair command, status probe, manual copy, or filesystem repair.

agent1 isolated target after cold acquisition:
  version/build:        26.817.1000761 / 1000761
  outer inode:          112654392          (changed)
  nested client inode:  112654506          (changed)
  client executable:    112654511
  outer CDHash:          f4fcdc11ff65b810195ae7119d56021c4e92a07d
  nested CDHash:         099beab9164eaa8dc1dd6288210cac38a7a4d9e7
  service SHA-256:       180d45992a4b16c8523c101d245c505bb2b14cf196becbcc6dfd55165e1f41af
  nested SHA-256:        9d55690c0aee43e006f6b1304da80bf8e3f89f6209ca1d823e43a8b836a24057
  Team Identifier:      2DC432GLL2
  strict outer verify:   PASS
  strict nested verify:  PASS
  source/target identity: MATCH

post-refresh cleanup:
  .service-app.staging-* = 0
  .service-app.backup-*  = 0
  other .bak/temp synchronization artifacts = 0

The running process tree after refresh retained the isolated home:

Gateway (same PID before and after the task)
  -> <ChatGPT.app>/Contents/Resources/codex app-server --listen stdio://
       CODEX_HOME=<agent1-CODEX_HOME>
       -> <agent1-CODEX_HOME>/computer-use/Codex Computer Use.app/
          Contents/SharedSupport/SkyComputerUseClient.app/Contents/MacOS/
          SkyComputerUseClient mcp
       -> second scoped SkyComputerUseClient mcp

both clients:
  executable build: 1000761
  cwd: <agent1-CODEX_HOME>/plugins/cache/openai-bundled/
       computer-use/1.0.1000761

native service:
  existing signed ChatGPT-owned user-scope process remained in place;
  no agent-owned service process was installed.

4. App-server thread and Computer Use MCP initialization

The retained app-server log independently ties the selected newer Desktop runtime to
OpenClaw's typed V2 thread and native MCP initialization path. Private home, auth, thread,
and request identifiers are omitted from these reduced records.

{"timestamp":"2026-08-19T02:05:42Z","target":"codex_core::session::session","rpc":{"method":"thread/start","transport":"stdio","request_id":7},"app_server":{"api_version":"v2","client_name":"openclaw","client_version":"2026.8.1"},"configured_runtime_version":"0.148.0-alpha.15","result":"thread_spawn/session_init entered"}
{"timestamp":"2026-08-19T02:05:42Z","target":"rmcp::service","rpc":{"method":"thread/start","transport":"stdio","request_id":7},"server_name":"computer-use","event":"Service initialized as client","protocol_version":"2025-06-18","tools_list_changed":false}
{"timestamp":"2026-08-19T02:05:43Z","target":"codex_core::session::session","rpc":{"method":"thread/start","transport":"stdio","request_id":11},"app_server":{"api_version":"v2","client_name":"openclaw","client_version":"2026.8.1"},"configured_runtime_version":"0.148.0-alpha.15","dynamic_tool_count":47,"result":"thread_spawn/session_init entered"}
{"timestamp":"2026-08-19T02:05:43Z","target":"rmcp::service","rpc":{"method":"thread/start","transport":"stdio","request_id":11},"server_name":"computer-use","event":"Service initialized as client","protocol_version":"2025-06-18","tools_list_changed":false}
{"timestamp":"2026-08-19T02:05:43.684Z","type":"session_meta","originator":"openclaw","cli_version":"0.148.0-alpha.15"}

These are real app-server/MCP log records, not synthetic initialize fixtures. They are
followed in the same production turn by the native calls below.

5. Exact native MCP trace

The following records are reduced directly from the retained Codex rollout. Only image
payload bytes, internal call/session identifiers, and private path prefixes are omitted.

{"timestamp":"2026-08-19T02:05:57.493Z","type":"mcp_tool_call_end","plugin_id":"computer-use@openai-bundled","invocation":{"server":"computer-use","tool":"get_app_state","arguments":{"app":"TextEdit"}},"duration_ms":1854.594,"result":"Ok","result_excerpt":"Computer Use state (CUA App Version: 1000761); App=/System/Applications/TextEdit.app; Window=Untitled; focused element=text entry area"}
{"timestamp":"2026-08-19T02:06:04.329Z","type":"mcp_tool_call_end","plugin_id":"computer-use@openai-bundled","invocation":{"server":"computer-use","tool":"type_text","arguments":{"app":"TextEdit","text_lines":4}},"duration_ms":1593.938,"result":"Ok","result_excerpt":"TextEdit Untitled; focused text area contains all four requested lines; document marked Edited"}
{"timestamp":"2026-08-19T02:06:04.436Z","type":"mcp_tool_call_end","plugin_id":"computer-use@openai-bundled","invocation":{"server":"computer-use","tool":"get_app_state","arguments":{"app":"TextEdit"}},"duration_ms":87.217,"result":"Ok","result_excerpt":"Computer Use state (CUA App Version: 1000761); accessibility state and screenshot contain all four requested lines"}
{"timestamp":"2026-08-19T02:06:13.316Z","type":"task_complete","duration_ms":29659,"time_to_first_token_ms":4241,"last_agent_message":"Fixed: Opened a new TextEdit document, wrote the four-sentence swimming poem, and verified all text is visible."}

Exact visible verification excerpt from the second get_app_state result:

Computer Use state (CUA App Version: 1000761)
App=/System/Applications/TextEdit.app/ (bundleID com.apple.TextEdit)
Window: "Untitled", App: TextEdit.
text entry area (settable) ID: First Text View, Value:
The water wraps around me like a cool and sparkling song.
Each gentle stroke makes tired thoughts drift quietly along.
I float beneath the open sky and feel completely free.
Swimming turns an ordinary day into a joyful sea.

Complete-rollout negative assertions:

OpenClaw node computer / computer.act / screen.snapshot: 0 calls
AppleScript / osascript:                              0 calls
shell UI automation:                                 0 calls
managed browser:                                     0 calls
Computer Use errors/timeouts/fallbacks:               0
native MCP results:                                  3 Ok / 0 Error
task status:                                          succeeded

6. Isolation preservation and service health

Persistent non-Computer-Use files retained their preexisting inodes; examples:

<agent1-CODEX_HOME>/config.toml       inode 103883782
<agent1-CODEX_HOME>/state_5.sqlite    inode 1270262
<agent1-CODEX_HOME>/logs_2.sqlite     inode 1266087
<agent1-CODEX_HOME>/goals_1.sqlite    inode 28891874
<agent1-CODEX_HOME>/memories_1.sqlite inode 29792787
<agent1-CODEX_HOME>/queue_1.sqlite    inode 107853414

Expected per-turn logs, WAL/SHM files, plugin cache, and the new rollout changed. The
isolated home itself was not replaced or shared.

Fresh post-task health at 2026-08-19T02:14:01Z:

Gateway PID: unchanged
Gateway HTTP: 200 in 0.033s
production Matrix connections: 6 established
post-task Matrix channel errors/exits/reconnects: 0

7. Evidence retention

The private unredacted compact manifest is retained locally with mode 0600:

size:    3349 bytes
SHA-256: 53a463c11fdb06f5ca2b9aab874fa6ec7dba595e44d6fff8e883d89a50a97936

It retains the exact production agent, local path, task/run/route/session identifiers,
rollout path, PIDs, benign task request, transition values, tool timestamps,
persistent-file inodes, and health assertions. No access token, password, bearer value,
cookie, Matrix room ID, or unrelated private conversation content is present in either
manifest.

@bdjben

bdjben commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@bdjben

bdjben commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@bdjben

bdjben commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. proof: sufficient ClawSweeper judged the real behavior proof convincing. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 19, 2026
@bdjben

bdjben commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

Symlink-containment fix on current head

Current head 813fda1045986e01988427f802cebd0be6ed19d3 addresses the native-service path-escape finding from the latest review.

The agent directory is now passed explicitly as the trusted ownership root. Before source or target inspection, native-service provisioning rejects:

  • a symlinked ownership root;
  • a symlinked isolated codex-home;
  • a symlinked computer-use parent;
  • a symlinked final Codex Computer Use.app target.

For a valid owned path, OpenClaw creates missing descendants one component at a time, canonicalizes and captures the service parent by device, inode, directory type, and real path, and derives staging/backup paths from that canonical parent. It revalidates the parent and staging identities around copy, rename, rollback, and cleanup. If the parent is rebound, publication stops and path-based rollback/cleanup is skipped rather than following the replacement path.

Compatibility boundaries remain explicit: aliases above the caller-designated agent directory are unchanged; homeScope: "user" and explicit CODEX_HOME paths still do not enter native bundle replacement; non-macOS behavior still returns before macOS path work.

New regression coverage proves all four static symlink cases leave the external target's inode, signed identity, and sentinel unchanged and create no external staging/backup debris. A deterministic parent-rebind test additionally proves that publication and cleanup refuse the rebound path. Fresh-tree creation and concurrent EEXIST handling preserve first-start behavior.

Verification on exact head:

computer-use-service.test.ts: 19/19 passed
combined service + auth bridge: 110/110 passed
full repository check:test-types: PASS
focused oxlint: PASS
oxfmt --check: PASS
max-lines ratchet: PASS
git diff --check: PASS
independent final review: no remaining P0/P1/P2 in the scoped native-service fix

The PR description now includes the owned-path contract, current-head provenance, expanded regression list, and exact verification counts. The previously published macOS production trace remains the functional refresh-path proof; this follow-up commit changes containment and failure behavior around that path, not source selection, signed-identity matching, or native MCP behavior.

@bdjben

bdjben commented Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Aug 19, 2026
@jalehman
jalehman force-pushed the codex/fix-isolated-computer-use-bundle-refresh branch from 813fda1 to 18dd3db Compare August 19, 2026 22:40
@jalehman

Copy link
Copy Markdown
Contributor

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@jalehman jalehman self-assigned this Aug 19, 2026
@jalehman

Copy link
Copy Markdown
Contributor

Land-ready review completed for c5d9239ce1354ee591399f1ba25d8c020a79c324.

  • The stacked app-server admission change is absent; this is now a six-file native Computer Use bundle synchronization repair.
  • Direct Codex source inspection covered app-server-protocol/src/protocol/v1.rs, app-server/src/request_processors/initialize_processor.rs, and core-plugins/src/discoverable.rs.
  • The prior ClawSweeper P1 and its rank-up move were resolved by splitting out the runtime-admission change. The current exact-head review publisher completed successfully; its placeholder has not yet been replaced, so this is a publication lag, not an unresolved code finding.
  • Exact-head CI run https://github.com/openclaw/openclaw/actions/runs/32310143968 completed with 188 checks, zero failures, and a green openclaw/ci-gate.
  • Focused proof: native-service suite 19/19; combined service/auth-bridge suite 110/110; real macOS cold refresh and native Computer Use trace 3/3 operations, zero errors.
  • Fresh autoreview found no actionable issues on the rebased branch; the final internal-export cleanup received a second clean review.
  • Native review artifacts validate with READY FOR /prepare-pr, zero findings.

Proof gap: Codex's private native authentication handshake is not published as an inspectable contract. The PR does not depend on undocumented handshake details; the supplied production trace proves the observed stale-generation failure and successful post-refresh behavior.

Commands used:

scripts/pr review-init 126080
scripts/pr review-checkout-main 126080
scripts/pr review-checkout-pr 126080
scripts/pr review-guard 126080
scripts/pr review-artifacts-init 126080
scripts/pr review-validate-artifacts 126080

@jalehman

Copy link
Copy Markdown
Contributor

ClawSweeper follow-up on the selected-command provenance finding:

Maintainer decision: skip the proposed source-selection change for this PR.

The current ordered fallback is intentional, predates this PR in #113393 (ee606def49d), and is explicitly preserved in this PR's Selected source and signed-identity contract. The resolver prefers assets associated with the selected appServer.command, then retains the existing official Desktop candidates. This is needed for the managed package fallback and for explicit app-server commands that still use the official Computer Use service.

The synchronization boundary is the source candidate actually selected by that resolver, not an inferred requirement that the native service path share an app bundle with appServer.command. Before publication, this PR requires the chosen outer service and nested client to pass the Apple anchor, OpenAI Team ID, bundle ID, strict signature, build, and CDHash checks; it then compares the isolated target against that exact chosen source. The supplied live proof covers the preferred same-distribution path.

Restricting candidates to an exact or relocated command path would change the established availability/product contract and contradict the authored PR body. There is no demonstrated dependency contract or failing behavior showing that the existing official signed fallback is invalid. If evidence establishes that cross-Desktop fallback generations are incompatible, that should be handled as a separate owner-level policy change with dedicated live proof rather than folded into this refresh repair.

The rank-up move is therefore explicitly skipped. Exact-head CI and the prepared landing artifacts remain valid at c5d9239ce1354ee591399f1ba25d8c020a79c324.

@jalehman
jalehman merged commit 20af868 into openclaw:main Aug 19, 2026
188 checks passed
@jalehman

Copy link
Copy Markdown
Contributor

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 20, 2026
)

* fix(codex): refresh stale isolated Computer Use bundles

* fix(codex): satisfy Computer Use CI contracts

* fix(codex): constrain Computer Use bundle refresh

* test(codex): guard Computer Use cache fixture

* fix(codex): contain native Computer Use refresh paths

* fix(codex): keep service path type private

---------

Co-authored-by: Benjamin Badejo <[email protected]>
Co-authored-by: Josh Lehman <[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 merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: XL 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.

2 participants