Skip to content

Windows: Browser/Computer Use crashes on start: trusted-worker.js gets NODE_REPL_TRUSTED_SERVICES undefined (trusted Node process exited unexpectedly / cua is not defined) #54447

Open

Description

Summary

After the sandbox ACL fix (#51822) landed in CLI 0.163.0, the os error 32 setup failure from #51590 is gone (setup refresh: ... errors=[]). Browser Use still fails every time, in both the desktop app and the CLI:

  • trusted Node process exited unexpectedly; kernel reset, rerun your request
  • on retry: cua is not defined

The cause is visible in the MCP server stderr: trusted-worker.js gets no NODE_REPL_TRUSTED_SERVICES in its environment and throws on JSON.parse.

Versions

  • Windows 11 Pro, build 26300
  • Codex CLI 0.163.0 (npm)
  • Codex desktop (Microsoft Store) 26.1007.9446.0
  • Bundled plugins unified-computer-use / computer-use / browser 26.1007.71326
  • cua_node runtime a9ba6825a525118c, Node v24.21.0
  • [windows] sandbox = "elevated" (same result with unelevated, see below)

Stderr from the cua_repl MCP server (every attempt)

<anonymous_script>:1
undefined
^

SyntaxError: "undefined" is not valid JSON
    at JSON.parse (<anonymous>)
    at Object.<anonymous> (%TEMP%\.tmpIveTVU\trusted-worker.js:23:33)
    at Module._compile (node:internal/modules/cjs/loader:1929:14)
    ...
    at [eval]:63:24

Node.js v24.21.0

trusted-worker.js line 23:

const configuredServices = JSON.parse(process.env.NODE_REPL_TRUSTED_SERVICES);

Where the variable disappears

  1. The plugin's .mcp.json (unified-computer-use/26.1007.71326) starts cua_repl (node.exe ...@oai/cua-repl/bin/cua-repl.mjs) with "NODE_REPL_TRUSTED_SERVICES": "{\"browser\":\"@oai/browser-desktop/service\"}" in env.
  2. @oai/cua-repl/dist/.../launch.js spawns node_repl.exe with env: { ...process.env, NODE_REPL_TRUSTED_SERVICES: process.env.NODE_REPL_TRUSTED_SERVICES ?? JSON.stringify(default), ... }, so the variable is set at this point.
  3. node_repl.exe launches trusted-worker.js, and the variable is undefined there.

So the variable is dropped inside node_repl.exe when it builds the trusted worker's environment. It never reaches the worker.

Ruled out

  • Stale config paths: all node_repl / cua_repl paths point to the current runtime and plugin version, and every file exists.
  • shell_environment_policy: same crash with -c "shell_environment_policy.include_only=[]".
  • Elevated sandbox: same crash with -c "windows.sandbox='unelevated'". The sandbox log confirms Windows sandbox selection: unelevated.
  • Desktop app vs. CLI: both fail identically. They share the same cua_node runtime.

Repro

  1. Windows, desktop 26.1007.9446.0, CLI 0.163.0.
  2. Start a fresh session and ask it to "test browser use on example.com".
  3. The first browser action fails with "trusted Node process exited unexpectedly", and the retry fails with "cua is not defined". The stderr above appears in ~/.codex/logs_2.sqlite under codex_rmcp_client::stdio_server_launcher.

Related: #51590 (sandbox ACL failure, now fixed by #51822). This report is the failure that remains after that fix.

Activity

  1. added
    bug
    app
    windows-os
    mcp
    on Oct 16, 2026
  2. github-actions commented on Oct 16, 2026

    @github-actions
    Contributor
  3. T24G8 commented on Nov 24, 2026

    @T24G8

    Work blocker. I’m also affected by this issue and cannot continue work that requires the in-app Codex Browser. Could a maintainer triage this as a blocker and share a supported workaround or a fixed build to test? A workaround today would let me resume work.

  4. freakx88 commented on Nov 25, 2026

    @freakx88

    Additional Windows desktop reproduction on 2026-11-25 (Asia/Bangkok), with newer bundled versions. Browser and Windows Computer Use remain blocked. The affected user explicitly approved publishing this sanitized diagnostic report here.

    Environment:

    • Windows 11
    • ChatGPT/Codex Windows app: 26.1120.6357.0
    • Bundled CLI: codex-cli 0.171.0-alpha.13.2
    • Browser and Computer Use plugins: 26.1120.50957
    • Bundled cua_node runtime directory identifier: 5649c8f9b0cb6b03

    Verified results:

    • Managed shell execution works; invoking CODEX_CLI_PATH with --version exits 0 and returns codex-cli 0.171.0-alpha.13.2. It also emits access-denied warnings for stale arg0 temp cleanup and PATH alias creation.
    • config.toml contains NODE_REPL_TRUSTED_SERVICES with the official browser service file and @oai/sky/service. The browser service file exists.
    • The bundled CLI's mcp get node_repl --json includes the same trusted-service map in the effective stdio transport environment. This is CLI configuration resolution, not proof of the desktop session's actual spawn payload.
    • In the existing live JavaScript session, typeof nodeRepl.rpc returns undefined.
    • Supported Browser initialization, importing the installed absolute-path browser-client.mjs and calling setupBrowserRuntime(), throws Browser use requires a trusted Node REPL browser service. Initialization fails before selecting iab, reading its runtime documentation, or calling iab.tabs.list(). An earlier direct tabs-list attempt returned iab is not defined.
    • Importing @oai/sky succeeds. The actual await sky.list_apps() call throws sky requires node_repl; configure NODE_REPL_TRUSTED_SERVICES. Import success is not being counted as recovery.

    Additional process-environment observation supplied by the affected user:

    • The running node_repl.exe has CODEX_CLI_PATH, NODE_REPL_TRUSTED_CODE_PATHS, and module-directory variables, but not NODE_REPL_TRUSTED_SERVICES.
    • This process inspection was not independently repeated by the diagnostic agent: CIM process discovery returned access denied.
    • The desktop app regenerates the Node REPL configuration on startup.

    Source/log findings and uncertainty:

    • In the matching public CLI tag rust-v0.171.0-alpha.13.2, rmcp-client/src/utils.rs merges explicit env overrides. protocol/src/shell_environment.rs does not list NODE_REPL_TRUSTED_SERVICES among NON_INHERITABLE_ENV_VARS. The variable being absent from env_vars therefore does not explain loss of an explicitly configured env entry through this code path.
    • Recent inspected MCP logs show successful server handshakes, but no trusted-worker startup error explaining this omission.
    • The disabled unified-computer-use plugin registration uses the different name cua_repl and an empty trusted-service map. This alone does not establish an override or collision with node_repl.
    • The exact loss point is unconfirmed. The supplied process observation suggests an earlier boundary than the original report's trusted-worker failure; we are not claiming the root causes are identical.

    Could maintainers trace the desktop per-session launch configuration/overrides -> node_repl.exe environment -> trusted-worker environment for this build, and identify a supported diagnostic or fixed build? In particular, is NODE_REPL_TRUSTED_SERVICES being omitted from the desktop launch payload, filtered during launch, or consumed/removed by the runtime?

    No config or environment edits, kernel resets, app restarts, reinstalls, sandbox changes, trusted-path broadening, or unofficial bridges were performed during this investigation. Recovery has not been claimed; it requires both supported iab.tabs.list() and sky.list_apps() calls to succeed.

    This report excludes the user's username, local filesystem paths, secrets, and raw logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appbrowserbugcomputer-usemcpwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions