Skip to content

fix(codex): prevent Computer Use timeouts in isolated homes - #113232

Closed
bdjben wants to merge 1 commit into
openclaw:mainfrom
bdjben:codex/fix-computer-use-readiness
Closed

bdjben wants to merge 1 commit into
openclaw:mainfrom
bdjben:codex/fix-computer-use-readiness

Conversation

@bdjben

@bdjben bdjben commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Related: #103250

What Problem This Solves

Fixes an issue where users with Codex Computer Use enabled could have every agent turn wait through two readiness timeouts and then fail when the current thin Computer Use plugin was installed in an isolated agent Codex home. The thin plugin launcher expects the signed service app at $CODEX_HOME/computer-use/Codex Computer Use.app, but OpenClaw only installed the plugin files, leaving the service absent from isolated homes.

The same failure could be reported as a live-test timeout with “startup is allowed” even though the named MCP server exposed zero tools and startup would still be blocked.

Why This Change Was Made

When Computer Use auto-install is authorized, OpenClaw now provisions the desktop-bundled signed service app before app-server startup. It pairs the source with the selected ChatGPT/Codex desktop command, stages and atomically replaces copies with cross-process race recovery, refreshes changed copies using a cached signed-content fingerprint, and leaves an existing valid copy alone when source identity is unavailable.

Readiness now treats a named MCP server with an empty tool map as missing exposure, reloads once during explicit install, and fails immediately instead of spending two thread/start probes on a server that cannot serve Computer Use tools. Genuine post-exposure live-test failures retain the existing non-strict compatibility behavior.

AI-assisted: yes. The implementation and evidence were reviewed against the OpenClaw and upstream Codex runtime contracts, followed by an independent fresh diff review with all actionable findings addressed.

User Impact

Affected macOS users can keep Computer Use enabled in isolated agent homes after the desktop plugin packaging transition without all Codex turns being blocked by the missing service app. Setup also fails faster and reports the actual empty MCP exposure when provisioning cannot make tools available.

Existing matching service apps are not recopied. Computer Use disabled configurations and enabled configurations with autoInstall: false do not authorize or perform this provisioning.

Evidence

  • Incident SQLite/log evidence showed the gateway child loading the expected Codex runtime and authenticated model transport, then the thin launcher reporting that SkyComputerUseClient was missing under the isolated $CODEX_HOME; disabling Computer Use immediately restored turns.
  • Packaging comparison: the prior plugin bundled the service app, while the current 1.0.1000502 plugin is a thin launcher for the canonical per-home app. The installed ChatGPT desktop app contains the matching signed service source.
  • Focused Codex extension tests: 155/155 passed across service provisioning, readiness, auth bridging, attempt startup, and managed binary selection.
  • pnpm check:changed passed locally, including production/test extension typechecks, extension lint, formatting, boundary guards, and import-cycle checks.
  • pnpm check:docs passed: formatting, markdown lint, MDX, glossary, 6,174 internal links, and docs map.
  • Full Codex extension suite: 2,731 tests passed. Four unrelated failures were investigated; the three persistent failures reproduced on an untouched checkout of the exact base commit, while the 1 ms timer-boundary failure passed in isolation.
  • Real macOS proof: provisioned the actual ChatGPT-bundled service into a disposable isolated Codex home, received installed on the first ensure and already_installed in 7 ms on the second, and /usr/bin/codesign --verify --deep --strict passed on the copied app.
  • Upstream Codex contract checked at 0dfa778dae6a94b2ff2c69176cbaf063a3bf18a1: mcpServerStatus/list can expose a configured server with no tools (codex-rs/app-server/src/request_processors/mcp_processor.rs), while exact thread binding waits for a ready MCP client (codex-rs/codex-mcp/src/connection_manager/tool_catalog.rs).

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation extensions: codex labels Jul 24, 2026
@bdjben
bdjben marked this pull request as ready for review July 24, 2026 05:35
@bdjben

bdjben commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jul 24, 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 repository_dispatch).
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 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: fix(codex): prevent Computer Use timeouts in isolated homes This is item 1/1 in the current shard. Shard 0/1.

This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking.

Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted.

@fuller-stack-dev

Copy link
Copy Markdown
Member

Maintainer coordination: #113393 is selected as the canonical repair for the isolated-home Computer Use readiness stall. It keeps service provisioning scoped to the selected Codex home and adds the generic typed harness-preflight boundary needed to stop per-model readiness repetition; its exact-head CI and behavior proof are green. Please do not land both implementations independently. I am leaving this PR open so its author and maintainers can decide whether any non-overlapping work remains after #113393 lands.

@bdjben

bdjben commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor Author

Closed in light of PR 113393: #113393 which cites it. Thank you, @fuller-stack-dev!

1 similar comment
@bdjben

bdjben commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

Closed in light of PR 113393: #113393 which cites it. Thank you, @fuller-stack-dev!

@bdjben bdjben closed this Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation extensions: codex size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants