Windows Codex Desktop 26.616: node_repl/js fails with codex/sandbox-state-meta missing field `sandboxPolicy`

Open 💬 21 comments Opened Jun 20, 2026 by CMFHF-404
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What issue are you seeing?

On Windows Codex Desktop, the node_repl MCP server is visible and some helper tools work, but the JavaScript execution tool fails before user code runs:

tool call error: tool call failed for `node_repl/js`

Caused by:
    Mcp error: -32602: js: codex/sandbox-state-meta: missing field `sandboxPolicy`

This blocks the Browser, Chrome, and Computer Use plugin paths that depend on node_repl/js.

Environment

  • Platform: Windows
  • Codex Desktop app version observed in local node_repl env: 26.616.41845
  • Codex CLI visible from the configured Desktop CLI path: codex-cli 0.142.0-alpha.6
  • node_repl.exe path class: %LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\<hash>\bin\node_repl.exe
  • node_repl.exe timestamp: 2026-06-17
  • Local config includes:
[features]
js_repl = true

[mcp_servers.node_repl]
args = []
command = '...\runtimes\cua_node\<hash>\bin\node_repl.exe'
startup_timeout_sec = 120

[windows]
sandbox = "elevated"

Note: before troubleshooting, js_repl was false; changing it to true and retrying in the current thread did not change the failure. A full Desktop restart may still be required for that setting to affect thread/tool injection, but the live failure is specifically a missing sandboxPolicy field in codex/sandbox-state-meta.

Steps to reproduce

  1. Open Codex Desktop on Windows with browser@openai-bundled, chrome@openai-bundled, and/or computer-use@openai-bundled enabled.
  2. Expose the Node REPL tool via tool discovery, e.g. search for node_repl js.
  3. Call the minimal JS tool:
nodeRepl.write('ping')

Actual behavior

The call fails immediately, before JS execution:

Mcp error: -32602: js: codex/sandbox-state-meta: missing field `sandboxPolicy`

Expected behavior

A minimal nodeRepl.write('ping') call should return ping, or the tool should return a clear actionable error if the current thread/app-server cannot provide the required sandbox metadata.

Things verified / ruled out

  • tool_search can expose the node_repl tools in the affected thread.
  • js_reset works and returns js kernel reset.
  • js_add_node_module_dir works and returns false when the configured module directory is already present.
  • Only the js execution tool fails.
  • The failure occurs before any user JavaScript executes, so this is not caused by the Browser/Chrome bootstrap code, Playwright, or project code.
  • Ordinary shell/file tools in the same Codex thread continue to work.

Why this looks like a Desktop/app-server/MCP metadata issue

The error is a serde-style required-field failure for the codex/sandbox-state-meta metadata object passed to the MCP tool call. The node_repl server appears to expect sandboxPolicy, but the live tool call metadata contains no such field.

This looks related to the same general area as these existing reports, but has a different exact failure string:

  • #20417: Browser Use IAB unavailable because node_repl/js is not injected
  • #21301: node_repl/js availability diverges by thread
  • #25349: Windows Codex Desktop node_repl/js fails before Chrome bridge can run
  • #28978: Desktop 26.616 missing required MCP/schema field during tool-list assembly

Request

Please check the Windows Codex Desktop/app-server path that injects codex/sandbox-state-meta into node_repl/js tool calls. It appears to be omitting the now-required sandboxPolicy field, causing node_repl/js to reject even the smallest JS execution call.

View original on GitHub ↗

21 Comments

github-actions[bot] contributor · 1 month ago

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

  • #29189

Powered by Codex Action

danieldilly · 1 month ago

Same issue. Here was the feedback Id I was given within the app when I used the submit feedback option: 019ee453-9baa-7b50-a246-0246acb21ab9

CJavierSaldana · 1 month ago

Same issue here, reproduced on macOS (not Windows) with the same Desktop build.

Environment:

  • Codex Desktop: 26.616.41845, build 4198
  • macOS: 26.5.1 (25F80), arm64
  • Bundled plugins enabled: chrome@openai-bundled, browser@openai-bundled

Observed behavior:

  • node_repl/js fails immediately before user code runs:
Mcp error: -32602: js: codex/sandbox-state-meta: missing field `sandboxPolicy`
  • js_reset and other helper tools may work, but any actual JS execution fails at the same MCP metadata boundary.
  • This blocks Browser, Chrome, and any workflow that depends on node_repl/js.

Additional symptom (Chrome profile):

  • Codex opens Chrome with a new empty profile instead of my normal Chrome profile that already has the Codex extension and all my integrations enabled.
  • So even aside from the sandboxPolicy error, the browser surface Codex provides is effectively useless — zero extensions, zero logins, zero integrations.

Impact:

  • Chrome plugin, in-app browser, and browser automation are all unavailable.
  • Ordinary shell/file tools continue to work in the same thread.

Looks like the same app-server / codex/sandbox-state-meta regression as #29189 and #29193, just hitting macOS instead of Windows.

nknight14 · 1 month ago

Posted to OpenAI Codex issue: https://github.com/openai/codex/issues/29193

Sanitized report:

I reproduced a closely related Windows Desktop failure on Codex Desktop 26.616 after the update, and I think there may be two interacting problems:

  1. node_repl/js receives malformed or outdated sandbox metadata in some Desktop app-server / thread states.
  2. Existing threads can keep a closed MCP transport after the failed node_repl startup, so settings may show the Browser / Computer Use plugins enabled while those threads still cannot call the tool until the app-server is restarted and the runtime path is repaired before the next MCP startup.

Observed symptoms:

  • Settings showed the relevant Browser / Computer Use surfaces enabled.
  • Some threads could not call node_repl/js.
  • Minimal call failed before user JS executed:
