Skip to content

macOS: cua_repl does not respawn after launch.mjs/node_repl exit; createBrowserTab returns Transport closed in ~1ms #44518

Open

Description

@limbooomaker

What version of Codex CLI is running?

codex-cli 0.153.4 (codex app-server --enable goals)

Computer Use runtime comes from ChatGPT.app 26.903.61454 (build 8378) via plugin unified-computer-use@openai-bundled (launch.mjs + bundled cua_node / node_repl). Hosts observed: 26.901.51231 and 26.903.61454.

What subscription do you have?

Logged in with ChatGPT. Exact plan not exposed by this CLI/app-server path.

Which model were you using?

Not model-dependent. Reproduced on gpt-5.6-luna because that is the long-lived thread; the failures are MCP transport / Computer Use host lifecycle.

What platform is your computer?

Darwin 25.6.0 arm64 arm (macOS 26.6.2, 25G83)

What terminal emulator and version are you using (if applicable)?

Not a TUI session. codex app-server --enable goals spawned by Paseo Desktop 0.8.0-beta.1 (bundle sh.paseo.desktop). Same plugin/cua_repl stack as Codex Computer Use.

Codex doctor report

not available (not run; this is a Computer Use MCP transport failure on a long-lived app-server)

What issue are you seeing?

Two related Computer Use failures on a long-lived app-server that we did not restart.

A. Chrome CUA works, then getState() reports no browsers while the Chrome native host is still alive.

cua.createBrowserTab("chrome", url, { sessionName }) plus Playwright waitForEvent("filechooser") + setFiles succeeded (2026-09-10 ~17:37–17:48 local, and createBrowserTab("chrome", …) again ~18:39).

Later the same process’s cua.getState() returned:

apps=[]
browsers=[]
Sky Computer Use native pipe startup failed

At that time:

  • Google Chrome was still running
  • native host ChatGPT for Chrome (chrome-extension://hehggadaopoacecdllhhajmbjkdcmajg/) was still a child of Chrome
  • js_reset did not restore browsers

Plugin env:

CUA_REPL_ENABLED_SURFACES=browser,computer

Sky Apple Events were already failing for the responsible parent app. A Sky native-pipe failure appears to zero both surfaces.

B. After launch.mjs / node_repl exit, cua_repl never respawns. Every subsequent call is Transport closed in milliseconds.

The app-server stayed up (writer lock still held). Its children no longer included launch.mjs / node_repl. Next calls:

tool call error: tool call failed for `cua_repl/js_reset`

Caused by:
    Transport closed
tool call error: tool call failed for `cua_repl/js`

Caused by:
    Transport closed

Exact MCP item for the last createBrowserTab (URL/session name redacted):

server: cua_repl
tool: js
status: failed
error.message: tool call error: tool call failed for `cua_repl/js`

Caused by:
    Transport closed
duration: { "secs": 0, "nanos": 1408875 }

Wall time printed by the tool wrapper: 0.0046 seconds.

Quitting ChatGPT.app and retrying the same createBrowserTab("chrome", …) (no getState, no js_reset) still returned Transport closed in ~1.4ms. No new CUA host appeared under the app-server. Another app-server on the same machine still had a live 26.903.61454 launch.mjs child, so Computer Use is not globally dead — only this session’s MCP stdio.

What steps can reproduce the bug?

The empty-browsers state is intermittent. The Transport closed / no-respawn path is reproducible once the bound host is gone.

  1. Keep a Codex app-server alive for many hours with unified-computer-use / cua_repl attached (do not start a new thread).

  2. Confirm Chrome CUA works:

    let tab = await cua.createBrowserTab("chrome", "https://example.com", { sessionName: "repro" });
    tab
  3. Leave the session running. Optionally quit/relaunch ChatGPT.app, or let Sky native pipe fail. Call cua.getState(). Observe browsers=[] and Sky Computer Use native pipe startup failed even if the Chrome extension native host is still running.

  4. Kill or wait until this thread’s …/unified-computer-use/*/scripts/launch.mjs and its node_repl children exit. Do not kill the app-server.

  5. Call js_reset and/or cua.createBrowserTab("chrome", …) again.

Expected: Codex starts a new launch.mjs host for cua_repl, or surfaces an actionable “Computer Use host died, restart MCP” error.

Actual: Transport closed in ~1ms. pgrep -P <app-server-pid> still has no CUA child. js_reset cannot recover a dead stdio transport. Starting a different app-server can still get a fresh host.

What is the expected behavior?

  • getState() / createBrowserTab("chrome") should not depend on Sky native pipe when the Chrome native host is alive. If CUA_REPL_ENABLED_SURFACES includes browser, a computer handshake failure should not report browsers=[].
  • If launch.mjs / node_repl exits, app-server should respawn cua_repl on the next tool call (or clearly mark the MCP server as dead and restart it). js_reset should not be the only recovery, and it should not be offered when the transport is already closed.
  • Long-lived sessions should not require killing app-server (and losing the thread writer lock) to get Computer Use back.

Additional information

Related:

.mcp.json for cua_repl (paths redacted to usernames):

command: /Applications/ChatGPT.app/Contents/Resources/cua_node/bin/node
args: [ "~/.codex/plugins/cache/openai-bundled/unified-computer-use/26.903.61454/scripts/launch.mjs" ]
env.CUA_REPL_ENABLED_SURFACES: browser,computer
env.CUA_REPL_NODE_REPL_PATH: /Applications/ChatGPT.app/Contents/Resources/cua_node/bin/node_repl
startup_timeout_sec: 120
tools: js, js_reset, turn_ended

Activity

  1. limbooomaker commented on Sep 10, 2026

    @limbooomaker
    Author

    Paseo-side counterpart (long-lived desktop-spawned app-server cannot recover CUA without killing the agent): getpaseo/paseo#4656

  2. added
    bugSomething isn't working
    CLIIssues related to the Codex CLI
    app-serverIssues involving app server protocol or interfaces
    mcpIssues related to the use of model context protocol (MCP) servers
    connectivityIssues involving networking or endpoint connectivity problems (disconnections)
    on Sep 10, 2026
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

    CLIIssues related to the Codex CLIapp-serverIssues involving app server protocol or interfacesbrowserbugSomething isn't workingcomputer-useconnectivityIssues involving networking or endpoint connectivity problems (disconnections)mcpIssues related to the use of model context protocol (MCP) servers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions