openai / openai/codex

[macOS 26.908.40834] New sessions fail to initialize unified-computer-use due to stale CUA plugin cache

Open
#45,047 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app bug computer-use skills
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What version of the Codex App are you using (From “About Codex” dialog)?

26.908.40834 (bundle build 8881)

What subscription do you have?

ChatGPT Pro

What platform is your computer?

Darwin 25.5.0 arm64 arm

What issue are you seeing?

New Codex Desktop sessions expose the bundled unified-computer-use / cua_repl tool, but the tool cannot initialize browser control.

The initial call:

await cua.getState();

fails with:

CUA_REPL_ENABLED_SURFACES is required

After locally forwarding and allowlisting that variable, initialization proceeds further but fails with:

setupCUA is not a function

The materialized plugin cache is version 26.901.51231, while Codex Desktop is 26.908.40834. The cached launcher and bootstrap banners are older than, and incompatible with, the CUA/NodeREPL runtime bundled with the current app.

This is a Codex Desktop bundled-plugin materialization/runtime compatibility issue, not a page-specific browser failure. An older or forked session whose CUA process was already initialized can still access the browser, while newly created sessions fail during bootstrap.

What steps can reproduce the bug?
  1. Enable the bundled Browser, Chrome, Computer Use, and Unified Computer Use plugins.

  2. Fully quit and reopen Codex Desktop.

  3. Create a new session.

  4. Enter a prompt such as:

    Connect to the browser and list the open tabs.
    
  5. The session invokes:

    await cua.getState();
    
  6. The call fails with:

    CUA_REPL_ENABLED_SURFACES is required
    
  7. Call js_reset, then retry await cua.getState().

  8. The same error remains because js_reset does not restart the MCP process or change its startup environment.

  9. If CUA_REPL_ENABLED_SURFACES is locally added to NODE_REPL_UNTRUSTED_ENV_ALLOWLIST, restart Codex and repeat the test.

  10. Initialization then reaches the stale bootstrap banner and fails with:

    setupCUA is not a function
    

The materialized .mcp.json already contains:

"CUA_REPL_ENABLED_SURFACES": "browser,computer"

However, the cached scripts/launch.mjs does not expose it through the filtered globalThis.nodeRepl.env snapshot. The cached resources/banner*.js files also call the removed API:

(await import("@oai/cua/tinyskyAlt")).setupCUA(...)

The launcher and banner bundled with the current @oai/cua-repl runtime instead forward/allowlist the environment variable and use:

await import("@oai/cua/tinyskyAlt");

Session ID is intentionally redacted from the public report and can be provided privately if required. Token-limit and context-window usage do not appear relevant because the failure occurs inside CUA bootstrap before browser interaction.

What is the expected behavior?

Codex Desktop should materialize unified-computer-use launcher and bootstrap resources that match the CUA/NodeREPL runtime bundled with the same application version.

In a newly created session, this call should initialize successfully:

await cua.getState();

It should return the available browsers, tabs, and computer surfaces without requiring users to patch plugin cache files. js_reset should also be able to rerun a compatible bootstrap banner.

Additional information

Environment:

  • macOS on Apple Silicon (arm64)
  • Codex Desktop 26.908.40834, bundle build 8881
  • Materialized unified-computer-use@openai-bundled cache: 26.901.51231
  • Node 24.20.0
  • @oai/cua 0.2.4
  • @oai/cua-repl 0.1.0
  • The first failure was observed in sessions using Codex CLI 0.153.4 and 0.154.0-alpha.6.2

Verified not to be the cause:

  • Browser, Chrome, Computer Use, and Unified Computer Use plugins are enabled.
  • The materialized .mcp.json contains CUA_REPL_ENABLED_SURFACES="browser,computer".
  • The Chrome native-host configuration exists.
  • Browser access and permissions work in an older/forked session whose CUA process was already initialized.
  • Multiple newly created sessions reproduced the failure.
  • The failure occurs before any page-specific browser action.

Local workaround that resolved both initialization errors:

  1. Forward CUA_REPL_ENABLED_SURFACES to the NodeREPL child and append it to NODE_REPL_UNTRUSTED_ENV_ALLOWLIST.

  2. Replace all three materialized banner*.js files with the current runtime banner:

    await import("@oai/cua/tinyskyAlt");
    
  3. Apply the same changes to the bundled-marketplace source so cache rematerialization does not immediately restore the stale files.

  4. Fully restart Codex Desktop and test from a new session.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing unified-computer-use materialization and compare the cached scripts/launch.mjs and resources/banner*.js with the current @oai/cua-repl runtime. Check the generated .mcp.json and the NodeREPL environment handling first. Done means a newly created session can run cua.getState() successfully after cache rematerialization without editing plugin files.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js, rust
Domain
desktop, devtools, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.