Mcp error: -32602: js: codex/sandbox-state-meta: missing field `sandboxPolicy`
  • After killing stale node_repl children, affected threads reported:
Transport closed
  • The transport did not hot-recover in those already-loaded threads. A full Desktop app-server restart was needed.

Environment:

  • Windows Desktop app package observed locally: OpenAI.Codex_26.616.5445.0_x64__2p2nqsd0c76g0
  • Bundled Browser / Computer Use skill version observed locally: 26.616.41845
  • Local trusted Windows workspace
  • codex mcp list showed node_repl enabled, but the Desktop app-server still spawned the bundled cua_node runtime directly in at least one code path.

Investigation notes:

  • Browser and Computer Use both depend on node_repl/js, so the sandbox metadata failure breaks both even when their UI toggles show enabled.
  • A compatibility shim that only handled newline-delimited JSON was insufficient; the MCP stdio traffic appears to be Content-Length framed, so the shim had to preserve/rewrite framed MCP messages and update the Content-Length.
  • The missing field can be worked around by normalizing params._meta["codex/sandbox-state-meta"].sandboxPolicy from older/snake_case fields, with a conservative fallback like { "type": "danger-full-access" } when the current Desktop permission mode is full access.
  • Codex Desktop runtime refresh can overwrite a modified cua_node/bin/node_repl.exe, so any local mitigation that wraps node_repl.exe needs to run after Desktop startup/runtime refresh.
  • There was a secondary Computer Use issue after node_repl recovered: computer-use-client.mjs failed when the privileged native pipe path was absent:
Computer Use native pipe is unavailable: failed to connect native pipe: system cannot find the file specified / os error 2

For local recovery only, falling back from the plugin wrapper to @oai/sky's Windows helper transport when the Desktop native pipe is unavailable allowed the read-only Computer Use smoke test to pass.

Validation after local mitigation:

  • nodeRepl.write("ok") succeeds.
  • In-app Browser read-only smoke test succeeds:
await setupBrowserRuntime({ globals: globalThis });
const browser = await agent.browsers.get("iab");
await browser.tabs.list();
  • Computer Use read-only smoke test succeeds:
await setupComputerUseRuntime({ globals: globalThis });
const apps = await sky.list_apps();

Result:

  • sky.list_apps() returned 41 apps.
  • browser.tabs.list() returned successfully.
  • The same previously affected existing thread also recovered after app-server restart plus the local runtime/shim repair.

No private local path, username, thread id, workspace name, or project content is included in this report. I can provide a sanitized diff of the local mitigation if useful, but I suspect the product fix should be in Desktop app-server metadata compatibility and node_repl MCP startup/transport recovery rather than in user config.

guansiyu0930-ui · 1 month ago

I am experiencing the same issue on Windows.

Codex Desktop Appx version:
26.616.5445.0

Exact error:
MCP error -32602:
codex/sandbox-state-meta: missing field sandboxPolicy

Computer Use worked earlier on the same PC and successfully controlled
Microsoft Word and Zotero. It displayed “Codex is using your computer”
and showed the per-app permission prompt.

After reinstalling and re-enabling Computer Use, all new threads fail
before screen, mouse, or keyboard control starts.

Feedback ID:
019ee5bd-3386-7140-a1c1-1dafcdb8b8e9

Clean reinstall, sandbox reset, app restart, new threads, workspace-write
mode, and elevated Windows sandbox did not resolve the issue.

<img width="942" height="1280" alt="Image" src="https://github.com/user-attachments/assets/d945a3b3-7995-402d-bb55-60e9998b5d06" />

<img width="1006" height="1280" alt="Image" src="https://github.com/user-attachments/assets/2973700a-ae58-4a93-806d-cc937ec4e23d" />

<img width="1918" height="1017" alt="Image" src="https://github.com/user-attachments/assets/32ae26eb-db7f-4246-9740-95c3011e6264" />

<img width="1919" height="1005" alt="Image" src="https://github.com/user-attachments/assets/a8a0e202-3594-448f-acb2-80f66bf94598" />

guansiyu0930-ui · 1 month ago

Additional local diagnostic evidence:

  • Codex Desktop Appx: 26.616.5445.0
  • Computer Use plugin cache: 26.616.41845
  • Codex CLI/app-server component: 0.142.0-alpha.6
  • Node runtime: v24.14.0, status reported as ok
  • Windows 11 build: 26200

Local checks confirmed:

  • computer-use@openai-bundled is enabled.
  • requirements.toml does not exist, so Computer Use is not disabled there.
  • node_repl.exe, codex-computer-use.exe, and computer-use-client.mjs are present.
  • Appx and cached copies of computer-use-client.mjs have the same SHA-256:

566BE6EF352EB3DE899ADC56A9CD7B5E46C8F65B00E56B5630DD7A580E10CBEA

  • The latest Windows sandbox refresh completed with errors=[].
  • The latest ACL refresh completed successfully.
  • No current error 1385, logon failure, or sandbox setup failure was found.
  • TCP 443 connectivity to chatgpt.com, openai.com, and api.openai.com succeeded.

The reproducible failure is:

tool call failed for `node_repl/js`

Mcp error: -32602:
js: codex/sandbox-state-meta:
missing field `sandboxPolicy`

Observed timestamps include:

  • 2026-06-20 23:26:47 +08:00
  • 2026-06-20 23:26:51 +08:00
  • 2026-06-20 23:54:22 +08:00
  • 2026-06-20 23:54:29 +08:00

The call fails in approximately 2 ms, before user JavaScript, the Computer Use native pipe, screen/mouse control, or the per-app approval UI can start.

This strongly suggests that sandboxPolicy exists at the Desktop/thread configuration level but is omitted or lost while Desktop/app-server serializes and forwards codex/sandbox-state-meta to the MCP node_repl/js call.

