Skip to content

Thread running during an app update loses the cua_repl browser tool permanently #59191

Open

Description

@jancinert

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

26.1027.6604 (Windows, MSIX), updated automatically from 26.1023.6621 on 2026-11-03

What subscription do you have?

ChatGPT (plan reported by Codex: prolite)

What platform is your computer?

Microsoft Windows NT 10.0.26300.0 x64

What issue are you seeing?

A thread that was running during an automatic app update permanently loses the browser tool. After the update the app resumed the thread with an empty turn (turn_trigger: "app_update_resume"), 17 seconds after the new app-server process started. At that moment the thread received a developer message with content_item_kinds: ["tools.removed_definition"]:

The following namespaces are no longer available. Do not call tools in them unless those tools are declared in a later update:

  • mcp__cua_repl

mcp__node_repl was removed and re-added 33 seconds later; mcp__cua_repl never came back. Eight later turns sent from the desktop composer over the next three hours still had no mcp__cua_repl. The agent tried cua in mcp__node_repl__js and got ReferenceError: cua is not defined, then reported that DOM browser control is unavailable.

At the same time, threads created after the update had mcp__cua_repl and used Chrome normally, so the browser extension and its host were working.

From the installed bundle, the cua_repl server entry is written into the computer-use plugin's .mcp.json by the desktop app (enabled only when nodeRepl is set and surfaces is non-empty). The update resume (app_update_resume, same code path as resume_interrupted_task) probably runs before that config is ready, and the loaded thread keeps the tool set it got on resume. This order is inferred from the code, not measured.

What steps can reproduce the bug?

  1. In the desktop app, start a thread and use the browser through cua_repl.
  2. While the thread has a running turn, let the app install an update and restart.
  3. The app resumes the thread (app_update_resume); the thread log shows mcp__cua_repl in "no longer available".
  4. Send another message from the desktop composer and ask for a browser action: mcp__cua_repl is still missing.

What is the expected behavior?

After an update resume the thread gets the same tools as a newly started thread, or the missing namespace is added back as soon as it becomes available ("declared in a later update").

Additional information

Possibly related, but different symptoms: #44724 (cua undefined after reset, tool still listed) and #54447 (trusted worker crash).

