Repository navigation
Description
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_replenv:26.616.41845 - Codex CLI visible from the configured Desktop CLI path:
codex-cli 0.142.0-alpha.6 node_repl.exepath class:%LOCALAPPDATA%\OpenAI\Codex\runtimes\cua_node\<hash>\bin\node_repl.exenode_repl.exetimestamp: 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
- Open Codex Desktop on Windows with
browser@openai-bundled,chrome@openai-bundled, and/orcomputer-use@openai-bundledenabled. - Expose the Node REPL tool via tool discovery, e.g. search for
node_repl js. - 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_searchcan expose thenode_repltools in the affected thread.js_resetworks and returnsjs kernel reset.js_add_node_module_dirworks and returnsfalsewhen the configured module directory is already present.- Only the
jsexecution 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:
- Windows Codex Desktop WSL: Browser Use IAB skill unavailable because node_repl/js tool is not injected #20417: Browser Use IAB unavailable because
node_repl/jsis not injected - Browser Use node_repl/js availability diverges by thread in Codex Desktop #21301:
node_repl/jsavailability diverges by thread - Codex Desktop Windows: node_repl trusted runtime fails with Access denied before Chrome bridge can run #25349: Windows Codex Desktop
node_repl/jsfails before Chrome bridge can run - [Bug] Desktop app 26.616: new conversations fail with "Invalid request: missing field \inputSchema
" (CLI with same config works)#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.
Activity
github-actions commentedon Jun 20, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
danieldilly commentedon Jun 20, 2026
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 commentedon Jun 20, 2026
Same issue here, reproduced on macOS (not Windows) with the same Desktop build.
Environment:
26.616.41845, build419826.5.1(25F80), arm64chrome@openai-bundled,browser@openai-bundledObserved behavior:
node_repl/jsfails immediately before user code runs:js_resetand other helper tools may work, but any actual JS execution fails at the same MCP metadata boundary.node_repl/js.Additional symptom (Chrome profile):
sandboxPolicyerror, the browser surface Codex provides is effectively useless — zero extensions, zero logins, zero integrations.Impact:
Looks like the same app-server /
codex/sandbox-state-metaregression as #29189 and #29193, just hitting macOS instead of Windows.nknight14 commentedon Jun 20, 2026
Posted to OpenAI Codex issue: #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:
node_repl/jsreceives malformed or outdated sandbox metadata in some Desktop app-server / thread states.node_replstartup, 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:
node_repl/js.node_replchildren, affected threads reported:Environment:
OpenAI.Codex_26.616.5445.0_x64__2p2nqsd0c76g026.616.41845codex mcp listshowednode_replenabled, but the Desktop app-server still spawned the bundledcua_noderuntime directly in at least one code path.Investigation notes:
node_repl/js, so the sandbox metadata failure breaks both even when their UI toggles show enabled.Content-Lengthframed, so the shim had to preserve/rewrite framed MCP messages and update theContent-Length.params._meta["codex/sandbox-state-meta"].sandboxPolicyfrom older/snake_case fields, with a conservative fallback like{ "type": "danger-full-access" }when the current Desktop permission mode is full access.cua_node/bin/node_repl.exe, so any local mitigation that wrapsnode_repl.exeneeds to run after Desktop startup/runtime refresh.node_replrecovered:computer-use-client.mjsfailed when the privileged native pipe path was absent: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.Result:
sky.list_apps()returned 41 apps.browser.tabs.list()returned successfully.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_replMCP startup/transport recovery rather than in user config.guansiyu0930-ui commentedon Jun 20, 2026
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
sandboxPolicyComputer 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.
guansiyu0930-ui commentedon Jun 20, 2026
Additional local diagnostic evidence:
26.616.5445.026.616.418450.142.0-alpha.6v24.14.0, status reported asok26200Local checks confirmed:
computer-use@openai-bundledis enabled.requirements.tomldoes not exist, so Computer Use is not disabled there.node_repl.exe,codex-computer-use.exe, andcomputer-use-client.mjsare present.computer-use-client.mjshave the same SHA-256:566BE6EF352EB3DE899ADC56A9CD7B5E46C8F65B00E56B5630DD7A580E10CBEAerrors=[].chatgpt.com,openai.com, andapi.openai.comsucceeded.The reproducible failure is:
Observed timestamps include:
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
sandboxPolicyexists at the Desktop/thread configuration level but is omitted or lost while Desktop/app-server serializes and forwardscodex/sandbox-state-metato the MCPnode_repl/jscall.Feedback ID:
019ee5bd-3386-7140-a1c1-1dafcdb8b8e93VILALLIUM commentedon Jun 20, 2026
Adding my Windows repro here as well, since this issue is tracking the same
node_repl/jsfailure on Windows. Feedback/session ID:019ee5d3-7653-7870-95c3-5841e75db374.Environment, sanitized:
26.616.5445.0, Windows x64 Store package.26.616.41845.node_replruntime observed undercua_node/a89897d3d9baa117/bin/node_repl.exe.149.0.7827.116.1.1.5_0.browser@openai-bundled,chrome@openai-bundled, andcomputer-use@openai-bundledare enabled in Codex config.unelevated.What I am seeing:
@Chrome, Browser, and Computer Use are all blocked because they depend on the samenode_repl/jsroute.Troubleshooting I tried before posting:
mcp__node_replroute after rediscovery:js_reset->Transport closedjssmoke testnodeRepl.write('official-node-repl-ok')->Transport closedjs_add_node_module_dir->Transport closedextension-host.exe, the target exists, and the allowed origin matches the Codex Chrome extension ID.1.1.5_0.chrome.nativeMessaging,codex-browser-use, andcodex-computer-useare present.latestpoints to26.616.41845.26.616.41845cached locally, so I do not have an obvious local rollback target.winget list --name Codexreports Store package26.616.5445.0.winget upgrade --id 9PLM9XGG6VKS --source msstore --exactreports no available upgrade.node_repl.exe, without touching browser/account data:sandboxPolicy.type = "workspace-write"plussandboxCwd, minimal JS executes successfully and returnsmanual-node-repl-ok.workspaceWriteis rejected by the runtime; the runtime expects kebab-case values such asworkspace-write.node_replto bootstrap the bundled Chromebrowser-client.mjs; it fails with:My current read:
node_repl.exebinary itself can execute JavaScript when launched with the metadata shape it expects.node_replroute in the affected thread is stuck atTransport closedafter transport reset attempts.node_replcannot replace the official Desktop route for Chrome because the privileged/trusted native pipe bridge is unavailable outside the Desktop-managed path.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_repltransport or metadata/privileged-bridge regression rather than a site-specific, project-specific, or Chrome-extension-only failure.guansiyu0930-ui commentedon Jun 20, 2026
Additional test result:
I changed the Windows sandbox from
elevatedtounelevated, 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:
Therefore, the issue reproduces under both Windows sandbox implementations.
9 remaining items
nknight14 commentedon Jun 21, 2026
Follow-up after a newer Windows Desktop update and restart, with sensitive local details omitted.
Environment class:
26.616.6631.026.616.51431What changed after the update:
cua_noderuntime could startnode_replagain.js,js_reset, andjs_add_node_module_dir.node_replnormally.Additional lifecycle detail for long-lived affected threads:
node_replwas unavailable after the restart.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.Safe verification in that recovered long-lived thread:
node_repl/js_resetcompleted.node_repl/jscompleted with{ "ok": true, "js": true }.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:
node_replis unavailable even though the tool metadata is present again.yding-git commentedon Jun 21, 2026
Summary
node_repl/jstool 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
[features] js_replforced tofalseby Codex on startup regardless of config.toml editsReproduction
@chrome/plugin://chrome@openai-bundled, or any prompt that results in anode_repl/jstool call.Minimal reproduction — even this fails:
Observed behavior
The error is returned at the JSON-RPC parameter validation / deserialization stage,
before the JS runtime executes the supplied
codeargument:-32602is JSON-RPC "Invalid Params". The error path appears to be:node_repl/js._meta(or equivalent request metadata) includes a key namedcodex/sandbox-state-meta.sandboxPolicyfield.node_replMCP server rejects the call during deserialization.What has been ruled out
chrome-native-hosts-v2.jsonentriesnode_repldirectory state (deleted and let Codex regenerate)js_repltoggle inconfig.toml(Codex overwrites it tofalseon every startup)elevatedandunelevated)errors=[])Technical observation
The Codex app-server appears to send
codex/sandbox-state-metametadata on MCPtool calls to
node_repl, but the object does not include thesandboxPolicyfieldthat the bundled
node_replMCP server requires during request deserialization.The
js_replfeature flag being forcibly set tofalsemay 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_replregarding the sandbox permission model. Possible related context(not confirmed root cause):
permissions: store thread sessions as profiles) migrated thread sessionstate from the legacy
SandboxPolicystruct to aPermissionProfilemodel.core: stop threading SandboxPolicy through exec) refactored howsandbox policy is passed through the execution pipeline.
If the app-server now sends
PermissionProfile-derived metadata but thenode_replMCP server still expects the legacy
sandboxPolicyfield as required, thedeserialization would fail with
-32602before any JS code runs. This isspeculation — maintainer confirmation is needed.
Suggested fix direction
If the hypothesis above is correct, the fix would likely be one of:
node_repl's request deserialization to acceptPermissionProfilemetadata in place of (or as a fallback from) the legacy
sandboxPolicyfield.sandboxPolicyincodex/sandbox-state-metaas long asnode_replrequires it,regardless of which internal permission model is used elsewhere.
js_replis intentionally unsupported on Windows, surface a clearuser-facing error rather than a deserialization failure.
riwagne commentedon Jun 23, 2026
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:
Error:
Mcp error: -32602: js: codex/sandbox-state-meta: missing field
sandboxPolicyI tried reinstalling and pkill/restarting everything, with no change.
Versions:
CLI and VS Code appear not to send
sandboxPolicyincodex/sandbox-state-metafor node_repl/Chrome MCP calls, while the desktop Codex app does.ctkm-aelf commentedon Jul 3, 2026
Reproduction notes and proposed fix path
I took a pass at reducing this to an actionable code path before suggesting a fix.
Breakdown:
Proposed approach:
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:
This analysis was prepared with AI assistance.
missing field sandboxPolicy#29338 as a duplicate of this issuejogodwin commentedon Aug 17, 2026
Reproduced in the Codex VS Code extension on a substantially newer build, so this remains active beyond the original 26.616 report.
Environment
1.133.026.810.52044codex-cli 0.148.0-alpha.9browser@openai-bundled 26.527.31326unelevatedOnRequestExact failure
A minimal
node_repl/jscall fails before any JavaScript or browser bootstrap runs:This blocks the in-app Browser path before browser tabs, ServiceNow authentication, or page data are contacted.
Additional diagnostic evidence
The Codex extension log records the affected turn with:
Troubleshooting completed
node_repl/jspath.26.810.52044to26.810.41047, reloaded, and reproduced the identical failure.sandbox_mode = "workspace-write"andapproval_policy = "on-request", reloaded, and reproduced the identical failure.codex --strict-config doctor --summaryoutside the restricted diagnostic shell: 17 checks passed, including auth, all six MCP servers, WebSocket (HTTP 101), and provider reachability.No usernames, workspace names, local paths, credentials, cookies, thread IDs, or project/customer data are included here.
Executed via Codex on behalf of Josh Godwin.
zenbing-168 commentedon Oct 22, 2026
I can reproduce the same error on a newer Windows desktop build.
Desktop app: 26.1016.61520
Windows 10 Pro 22H2, build 19045.2846
CLI resolved from the desktop component directory:
codex-cli 0.163.0-alpha.11.1
Error:
Mcp error: -32602: js: codex/sandbox-state-meta:
missing field
sandboxPolicyThe browser initialization tool fails before user JavaScript
executes or any webpage is accessed. The error persisted
after moving from the VS Code panel to the desktop app.
No sandbox permissions were changed.
Could you confirm whether this is related to the previously
fixed issue #29189, and which desktop diagnostics are needed?