Feedback ID:
019ee5bd-3386-7140-a1c1-1dafcdb8b8e9

3VILALLIUM · 1 month ago

Adding my Windows repro here as well, since this issue is tracking the same node_repl/js failure on Windows. Feedback/session ID: 019ee5d3-7653-7870-95c3-5841e75db374.

Environment, sanitized:

  • Codex Desktop: 26.616.5445.0, Windows x64 Store package.
  • Bundled Browser/Chrome/Computer Use plugin runtime observed: 26.616.41845.
  • Bundled node_repl runtime observed under cua_node/a89897d3d9baa117/bin/node_repl.exe.
  • Chrome is installed and running; Chrome version observed: 149.0.7827.116.
  • Codex Chrome Extension is installed in the selected Default profile; extension version observed: 1.1.5_0.
  • browser@openai-bundled, chrome@openai-bundled, and computer-use@openai-bundled are enabled in Codex config.
  • Windows sandbox setting is unelevated.

What I am seeing:

  • @Chrome, Browser, and Computer Use are all blocked because they depend on the same node_repl/js route.
  • This blocks workflows that require the real/default Chrome profile. Browser Playwright can still work for public pages, but it is not a substitute for logged-in/default-profile Chrome workflows.
  • Multiple Codex restarts and troubleshooting passes have not recovered Chrome or Computer Use for me.

Troubleshooting I tried before posting:

  • Retried the official mcp__node_repl route after rediscovery:
  • js_reset -> Transport closed
  • minimal js smoke test nodeRepl.write('official-node-repl-ok') -> Transport closed
  • js_add_node_module_dir -> Transport closed
  • Checked the Chrome/plugin side:
  • Chrome process is running.
  • Codex native messaging host process is running.
  • Native messaging manifest exists, points to extension-host.exe, the target exists, and the allowed origin matches the Codex Chrome extension ID.
  • Codex Chrome Extension directory exists in Default profile with version 1.1.5_0.
  • Named pipes for chrome.nativeMessaging, codex-browser-use, and codex-computer-use are present.
  • Checked local plugin/runtime cache:
  • Chrome latest points to 26.616.41845.
  • Browser and Computer Use only have 26.616.41845 cached locally, so I do not have an obvious local rollback target.
  • Checked update path:
  • winget list --name Codex reports Store package 26.616.5445.0.
  • winget upgrade --id 9PLM9XGG6VKS --source msstore --exact reports no available upgrade.
  • Ran a disposable standalone MCP probe against the bundled node_repl.exe, without touching browser/account data:
  • With sandboxPolicy.type = "workspace-write" plus sandboxCwd, minimal JS executes successfully and returns manual-node-repl-ok.
  • Omitting required metadata fields fails validation before JS runs.
  • Using camelCase type value workspaceWrite is rejected by the runtime; the runtime expects kebab-case values such as workspace-write.
  • Tried using that standalone working node_repl to bootstrap the bundled Chrome browser-client.mjs; it fails with:
privileged native pipe bridge is not available; browser-client is not trusted

My current read:

  1. The bundled node_repl.exe binary itself can execute JavaScript when launched with the metadata shape it expects.
  2. The official Desktop MCP node_repl route in the affected thread is stuck at Transport closed after transport reset attempts.
  3. A standalone node_repl cannot replace the official Desktop route for Chrome because the privileged/trusted native pipe bridge is unavailable outside the Desktop-managed path.
  4. Chrome, the extension, native host registration, and local bridge artifacts appear present, so this does not look like a normal Chrome install/profile/native-host issue.

I am intentionally not attaching screenshots, raw logs, account/profile data, repo names, local usernames, browser history, cookies, or full local paths here for privacy. The sanitized evidence above points to a shared Desktop node_repl transport or metadata/privileged-bridge regression rather than a site-specific, project-specific, or Chrome-extension-only failure.

guansiyu0930-ui · 1 month ago

Additional test result:

I changed the Windows sandbox from elevated to unelevated, fully terminated all Codex, node_repl, and Computer Use processes, restarted Codex normally, and tested again in new threads.

Computer Use still did not load. The session reported that no callable Computer Use control tool was available.

I have now restored the recommended setting:

[windows]
sandbox = "elevated"

Therefore, the issue reproduces under both Windows sandbox implementations.

nknight14 · 1 month ago

Sanitized follow-up for openai/codex#29193

Follow-up after further local debugging on Windows Codex Desktop 26.616.5445.0 with the bundled Browser / Chrome / Computer Use plugin family observed at 26.616.41845.

This is a sanitized report. I am intentionally not including local usernames, full local paths, thread IDs, window titles, document contents, screenshots, or app data. Paths below use %USERPROFILE% / %LOCALAPPDATA% placeholders.

What changed after the earlier sandboxPolicy workaround

After the previous local workaround restored node_repl/js availability in affected threads, Browser and lightweight Computer Use calls started working again. For example:

  • Browser setup and tabs.list() worked.
  • Computer Use list_apps() worked.

However, actual app control still failed when targeting an app window, with:

Computer Use requires app approval but elicitations are unavailable

So there appear to be two separate layers:

  1. node_repl/js can fail before plugin code runs because _meta["codex/sandbox-state-meta"] lacks sandboxPolicy.
  2. After node_repl/js is restored, Computer Use can still fail when app-control approval is requested, because the fallback helper path has no usable elicitation callback.

Local root-cause notes

In the affected local runtime, globalThis.nodeRepl exposed only the normal unprivileged helpers:

cwd, emitImage, env, homeDir, requestMeta, setResponseMeta, tmpDir, write

It did not expose:

config, nativePipe, createElicitation

The object and nodeRepl.requestMeta were also non-extensible, so it was not possible to simply attach nodeRepl.config.createElicitation or inject x-oai-cua-approved-app into request metadata from user JS.