Activity

  1. added
    bug
    app
    windows-os
    session
    on Nov 3, 2026
  2. github-actions commented on Nov 3, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  3. jancinert commented on Nov 3, 2026

    @jancinert
    Author

    Related to #58785, but I don't think it is a duplicate. The symptom is the same (mcp__cua_repl disappears from an existing Windows thread while node_repl stays), but the trigger here is different:

    Both may share a root cause (a thread loaded without the cua_repl server and never reconfigured), so linking them should help whoever looks at either one.

  4. julien-m commented on Nov 14, 2026

    @julien-m

    Same bug on macOS, so it is not Windows-specific. It also happens on a plain restart, not only after an update.

    Environment: Codex App 26.1111 (macOS, Darwin 25.5.0 arm64), bundled CLI 0.169.0-alpha.11.1.

    What we observed

    Every thread that the app resumes on its own at launch loses mcp__cua_repl. We saw it with three turn triggers: resume_interrupted_task, goal (goal continuation) and app_update_resume. The rollout gets:

    The following namespaces are no longer available. Do not call tools in them unless those tools are declared in a later update:

    • mcp__cua_repl
    • In the desktop log, the per-thread MCP startup for those threads (mcp_server_startup_status_updated ... threadId=<resumed thread>) lists node_repl, pencil, mail, … but never cua_repl.
    • cua_repl only comes back when the thread is resumed again with fresh config (opening it in the UI). In the desktop log that shows up as server=cua_repl status=starting for that thread, followed by an additional_tools entry with mcp__cua_repl in the rollout.
    • Turns sent into the already-loaded thread don't help. One thread stayed without the tool for 3 h and 8 turns, the same as in your report.
    • Sub-agents spawned by an affected thread are created without mcp__cua_repl too.

    Where it seems to come from (desktop bundle 26.1111, minified)

    The function that builds the per-thread config reads the computer-use reconcile state without waiting for it:

    n = r ? await au(t, { waitForReconcile: !1 }) : null
    ...
    s?.cuaReplEnabled && l?.["mcp_servers.node_repl"] != null
      ? (/* attach cua_repl config */)
      : { ...l, ...nZ }   // nZ = { "mcp_servers.<cua>": { command: process.execPath, enabled: false } }

    At launch, the startup reconcile isn't finished yet. It checks the unified-computer-use plugin, rewrites its .mcp.json and writes config/batchWrite. Meanwhile the automatic resumes (resume_interrupted_task / goal / app_update_resume) already call thread/resume. Those threads get the disabled placeholder, and the loaded thread keeps that MCP set. We read this order from the code and the log timestamps; we did not trace it step by step.

    Suggested fixes

    1. Before resuming threads automatically, wait for the reconcile: use waitForReconcile: true on those paths, or delay auto-resume until cuaReplEnabled is known.
    2. Or, once the reconcile finishes, push the new MCP config to the threads that are already loaded. That way they get cua_repl back, just as they already get node_repl back.

    Workaround that works (verified after a restart)

    Declare a static MCP server in ~/.codex/config.toml under a name the app doesn't rewrite:

    [mcp_servers.cua_repl_static]
    command = "/Applications/ChatGPT.app/Contents/Resources/cua_node/bin/node"
    args = [ "~/.codex/cua-repl-static/launch.mjs" ]  # use an absolute path
    enabled_tools = [ "js", "js_reset" ]
    startup_timeout_sec = 120

    launch.mjs reads mcpServers.cua_repl from the newest ~/.codex/plugins/cache/openai-bundled/unified-computer-use/<version>/.mcp.json and spawns it with that env and CUA_REPL_ENABLED_SURFACES=computer. The browser surface is left out because it needs the pipes the desktop app injects for each thread.

    After a restart, the auto-resumed threads get mcp__cua_repl_static (Added deferred tool namespaces) and cua.getState() succeeds. This covers desktop control only, not browser control.

  5. kristian-create commented on Nov 15, 2026

    @kristian-create

    Additional Windows observation, reported at the user's request on 15 November 2026 (Europe/Oslo).

    Installed package observed: OpenAI.Codex 26.1111.2228.0 x64. OS: Windows NT 10.0.26300.0.

    In an existing long-running Codex desktop conversation, the user could see a tab in the in-app browser while the assistant's available tools lacked the supported mcp__cua_repl entry point in earlier turns. This blocked authorized browser work and led to repeated requests for manual assistance.

    Recovery observed in the current turn: mcp__cua_repl.js became available again. cua.getTab({url: <existing-tab-url>}, {browser: 'iab'}) and accessibility reads then succeeded. Opening an authorized service dashboard in that same in-app browser reused its existing authenticated session without a new password or user sign-in.

    This adds an in-app-browser case and a verified recovery after tool re-exposure. We have NOT established whether an app update triggered this occurrence, why the tool returned, or whether the root cause is the same as this issue. No deterministic fresh-thread reproduction is available. Please investigate capability refresh for existing conversations and provide an actionable recovery signal when a visible browser cannot be controlled.

    No credentials, private URLs, project identifiers, conversation transcripts or raw logs are attached.

  6. ffidelis16 commented on Nov 16, 2026

    @ffidelis16

    Another trigger for this on Windows: a missed heartbeat automation that catches up at launch (turn_trigger: "automation_heartbeat_scheduled"). The result is the same as with resume_interrupted_task / app_update_resume: the thread loses mcp__cua_repl for the whole app-server lifetime.

    Environment: Codex 26.1111.2228.0 (MSIX, x64), bundled plugins 26.1111.21308, Chrome extension 1.26.1102.11740, Windows 10 19045 (pt-BR). Thread 01a1d5ce-e69c-7683-a8aa-85ea4cf1c916 is the target_thread_id of two heartbeat automations.

    What happened (UTC, 2026-11-15)

    • 21:36:28 the app-server starts.
    • 21:37:35 the thread is loaded and its node_repl is spawned. No cua_repl process is spawned for it.
    • 21:38:21 first turn = automation_heartbeat_scheduled (catch-up of the 12:15 run, missed while the app was closed), with active_permission_profile: null.
    • 21:38:26 a world_state delta removes mcp__cua_repl, mcp__cua_repl.js and mcp__cua_repl.js_reset, plus 6 MCP servers that were still pending. Those 6 came back within 4 minutes.
    • Five composer turns over the next 35 minutes, some with @Chrome mentions: mcp__cua_repl never came back. The tool_catalog logs never list cua_repl as pending or not ready for this thread.
    • In the same app-server, two threads opened by the user at 21:39 and 21:50 each got their own cua_repl process and controlled Chrome normally. The extension host and the backend pipe were healthy the whole time.

    The same sequence happened on 2026-11-14: a heartbeat catch-up ran 3 s after a new app-server started, and the thread had no cua_repl until a manual restart where the first turn was a composer turn.

    Side effect worth noting: without cua_repl, the agent fell back to the chrome-devtools and Playwright MCP servers, which started a separate Chrome instance where Google refused sign-in. So this bug can push agents out of the user's signed-in browser.

    Workaround (verified): pause the heartbeat automations that target browser threads, restart the app, and make the first turn in that thread a composer turn. After that, mcp__cua_repl was attached on the first turn (2026-11-15 22:47:57Z) and stayed across turns. Two turns 15 minutes apart listed the Chrome tabs, read an existing tab, and confirmed the signed-in account without changing the page.

    Related: #46782 (resumed task omits cua_repl; one comment there also mentions a conversation with an attached recurring automation) and #29610 (heartbeat runs with permissions: null).

  7. ninastienjkt88-dev commented on Nov 17, 2026

    @ninastienjkt88-dev

    On Windows, Codex Desktop 26.1111.2228.0 with Computer Use 26.1111.21308 also showed intermittent mcp__cua_repl availability across conversations. An existing thread recorded a tools.removed_definition notice, while a separate thread later exposed the tool again. I have not established whether an app update, automatic resume, or startup race triggered this occurrence. The symptoms may overlap with this report, but a shared root cause remains unconfirmed. Further independent reproduction across Windows builds is needed.

  8. eggrollofchaos commented on Nov 18, 2026

    @eggrollofchaos

    Same behavior on macOS, with process start times that show the order directly.

    Environment: Codex desktop app 26.1111.21308 on macOS 27.2.1 (26B131), Apple silicon.
    Bundled CLI codex-cli 0.169.0-alpha.11.1. Also reproduced in a standalone
    codex app-server --listen unix:// --managed-daemon on 0.170.0.

    Timeline (UTC, one app relaunch):

    Time Event
    05:51:37 The desktop app's codex app-server process starts (after the app was relaunched).
    05:51:47 Thread A starts its first turn after the relaunch. At 05:51:47.6 it receives the developer message "The following namespaces are no longer available ... - mcp__cua_repl". Its tool state drops mcp__cua_repl (js, js_reset) and mcp__artifact_session.
    05:51:52 Thread B starts a turn in the same process and loses the same tools.
    05:52:01 The codex-code-mode-host child of that app-server starts (ps -o lstart), 14 s after thread A's turn began.
    05:53:48, 05:54:03 Thread A runs two more turns in the same process. The tools do not come back.

    The same race in the standalone app-server. That server had been running since 04:38:30.
    Its codex-code-mode-host child did not start until 05:52:21, when turns arrived, so the host
    appears to start on demand rather than with the server. A thread whose turn started there at
    05:52:15 lost the same tools; another thread whose turn started at 05:53:45, after the host was
    up, had them.

    Recovery: quit and relaunch the app, wait until pgrep -fl codex-code-mode-host shows a
    host whose parent is the new app-server, then open the thread. Its next turn has the tools.
    Across our local history, 16 threads lost these tools this way since 2026-10-27, 10 of those
    losses before any standalone app-server was installed on the machine.

    Expected: a turn that starts before the code-mode host is ready either waits for it, or the
    missing namespaces are declared again once the host is up, as the "declared in a later update"
    wording suggests.

  9. ninastienjkt88-dev commented on Nov 18, 2026

    @ninastienjkt88-dev

    Additional Windows evidence: thread resume overlaps plugin reconciliation

    Read-only Codex Desktop logs from 2026-11-14 (UTC) show:

    • 13:43:56.049 — Bundled-plugin reconciliation started.
    • 13:44:01.973 — An existing thread began maybe_resume, 339 ms before reconciliation completed.
    • 13:44:02.317–13:44:07.975 — A second reconciliation ran while thread/resume completed.
    • 13:44:03.950 — MCP startup records listed other servers, but no cua_repl.
    • 13:44:19.235 — The thread received tools.removed_definition for mcp__cua_repl.
    • 15:18:47 — Another thread successfully registered cua_repl as ready.

    An earlier Desktop lifecycle had successfully registered cua_repl for the affected thread after bundled-plugin reconciliation completed.

    Environment: Windows, Codex Desktop 26.1111.2228.0, CLI 0.169.0-alpha.11.1, Computer Use 26.1111.21308.

    These observations support investigating a resume/configuration timing race, but do not establish causation. Bundled-plugin reconciliation does not necessarily indicate Computer Use-specific readiness. The historical codex-code-mode-host startup time and effective per-thread MCP configuration remain unverified.

    Could maintainers investigate configuration readiness at thread/resume and whether missing tool definitions are republished after initialization?

  10. jancinert commented on Nov 19, 2026

    @jancinert
    Author

    Reproduced again on the current Windows build, with timestamps from the desktop log and the thread rollout.

    Environment: Windows 11 (NT 10.0.26300) x64, Codex MSIX updated automatically from 26.1111.2228.0 to 26.1111.9664.0, bundled plugins 26.1111.71704, app-server 0.169.1.

    Timeline (UTC, 2026-11-19)

    Time Event
    09:58:31 The app relaunches for the update (--codex-update-attempt, 26.1111.2228.0 → 26.1111.9664.0).
    09:58:35 The new app-server starts.
    09:58:46–09:58:56 maybe_resume for a thread that had a running turn; thread/resume completes at 09:58:54.
    09:58:49 Bundled plugin reconcile starts.
    09:58:53–09:59:16 While the reconcile reinstalls bundled plugins into the plugin cache (codex-app-tools, browser at 09:59:12–09:59:14), unified-computer-use tool discovery and every node_repl start for that thread fail with MCP startup failed: The system cannot find the path specified. (os error 3).
    09:59:12 The thread's app_update_resume turn starts.
    09:59:13 tool_catalog: omitting MCP server without an exact ready client server_name=node_repl
    09:59:14 Developer messages: mcp__cua_repl is "no longer available", and mcp__artifact_session is removed.
    09:59:17 node_repl becomes ready.
    09:59:19 "Added deferred tool namespaces" includes mcp__codex_app, but not mcp__cua_repl or mcp__artifact_session.
    10:09:23 A composer turn in the same, still loaded thread: no mcp__cua_repl. The agent reports that it cannot control the signed-in Chrome, although the extension, the native-host manifest and both extension-host processes from the new package were healthy.
    10:16:45 The app is quit and relaunched (same version 26.1111.9664.0).
    10:17:18 server=cua_repl status=starting → ready for that thread. No automatic resume ran first.
    10:17:40 The first composer turn after the relaunch gets "Added deferred tool namespaces" with mcp__cua_repl and mcp__artifact_session. Chrome control works from then on.

    What this adds

    • It still happens on 26.1111.9664.0.
    • In this run the auto-resume turn started while the bundled plugin reconcile was still rewriting the plugin cache. During that window the MCP servers that depend on it failed with os error 3, not just "not ready yet". node_repl recovered within seconds and was added back, but cua_repl was never started for the thread until the app was relaunched.
    • A composer turn in the already loaded thread did not help. A full relaunch whose first turn in that thread was a composer turn did. That matches the workaround reported above for heartbeat catch-ups.
  11. KFLCHI001 commented on Nov 20, 2026

    @KFLCHI001

    I reproduced this on Windows x64 (build 26200, Codex MSIX package 26.1117.3838.0) on November 20. Tab-scoped Edge control had worked in the same chat. Codex then restarted for an update and resumed the chat. The browser tool disappeared, although Codex still showed the in-app browser tab. The browser runtime returned Trusted RPC service is not configured: browser when we tried to reconnect.

    There was a second problem. The assistant switched to Windows desktop control despite a global instruction favoring tab-scoped control. The user stopped the desktop attempt. Please restore browser-tool availability when a chat resumes after an update. If tab control cannot be recovered, Codex should surface that limitation and honor an explicit browser-only instruction. The update correlation is observed. The root cause is unknown.

  12. CHZarles commented on Nov 29, 2026

    @CHZarles

    Filed #64529 for the transient/self-healing variant of this startup race: mcp__drawio is reported as Removed while its MCP server is still starting, then Added on the next sampling step. It includes two clean timelines and points at ToolsState::render_diff comparing the persisted world-state checkpoint with the freshly rebuilt, not-yet-ready MCP registry. This may help isolate the same race that permanently drops cua_repl here.

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

    appbrowserbugsessionwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions