Codex Desktop ignores node_repl args and sends malformed sandbox metadata to js tool
Summary
Codex Desktop's in-app browser control path is blocked because mcp__node_repl.js rejects every JavaScript call before user code executes:
Mcp error: -32602: js: codex/sandbox-state-meta: missing field `sandboxPolicy`
A local workaround appears to be configuring the managed node_repl MCP server with --disable-sandbox, but Codex Desktop does not pass that configured arg to the helper process it launches.
Environment
- Codex CLI/Desktop bundled runtime:
codex-cli 0.142.0-alpha.6 - Browser plugin release observed in logs:
26.616.41845 - macOS:
26.3.1(25D2128), arm64 - App server command observed:
codex app-server --analytics-default-enabled
Reproduction
- In Codex Desktop, use the Browser skill / in-app browser path.
- Run
mcp__node_repl.js_reset.
- This succeeds:
js kernel reset.
- Run the required browser bootstrap:
const { setupBrowserRuntime } = await import('/path/to/browser-client.mjs');
await setupBrowserRuntime({ globals: globalThis });
globalThis.browser = await agent.browsers.get('iab');
nodeRepl.write(await browser.documentation());
- The
jscall fails before executing any code:
Mcp error: -32602: js: codex/sandbox-state-meta: missing field `sandboxPolicy`
Debugging already done
~/.codex/config.toml was set to:
[mcp_servers.node_repl]
args = ["--disable-sandbox"]
command = "/Applications/Codex.app/Contents/Resources/cua_node/bin/node_repl"
startup_timeout_sec = 120
codex mcp get node_repl reports the configured arg correctly:
node_repl
enabled: true
transport: stdio
command: /Applications/Codex.app/Contents/Resources/cua_node/bin/node_repl
args: --disable-sandbox
However, the live helper processes launched by Codex Desktop do not include that arg:
/Applications/Codex.app/Contents/Resources/cua_node/bin/node_repl
A disposable manual JSON-RPC test against the same helper binary shows that node_repl --disable-sandbox can run a basic js call successfully and does not advertise the failing codex/sandbox-state-meta capability. The manually launched helper is not a usable workaround for Browser because it lacks Codex Desktop's privileged native-pipe bridge.
Also observed:
- Restarting Codex Desktop and creating/forking a new thread did not fix the
jsfailure. - Codex Desktop rewrote the managed
node_replconfig back toargs = []on restart unless the config file was protected, but even withcodex mcp getreporting--disable-sandbox, Desktop-launched helper processes still started without the arg.
Expected behavior
Either:
mcp__node_repl.jsreceives validcodex/sandbox-state-metawithsandboxPolicy, or- Codex Desktop honors configured
mcp_servers.node_repl.argswhen launching the helper, so--disable-sandboxcan be used as a workaround.
Actual behavior
js_resetsucceeds.jsfails before executing user code with malformed sandbox metadata.- Desktop-launched
node_replignores the configured args shown bycodex mcp get.
Impact
This fully blocks the Codex in-app browser automation surface. For authenticated browser tasks, the agent cannot use the intended background in-app browser and must stop rather than falling back to external browsers or foreground Computer Use.
14 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Can confirm this issue on Codex Desktop 26.619.11828. (Windows)
Browser/Chrome tools fail before execution with:
"missing field sandboxPolicy"
MacOS also has this same problem.
Also seeing this on Windows with Codex Desktop
26.616.5445.0and bundled browser/chrome plugin26.616.41845.What I tried locally:
mcp__node_repl.jsfails before any JavaScript runs with:C:\Users\USER\.codex\config.toml:The live helper was still launched with no args, and after restarting Codex Desktop the config was regenerated back to
js_repl = falseandargs = [].node_repl.exewhile injecting--disable-sandbox, then pointedmcp_servers.node_repl.commandat it.codex mcp get node_replshowed the wrapper and args before restart, but Codex Desktop rewrote the managed MCP block back to the bundlednode_repl.exepath with no args.node_repl.original.exeand placed the wrapper at the bundlednode_repl.exepath. The wrapper worked when called directly, but after restarting Codex Desktop the runtime was restored to the original 13 MBnode_repl.exeand the backup was gone.Result: the issue still reproduces after restart. The failure happens before Chrome or Edge extension communication, so this does not appear to be a browser-extension setup issue. Local config and runtime-file workarounds are being reverted by Desktop startup/runtime management.
Additional Windows confirmation from Codex Desktop
26.616.5445.0.Environment:
10.0.26200)OpenAI.Codex_26.616.5445.0_x64__2p2nqsd0c76g0codex-cli 0.142.0-alpha.6cua_noderuntime:20260609.1, Node24.14.026.616.41845approvalPolicy=never,sandboxPolicy.type=dangerFullAccess,activePermissionProfile.id=:danger-full-accessMinimal repro:
Actual:
Additional checks:
codex doctor --jsonreports config/auth/db/network mostly OK; no MCP config failure.gh/ shell / PowerShell work normally.codex mcp get node_replsees the configured MCP server.args = ["--disable-sandbox"]inconfig.tomlis not a reliable workaround: CLI can show the arg, but Desktop-spawnednode_repl.exeprocesses still start without it.config.tomlread-only preserved the setting but did not change the Desktop-spawned process command line.args = [], writable).Impact:
node_repl/jsfails before any user JavaScript executes.Adding my Windows data point because the
node_replmetadata / trusted bridge angle here matches what I found locally. Feedback/session ID:019ee5d3-7653-7870-95c3-5841e75db374.Sanitized environment:
26.616.5445.0, Windows x64 Store package.26.616.41845.node_replruntime observed undercua_node/a89897d3d9baa117/bin/node_repl.exe.extension-host.exe, and the Codex Chrome Extension exists in the selected Default profile as1.1.5_0.chrome.nativeMessaging,codex-browser-use, andcodex-computer-useare present.What I am seeing in the affected Desktop thread:
Multiple Codex restarts and troubleshooting passes have not recovered the Desktop-managed Browser/Chrome/Computer Use route for me.
The useful technical finding is from a disposable standalone MCP probe against the same bundled
node_repl.exeruntime, without touching browser/account data:sandboxPolicy.type = "workspace-write"plussandboxCwd, minimal JavaScript executes and returnsmanual-node-repl-ok.workspaceWriteis rejected; this runtime expects kebab-case values such asworkspace-write.That suggests the
node_repl.exebinary itself is capable of running JS when invoked with metadata shaped the way it expects.But that is not a usable workaround for Browser/Chrome. When I used the standalone working
node_replto import/bootstrap the bundled Chromebrowser-client.mjs, it failed with:So my current read is:
I am intentionally not attaching screenshots, raw logs, account/profile data, repo names, local username, browser history, cookies, or full local paths here for privacy.
Follow-up to my earlier technical comment with a newer trace and feedback ID.
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.The new trace reinforces the managed-Desktop-route theory here, but from a different angle than my earlier standalone
node_replprobe:node_repl/jswas visible in the affected thread.js_resetsucceeded.@Chromeand Computer Use failed before their own bootstrap becausenode_repl/jsrejected the call first.Most actionable new observation: local user-level config/environment visible to the trace included
NODE_REPL_REQUEST_METAwithcodex/sandbox-state-meta.sandboxPolicy, but the livenode_repl/jsMCP call still reportedsandboxPolicymissing. That suggests the bug may be specifically in the Desktop app-server's live MCPparams._metaconstruction/forwarding path, or in a producer/consumer schema mismatch between that path and the bundlednode_replruntime, rather than simply in the persisted TOML/config values.This still does not look like a user-config workaround problem. A product fix likely needs the Desktop-managed trusted route to either pass the compatibility
sandboxPolicyshape expected by the bundled runtime or update the bundled runtime to accept the newer permission-profile metadata, and existing affected threads may also need thenode_repltransport/kernel invalidated or recreated after the fix.Privacy note: I am intentionally not posting local usernames, full paths, repo/project names, raw logs, thread IDs, tokens, cookies, screenshots, account identifiers, or subscription details. Please use the feedback ID and same-session performance trace to inspect the raw data privately.
I am seeing the same issue in Codex Desktop on Windows while trying to use the bundled Chrome plugin / Codex Chrome Extension.
The Chrome extension appears installed/available, but Codex cannot reach Chrome because node_repl/js fails before any JavaScript runs.
Exact error:
Mcp error: -32602: js: codex/sandbox-state-meta: missing field
sandboxPolicyImpact:
In my case this blocks a workflow that must use the Codex Chrome Extension only. I cannot safely use DevTools, Playwright, an in-app browser, or a fresh unauthenticated browser as fallback because the workflow requires the real logged-in Chrome profile and visible account verification.
Environment/context:
Minimal repro from my session:
Mcp error: -32602: js: codex/sandbox-state-meta: missing field
sandboxPolicyExpected:
Codex Desktop should provide the sandboxPolicy field required by node_repl/js, or the plugin should return a clearer actionable repair message.
Actual:
The Chrome plugin is blocked before browser connection, before tab listing, and before any JavaScript execution.
Additional macOS reproduction with causal evidence and a working metadata-injection smoke test
I am seeing the same failure on macOS when using the Codex Chrome extension:
The failure occurs for the smallest possible call:
It therefore happens before the Chrome browser client is imported and before Codex attempts to communicate with Chrome.
Environment:
Chrome itself appears healthy:
I inspected the bundled
node_replbinary. Its sandbox-state deserialization appears to expect fields including:I then performed a standalone MCP-style smoke test. When I injected a
sandboxPolicyfield into:the same basic JavaScript execution succeeded.
This is strong evidence that the missing field is the immediate blocker, rather than Chrome, the extension, the selected tab, or the JavaScript being executed.
This also appears consistent with the metadata change in #28914, which removed the legacy
sandboxPolicyfield and madepermissionProfilethe source of truth. The packaged Desktop components may be version-skewed: the Codex MCP caller sends the newer schema while the bundlednode_replstill expects the older schema.I also tested possible workarounds:
NODE_REPL_REQUEST_METAdid not affect Codex Desktop's actual tool calls. It appears that the per-request MCP_metagenerated by Desktop overrides or bypasses that environment fallback.sandboxPolicyinto incoming MCP requests and then forwards them to the official bundlednode_repl.The wrapper works in a direct local MCP smoke test.
[mcp_servers.node_repl].commandto use the wrapper, but Codex Desktop continued producing the original error after a complete restart. This indicates that Desktop is not launching the active managednode_replthrough the configured MCP command, or is restoring or caching a separate built-in binding.This reproduces both parts of this issue:
node_repl.node_replcommand, preventing a local wrapper workaround.One potentially relevant mechanism is
CODEX_NODE_REPL_PATH. An earlier macOS report, #21722, describes Codex Desktop successfully launching a wrapper through that environment variable while retaining the Desktop browser bridge. I have not yet confirmed whether the current Desktop build still honors it.Suggested fixes:
node_replthat accepts the newpermissionProfile-based metadata.permissionProfileand the legacysandboxPolicy.sandboxPolicyoptional for compatibility.node_replcommand, or document a supported override such asCODEX_NODE_REPL_PATH.This blocks Codex Desktop workflows that require access to the user's authenticated Chrome session.
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.
ode_repl.exe appeared to expect the older sandbox metadata shape.
What fixed it locally:
ode_repl.exe to
ode_repl.real.exe.
Verification on my desktop:
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.
Mee too
Codex Desktop Browser Use is broken.
Exact error:
Mcp error: -32602: js: codex/sandbox-state-meta: missing field
sandboxPolicyImpact:
@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.
Thanks for the bug report. We've issued a hotfix for this problem. Please update your app and confirm that it fixes the issue you were seeing.
@etraut-openai I can confirm it's working again, thanks for the fast action.
Since a hotfix shipped, I would close this with producer/consumer compatibility tests. Cover app-server launches of managed node_repl with configured args, injected sandbox metadata, and Browser/Chrome/Computer Use bootstrap across Windows and macOS.
The regression should assert user-configured args are either honored or explicitly marked unsupported for managed helpers, and that minimal JS executes before browser bootstrap. Also verify the config reconciler does not flip
js_replback to false after restart.---
_Generated with ax._