The bundled Computer Use client first tries the official privileged native-pipe path. In this affected state, that path is unavailable because nodeRepl.nativePipe / the native pipe directory are unavailable. Falling back to the normal @oai/sky helper can make list_apps() work, but when app control begins, the helper sends an approval request. The @oai/sky helper transport then needs a createElicitation callback. Without that callback it throws:

Computer Use requires app approval but elicitations are unavailable

Workaround that restored app control locally

The working local workaround was to patch the bundled Computer Use client wrapper, not the minified helper transport itself.

When the native-pipe path is unavailable and the client falls back to @oai/sky, I wrap sky.transport.request() and provide a local createElicitation callback:

function installLocalApprovalElicitation(sky) {
  const transport = sky?.transport;
  if (
    transport == null ||
    typeof transport.request !== "function" ||
    transport.__codexLocalApprovalFallbackInstalled === true
  ) {
    return;
  }

  const originalRequest = transport.request.bind(transport);
  transport.request = (method, params, options = {}) =>
    originalRequest(method, params, {
      ...options,
      createElicitation: createLocalApprovalElicitation,
    });

  Object.defineProperty(transport, "__codexLocalApprovalFallbackInstalled", {
    configurable: true,
    value: true,
  });
}

The callback does not blindly approve unless there is an explicit local opt-in file:

%USERPROFILE%\.codex\computer-use\local-approval-fallback.json

Example safe shape:

{
  "enabled": true,
  "allowAnyApp": false,
  "allowedApps": [
    "Microsoft.Office.WINWORD.EXE.15",
    { "pattern": "Microsoft.Office.*" }
  ]
}

For my local machine only, I used an allowAnyApp: true opt-in because Codex settings already showed Computer Use enabled for "Any app". I would not recommend an unconditional app-control auto-approval fallback as a general fix. A whitelist or a restored real app approval UI is safer.

The useful part is that @oai/sky already knows how to retry the original helper request after createElicitation returns { action: "accept" }. The workaround only supplies the missing elicitation result when the official Desktop approval surface is unavailable.

Validation

After resetting the JS kernel / using a fresh thread so the singleton @oai/sky transport did not retain an older wrapper:

  • setupComputerUseRuntime() succeeded.
  • sky.list_apps() succeeded.
  • Target app: Microsoft.Office.WINWORD.EXE.15.
  • sky.get_window(...) succeeded.
  • sky.activate_window(...) succeeded.
  • sky.get_window_state({ include_screenshot: false, include_text: true }) returned without the approval/elicitation error. In that test the Word window did not expose an accessibility tree, but the request itself completed and no screenshot or document text was printed.

Persistence used locally

To keep the workaround from being lost after runtime/plugin refreshes, I also kept the earlier local self-repair/watchdog approach:

  • A node_repl launcher/shim under %USERPROFILE%\.codex\scripts\... that patches missing sandbox metadata before forwarding to the original bundled node_repl.
  • A self-repair script that restores the launcher and reapplies the Computer Use client wrapper patch if the bundled plugin cache is refreshed.
  • A per-user Run-key watchdog that re-runs the self-repair script after Codex restarts or the runtime changes.

Again, those are local diagnostic workarounds, not recommended as the final product behavior. The likely product fix is to make sure Desktop-provided Computer Use sessions expose the privileged native pipe and/or a working createElicitation approval callback consistently, including in existing threads after plugin settings are changed.

nknight14 · 1 month ago

Additional sanitized follow-up: existing threads can retain stale Computer Use state

Follow-up for the same Windows Desktop node_repl / Computer Use regression.

This is sanitized: I am not including local usernames, full local paths, thread IDs, window titles, document text, screenshots, project names, or file contents. Paths use placeholders.

New observation

After the local file-level mitigation restored node_repl/js and patched the Computer Use fallback approval path, a newly reset test session could use Computer Use against a Word window. However, a separate existing thread still failed with:

Computer Use requires app approval but elicitations are unavailable

This happened even though:

  • the patched computer-use-client.mjs was present in the plugin cache and mirror;
  • the self-repair/watchdog had already re-applied the file-level mitigation;
  • another thread could initialize Computer Use and pass the Word smoke test.

Thread-local cause

The affected existing thread had already initialized @oai/sky / globalThis.sky before the file-level mitigation was applied.

The thread then used the usual bootstrap guard:

if (!globalThis.sky) {
  const { setupComputerUseRuntime } = await import("file:///%USERPROFILE%/.codex/plugins/cache/openai-bundled/computer-use/26.616.41845/scripts/computer-use-client.mjs");
  await setupComputerUseRuntime({ globals: globalThis });
}

Because globalThis.sky already existed, the thread skipped re-importing the patched Computer Use client and kept using the stale in-memory @oai/sky.transport without the local createElicitation wrapper. As a result, it continued to throw the same app-approval/elicitation error even after the disk files were fixed.

Recovery that worked for the existing thread

The existing thread recovered only after clearing the thread-local JS kernel and forcing a fresh import with a cache-busting URL.

Sequence:

  1. Run node_repl/js_reset in the affected thread.
  2. Import the patched Computer Use client with a cache-busting query string, not through the old if (!globalThis.sky) guard.
  3. Run setupComputerUseRuntime({ globals: globalThis }).
  4. Re-run a read-only Computer Use smoke test.

Sanitized shape:

const mod = await import(
  `file:///%USERPROFILE%/.codex/plugins/cache/openai-bundled/computer-use/26.616.41845/scripts/computer-use-client.mjs?threadFix=${Date.now()}`
);
await mod.setupComputerUseRuntime({ globals: globalThis });

const apps = await sky.list_apps();
const wordApp = apps.find((app) => app.id === "Microsoft.Office.WINWORD.EXE.15");
const targetWindow = await sky.get_window(wordApp.windows[0]);
await sky.activate_window({ window: targetWindow });
const state = await sky.get_window_state({
  window: targetWindow,
  include_screenshot: false,
  include_text: true,
});

Validation result

The previously failing existing thread then returned a successful summary:

{
  "ok": true,
  "appCount": 41,
  "app": "Microsoft.Office.WINWORD.EXE.15",
  "hasAccessibility": true,
  "treeLength": 19445,
  "screenshotCount": 0
}

No screenshot was requested, and document text was not printed.

Product implication

There is a third persistence layer in addition to the disk/runtime state:

  1. Desktop/runtime file state can be repaired.
  2. The plugin wrapper can be patched or updated.
  3. Existing threads may still retain an old JavaScript kernel and stale @oai/sky singleton.

For a product fix or hotfix, it may not be enough to update the runtime/plugin files. Existing threads may need their node_repl kernel and Browser/Computer Use singletons invalidated, or the bootstrap code needs to detect that the current sky.transport lacks the expected approval/privileged bridge behavior and reinstall it even when globalThis.sky already exists.

guyster323 · 1 month ago

I can reproduce what appears to be the same failure on Windows Codex Desktop.

Environment:

  • Platform: Windows
  • Codex Desktop app version: 26.616.41845
  • Workspace: local Windows project
  • Computer Use plugin installed at:

C:\Users\windo\.codex\plugins\cache\openai-bundled\computer-use\26.616.41845\scripts\computer-use-client.mjs

What I tried:

  • Created/retried from new Codex threads
  • Updated the Codex app/plugin runtime
  • Rebooted Windows
  • Re-ran the Computer Use bootstrap path

Observed behavior:

  • tool_search exposes node_repl/js
  • js_reset works
  • node_repl/js fails immediately before any user JavaScript executes
  • Because of this, sky.list_apps() never runs, so Computer Use cannot reach Windows app discovery

Exact error:

tool call error: tool call failed for `node_repl/js`

Caused by:
    Mcp error: -32602: js: codex/sandbox-state-meta: missing field `sandboxPolicy`

Impact:

  • Blocks the Computer Use path on Windows
  • Also blocks Browser/Chrome plugin flows that depend on node_repl/js

Additional note:

  • I also submitted this through OpenAI Help Center, and it was escalated to a support specialist.
  • I am not sharing support case IDs publicly, but can provide them privately if needed.

This does not look like a project-code or Computer Use plugin-file issue, because computer-use-client.mjs exists and the failure occurs at the node_repl/js metadata layer before the Computer Use bootstrap code can execute.

NAEL592 · 1 month ago

I can reproduce the same Windows Desktop failure and did a local factory-reset style check of the bundled cua_node/node_repl runtime. This points away from local cache corruption and toward a Desktop/app-server <-> bundled runtime metadata mismatch.

Environment

  • Platform: Windows
  • Codex Desktop AppX package: OpenAI.Codex_26.616.5445.0_x64__2p2nqsd0c76g0
  • Desktop/app-server CLI observed locally: codex-cli 0.142.0-alpha.6
  • Global terminal CLI separately installed: codex-cli 0.140.0 / npm latest seen as 0.141.0, but this does not appear to be the path used by Desktop for this MCP server.
  • Bundled runtime selected by Desktop: cua_node/a89897d3d9baa117
  • node_repl manifest:
{
  "node_version": "24.14.0",
  "node_repl_archive_path": "20260609.1/node_repl-20260609.1-x86_64-pc-windows-msvc.zip",
  "runtime_archive_name": "cua-node-0.0.1-20260609232601-73ffe8b8261e-win32-x64.zip",
  "runtime_archive_version": "0.0.1/20260609232601-73ffe8b8261e",
  "node_repl_path": "bin/node_repl.exe"
}

Reproduction / observed behavior

js_reset had worked earlier in the same Desktop session, but the minimal JS execution failed before user code ran:

nodeRepl.write('ok')

Error:

Mcp error: -32602: js: codex/sandbox-state-meta: missing field `sandboxPolicy`

This happens before Browser/Chrome/Computer Use bootstrap code can execute.

Local evidence for metadata-contract mismatch

Local binary string inspection showed:

  • The bundled node_repl.exe contains codex/sandbox-state-meta and expects sandboxPolicy.
  • The Desktop/app-server codex.exe contains the newer permission-profile vocabulary, including permission_profile, active_permission_profile, and approval_policy.
  • The active thread/environment metadata exposed by Desktop is in the newer permission-profile shape, while the bundled node_repl still rejects the request because sandboxPolicy is missing from codex/sandbox-state-meta.

Factory reset / reinstall attempt

I stopped all node_repl.exe child processes, moved the active runtime folder aside as a backup, then restored the runtime from the Codex Desktop bundled factory copy under the app package resources.

Verification after reinstall:

  • Active runtime folder exists again.
  • Backup of the previous runtime folder exists.
  • Reinstalled node_repl.exe SHA-256 matches the bundled factory node_repl.exe exactly.
  • Manifest after reinstall is still 20260609.1/node_repl-20260609.1-x86_64-pc-windows-msvc.zip.
  • No newer cua_node runtime was found locally.
  • The primary runtime bundle (codex-primary-runtime 26.619.11828) is healthy but does not include node_repl.exe, so reinstalling that bundle does not appear to affect this MCP server.

After killing the old child process, already-loaded threads report:

Transport closed

and the MCP server does not hot-recover inside that existing thread. That seems like a secondary recovery issue: once the node_repl transport dies, Desktop/app-server does not reconnect it for the already-loaded thread even after the runtime files are restored.

Conclusion

This does not look like corrupted local runtime files. A clean reinstall from the bundled factory copy gives the same 20260609.1 runtime. The likely root cause is that the current Desktop/app-server path sends newer permission-profile metadata while the bundled node_repl runtime still requires codex/sandbox-state-meta.sandboxPolicy.

A product-side fix likely needs one of:

  1. Desktop/app-server adds a compatibility sandboxPolicy field when calling this bundled node_repl; or
  2. node_repl is updated to accept the newer permission-profile metadata shape; and
  3. existing threads should reconnect/recreate the node_repl MCP transport after the child server exits, rather than staying stuck at Transport closed.

Sanitized: no local username, workspace path, project files, thread id, or private data included.

3VILALLIUM · 1 month ago

Adding one more privacy-scrubbed Windows trace because this issue is Windows-specific and already has the right node_repl/js / Computer Use framing.

Feedback ID: 019ee64c-3000-7332-8030-a22cfd39505e. I also submitted a Codex Desktop performance/reliability trace from the same session logs, so OpenAI should be able to correlate the private telemetry from that ID.

What this trace adds beyond another plain repro:

  • This began for me after the latest Codex Desktop update.
  • node_repl/js is visible, and js_reset succeeds, but the smallest real JS execution fails before user JavaScript runs:
Mcp error: -32602: js: codex/sandbox-state-meta: missing field `sandboxPolicy`
  • A same-host, same-project new-thread comparison reproduced the same failure, so this is not just stale state in one thread.
  • The trace separately checked model/auth, shell, Windows sandbox, node_repl/js, MCP/tool inventory, skills, @Chrome, in-app browser comparison, Computer Use, network/proxy, AV/security logs, and config/dependency state.
  • The most actionable split I saw: local user-level config/environment visible to the trace included NODE_REPL_REQUEST_META with codex/sandbox-state-meta.sandboxPolicy, but the live node_repl/js MCP call still failed as if that field was absent. That points to the Desktop app-server / live MCP request marshalling path, not simply a missing static config value.

Environment, scrubbed:

  • Codex Desktop AppX: OpenAI.Codex 26.616.5445.0
  • OS: Microsoft Windows NT 10.0.26200.0 x64
  • Bundled Chrome / Computer Use plugin paths visible locally: 26.616.41845
  • Workspace dependency bundle visible locally: 26.619.11828
  • System Node: v24.16.0; workspace dependency Node: v24.14.0

Narrowing from the trace:

  • Shell, CMD, Git, ordinary local Node, DNS, and HTTPS checks worked.
  • Chrome was installed/running; the Codex Chrome extension, native messaging manifest, and native host process were visible locally.
  • Computer Use plugin/client files were visible locally.
  • @Chrome and Computer Use failed before initialization because node_repl/js rejected the call first.
  • No proxy environment variables were visible; WinHTTP was direct.
  • No direct Windows Defender block was found in the checked logs.
  • Remote mobile control was still functional enough to drive the diagnostics, so I would separate remote-control transport from the Desktop-side tool bridge failure.

Impact: this blocks node_repl/js directly and then cascades into @Chrome, Computer Use, and remote-mobile Codex Desktop workflows. The safe in-thread recovery paths available to me did not repair it.

Privacy note: I am intentionally omitting local usernames, full paths, repo/project names, raw logs, thread IDs, tokens, cookies, screenshots, account identifiers, and subscription details. Please use the feedback ID plus same-session performance trace to inspect the raw data privately.

aidawilliam41-ops · 1 month ago

Additional Windows Desktop recovery data from a follow-up diagnostic run.

This looks related to this issue, with one extra lifecycle detail: after repairing the local runtime wrapper, a direct MCP JSON-RPC probe against the installed node_repl.exe succeeded, but the already-open Codex thread still held a closed MCP transport. A fresh Codex session / restart path was needed before node_repl/js became usable again from the Desktop tool layer.

Environment

  • Platform: Windows
  • Product surface: Codex Desktop
  • Affected path: in-app Browser -> node_repl/js
  • Runtime path class:
%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\<hash>\bin\node_repl.exe
  • Browser plugin path class:
%USERPROFILE%\.codex\plugins\cache\openai-bundled\browser\26.616.31447

Initial failure sequence

The affected thread first failed with:

Mcp error: -32602: js: codex/sandbox-state-meta: missing field sandboxPolicy

After stopping the stale node_repl process, the same active Codex session then returned:

Transport closed

Local repair and direct probe

A local wrapper repair was applied so the runtime node_repl.exe was replaced by a wrapper and the original binary was preserved as node_repl.real.exe.

Post-repair disk state:

node_repl.exe       wrapper binary, hash matched local wrapper build
node_repl.real.exe  original runtime binary
node_repl.dll       present

A direct local MCP JSON-RPC probe through the installed runtime succeeded after the repair:

  • initialize succeeded
  • tools/call succeeded
  • returned text: ok
  • exit code: 0
  • no sandboxPolicy error

However, the already-open Codex Desktop session still reported Transport closed for node_repl/js.

Fresh session verification

After moving to a fresh Codex session / restart path, tool discovery exposed mcp__node_repl.js, and a minimal JS probe succeeded:

{
  "ok": true,
  "hasMeta": true,
  "metaKeys": ["progressToken", "threadId", "x-codex-turn-metadata"]
}

The in-app Browser bootstrap also succeeded:

const { setupBrowserRuntime } = await import("file:///<browser-plugin-root>/scripts/browser-client.mjs");
await setupBrowserRuntime({ globals: globalThis });
globalThis.browser = await agent.browsers.get("iab");
nodeRepl.write(await browser.documentation());

Browser backend inspection showed:

{
  "browsers": [
    { "name": "Chrome", "type": "extension" },
    { "name": "Codex In-app Browser", "type": "iab" }
  ],
  "tabCount": 1,
  "caps": ["visibility", "viewport"]
}

Browser navigation check

data: and file:// navigation attempts were rejected by Browser Use URL policy. That appears to be policy behavior, not the original sandboxPolicy / closed transport failure.

A safe loopback navigation probe using a temporary 127.0.0.1 HTTP server succeeded:

{
  "title": "Codex Browser Probe",
  "snapshotHasProbe": true,
  "snapshotHasLoopback": true
}

The temporary server was closed after the probe.

Request / suggested improvement

If the runtime executable or wrapper is repaired while Codex Desktop has already created a node_repl MCP transport, Desktop appears to keep using a stale closed transport for the current thread.

It would help if Codex Desktop could either:

  1. detect this state and restart/reconnect the MCP transport automatically, or
  2. surface a clear actionable message that the user must fully restart Codex Desktop / start a fresh session because the active thread's node_repl transport is stale.

This would make it clearer that direct runtime probing can pass while the current Desktop session still cannot recover its existing MCP transport.

j32ryc · 1 month ago

I can reproduce the same issue on Windows Codex Desktop.

Codex Windows app version:
26.616.5445.0

Package:
Codex 9PLM9XGG6VKS 26.616.5445.0 msstore

Workspace dependency version shown in app:
26.619.11828

codex --version is not recognized in PowerShell, so I appear to have only the Windows app installed, not the CLI.

Minimal Computer Use test:
Ask @Computer to open Notepad and type "test".

Actual result:
tool call error: tool call failed for node_repl/js

Caused by:
Mcp error: -32602: js: codex/sandbox-state-meta: missing field sandboxPolicy

No Notepad window was opened and no interaction happened.

stevenworld75 · 1 month ago

Sharing a field workaround that fixed this on my Windows desktop after the same Codex Desktop 26.616 / bundled plugin 26.616.41845 update. This is not an official OpenAI fix, but it may help people who are blocked.

What I observed:

ode_repl failed before running JS with codex/sandbox-state-meta: missing field sandboxPolicy.

  • The bundled

ode_repl.exe appeared to expect the older sandbox metadata shape.

  • On the same machine, Computer Use also hit a missing native-pipe path even though the shipped codex-computer-use.exe helper still worked over stdio.

What fixed it locally:

  • Backed up the runtime files.
  • Renamed the original

ode_repl.exe to
ode_repl.real.exe.

  • Installed a tiny wrapper plus JS shim that rewrites incoming sandbox metadata to include sandboxPolicy before forwarding to the real runtime.
  • Patched Computer Use to try native pipe first, then fall back to the shipped stdio helper when the pipe is absent.
  • Added an idempotent repair script so Codex restarts/rewrites can reapply the repair.

Verification on my desktop:

  • Chrome extension control opened https://example.com/ and read title Example Domain.
  • Computer Use sky.list_apps() returned 40 apps.
  • Cleanup left no orphan codex-computer-use.exe process.

Full copy/paste prompt, repair approach, and restart watchdog notes are here:
https://gist.github.com/stevenworld75/6c59315b858807a1b6d6a238b1db69f6

Use carefully: back up first, discover local paths dynamically, and keep the patch version-aware so it does not overwrite a future upstream fix.

TUSKWOOD · 1 month ago

Mee too, on windows.

Codex Desktop Browser Use is broken.

Exact error:
Mcp error: -32602: js: codex/sandbox-state-meta: missing field sandboxPolicy

Impact:
@Browser / in-app browser control cannot run. A minimal node_repl/js call fails before JavaScript executes, so this is not caused by the target website or local project.

Related open issues:
https://github.com/openai/codex/issues/29193
https://github.com/openai/codex/issues/29219
https://github.com/openai/codex/issues/29241

This appears related to a Desktop/app-server/node_repl metadata mismatch after Codex Desktop 26.616.x / 26.619.x.

nknight14 · 29 days ago

Follow-up after a newer Windows Desktop update and restart, with sensitive local details omitted.

Environment class:

  • Windows Codex Desktop
  • App package observed after update: 26.616.6631.0
  • Bundled Browser / Chrome / Computer Use plugin class observed after update: 26.616.51431

What changed after the update:

  • The repaired / refreshed cua_node runtime could start node_repl again.
  • A direct JSONL MCP handshake exposed js, js_reset, and js_add_node_module_dir.
  • After a full Codex restart, a current thread could discover and call node_repl normally.

Additional lifecycle detail for long-lived affected threads:

  • One long-lived thread initially still answered that node_repl was unavailable after the restart.
  • Logs for that turn showed the sampling request had already built MCP tool metadata for node_repl (tool_count=3), but the model did not actually make a tool call and instead relied on stale compacted-history diagnostics saying the tool was unavailable.
  • Sending a strict follow-up that explicitly said the old "node_repl unavailable" summary was stale and required real tool calls caused the same long-lived thread to recover.

Safe verification in that recovered long-lived thread:

  • node_repl/js_reset completed.
  • Minimal node_repl/js completed with { "ok": true, "js": true }.
  • A no-content Computer Use smoke test completed:
await setupComputerUseRuntime({ globals: globalThis });
const apps = await sky.list_apps();

Result of the no-content smoke test:

{
  "jsOk": true,
  "computerUseOk": true,
  "appCount": 40,
  "hasWord": true,
  "hasEdge": true,
  "hasChrome": false,
  "error": null
}

No screenshots, document text, window-state reads, clicks, typing, saves, local usernames, local paths, document names, or thread IDs are included here.

Suggested product-side improvement:

  • After Desktop update / runtime repair / app-server restart, long-lived threads with compacted stale tool-failure summaries may still cause the assistant to incorrectly conclude that node_repl is unavailable even though the tool metadata is present again.
  • It would help if Codex could invalidate or override stale tool-availability conclusions after MCP registry rebuild, or surface a clear "tool registry refreshed; retry actual tool call" signal for affected long-lived threads.
yding-git · 29 days ago

Summary

node_repl/js tool calls fail on Windows Codex Desktop before any JS code executes.
Error: Mcp error: -32602: js: codex/sandbox-state-meta: missing field 'sandboxPolicy'.
In my setup, this affects downstream consumers of node_repl/js, including the Chrome plugin.

Environment

  • OS: Windows 11 (Home China, 24H2)
  • Codex Desktop: 26.616.41845 (WindowsApps bundled version 26.616.5445.0)
  • Sandbox mode: unelevated (also reproduces under elevated)
  • [features] js_repl forced to false by Codex on startup regardless of config.toml edits

Reproduction

  1. Start Codex Desktop on Windows.
  2. Invoke @chrome / plugin://chrome@openai-bundled, or any prompt that results in a

node_repl/js tool call.

  1. The MCP tool call returns immediately — no JS code runs.

Minimal reproduction — even this fails:

node_repl/js: { code: "nodeRepl.write('ok')", timeout_ms: 10000 }

Observed behavior

The error is returned at the JSON-RPC parameter validation / deserialization stage,
before the JS runtime executes the supplied code argument:

Mcp error: -32602: js: codex/sandbox-state-meta: missing field 'sandboxPolicy'

-32602 is JSON-RPC "Invalid Params". The error path appears to be:

  1. Codex app-server constructs an MCP tool call to node_repl/js.
  2. The _meta (or equivalent request metadata) includes a key named

codex/sandbox-state-meta.

  1. That metadata object is missing the sandboxPolicy field.
  2. The node_repl MCP server rejects the call during deserialization.

What has been ruled out

  • Chrome plugin cache corruption
  • Stale chrome-native-hosts-v2.json entries
  • Residual node_repl directory state (deleted and let Codex regenerate)
  • js_repl toggle in config.toml (Codex overwrites it to false on every startup)
  • Windows sandbox mode (reproduces under both elevated and unelevated)
  • Network, login state, or API connectivity
  • Sandbox setup errors (sandbox logs consistently show errors=[])

Technical observation

The Codex app-server appears to send codex/sandbox-state-meta metadata on MCP
tool calls to node_repl, but the object does not include the sandboxPolicy field
that the bundled node_repl MCP server requires during request deserialization.

The js_repl feature flag being forcibly set to false may be a secondary symptom.
One possibility is that Codex disables the JS REPL feature after detecting that
the runtime cannot be properly initialized, but this also needs maintainer confirmation.

Cautious hypothesis

This may be related to a schema / contract mismatch between the app-server and
node_repl regarding the sandbox permission model. Possible related context
(not confirmed root cause):

  • PR #19776 (permissions: store thread sessions as profiles) migrated thread session

state from the legacy SandboxPolicy struct to a PermissionProfile model.

  • PR #25700 (core: stop threading SandboxPolicy through exec) refactored how

sandbox policy is passed through the execution pipeline.

If the app-server now sends PermissionProfile-derived metadata but the node_repl
MCP server still expects the legacy sandboxPolicy field as required, the
deserialization would fail with -32602 before any JS code runs. This is
speculation — maintainer confirmation is needed.

Suggested fix direction

If the hypothesis above is correct, the fix would likely be one of:

  1. Update node_repl's request deserialization to accept PermissionProfile

metadata in place of (or as a fallback from) the legacy sandboxPolicy field.

  1. Ensure the app-server / tool-call construction layer always populates

sandboxPolicy in codex/sandbox-state-meta as long as node_repl requires it,
regardless of which internal permission model is used elsewhere.

  1. If js_repl is intentionally unsupported on Windows, surface a clear

user-facing error rather than a deserialization failure.

riwagne · 27 days ago

On macOS, using the same OpenAI account in each surface, the desktop Codex app can use the Chrome MCP successfully, but Codex CLI and Codex VS Code cannot.

Failure surfaces:

  • Codex CLI
  • Codex VS Code extension

Error:
Mcp error: -32602: js: codex/sandbox-state-meta: missing field sandboxPolicy

I tried reinstalling and pkill/restarting everything, with no change.

Versions:

  • Codex CLI: codex-cli 0.142.0
  • Desktop app build: CFBundleVersion 4028
  • Chrome plugin/MCP bundle: chrome 26.611.62324

CLI and VS Code appear not to send sandboxPolicy in codex/sandbox-state-meta for node_repl/Chrome MCP calls, while the desktop Codex app does.

ctkm-aelf · 18 days ago

Reproduction notes and proposed fix path

I took a pass at reducing this to an actionable code path before suggesting a fix.

Breakdown:

  • I treated the report as reproducible enough to trace against the current code instead of asking for more information.
  • Root cause: codex-rs/codex-mcp/src/runtime.rs:23
  • Impact: calibrated priority score 71.8

Proposed approach:

  • Keep the patch scoped to the code path around codex-rs/codex-mcp/src/runtime.rs:23, so the behavior changes where the regression is introduced rather than broadening the surface area.
  • Validation plan: add or update focused regression coverage and run the affected package test target before proposing the branch
  • I will not open an unsolicited PR; if this direction matches maintainer expectations, I can open the prepared branch for review.

Precedent: #29189 Codex Desktop 26.616.41845 node_repl fails: codex/sandbox-state-meta missing sandboxPolicy

How I shaped this comment from prior successful threads:

  • Nearest successful examples considered: 3.
  • The shared pattern was to show the repro/root-cause evidence first, state the smallest viable fix, defer to maintainers on direction, and disclose AI assistance.

This analysis was prepared with AI assistance.

<!-- fkst:codex-saga:engage:codex-triage:dup:openai/codex#29193 -->