Windows Codex Desktop 26.616: node_repl/js fails with codex/sandbox-state-meta missing field `sandboxPolicy`
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:
- #20417: Browser Use IAB unavailable because
node_repl/jsis not injected - #21301:
node_repl/jsavailability diverges by thread - #25349: Windows Codex Desktop
node_repl/jsfails 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.
21 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
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
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.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:
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.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.
<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" />
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-1dafcdb8b8e9Adding 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.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.
Sanitized follow-up for openai/codex#29193
Follow-up after further local debugging on Windows Codex Desktop
26.616.5445.0with the bundled Browser / Chrome / Computer Use plugin family observed at26.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
sandboxPolicyworkaroundAfter the previous local workaround restored
node_repl/jsavailability in affected threads,Browserand lightweightComputer Usecalls started working again. For example:tabs.list()worked.list_apps()worked.However, actual app control still failed when targeting an app window, with:
So there appear to be two separate layers:
node_repl/jscan fail before plugin code runs because_meta["codex/sandbox-state-meta"]lackssandboxPolicy.node_repl/jsis 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.nodeReplexposed only the normal unprivileged helpers:It did not expose:
The object and
nodeRepl.requestMetawere also non-extensible, so it was not possible to simply attachnodeRepl.config.createElicitationor injectx-oai-cua-approved-appinto 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/skyhelper can makelist_apps()work, but when app control begins, the helper sends an approval request. The@oai/skyhelper transport then needs acreateElicitationcallback. Without that callback it throws: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 wrapsky.transport.request()and provide a localcreateElicitationcallback:The callback does not blindly approve unless there is an explicit local opt-in file:
Example safe shape:
For my local machine only, I used an
allowAnyApp: trueopt-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/skyalready knows how to retry the original helper request aftercreateElicitationreturns{ 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/skytransport did not retain an older wrapper:setupComputerUseRuntime()succeeded.sky.list_apps()succeeded.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:
node_repllauncher/shim under%USERPROFILE%\.codex\scripts\...that patches missing sandbox metadata before forwarding to the original bundlednode_repl.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
createElicitationapproval callback consistently, including in existing threads after plugin settings are changed.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/jsand 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:This happened even though:
computer-use-client.mjswas present in the plugin cache and mirror;Thread-local cause
The affected existing thread had already initialized
@oai/sky/globalThis.skybefore the file-level mitigation was applied.The thread then used the usual bootstrap guard:
Because
globalThis.skyalready existed, the thread skipped re-importing the patched Computer Use client and kept using the stale in-memory@oai/sky.transportwithout the localcreateElicitationwrapper. 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:
node_repl/js_resetin the affected thread.if (!globalThis.sky)guard.setupComputerUseRuntime({ globals: globalThis }).Sanitized shape:
Validation result
The previously failing existing thread then returned a successful summary:
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:
@oai/skysingleton.For a product fix or hotfix, it may not be enough to update the runtime/plugin files. Existing threads may need their
node_replkernel and Browser/Computer Use singletons invalidated, or the bootstrap code needs to detect that the currentsky.transportlacks the expected approval/privileged bridge behavior and reinstall it even whenglobalThis.skyalready exists.I can reproduce what appears to be the same failure on Windows Codex Desktop.
Environment:
C:\Users\windo\.codex\plugins\cache\openai-bundled\computer-use\26.616.41845\scripts\computer-use-client.mjsWhat I tried:
Observed behavior:
tool_searchexposesnode_repl/jsjs_resetworksnode_repl/jsfails immediately before any user JavaScript executessky.list_apps()never runs, so Computer Use cannot reach Windows app discoveryExact error:
Impact:
node_repl/jsAdditional note:
This does not look like a project-code or Computer Use plugin-file issue, because
computer-use-client.mjsexists and the failure occurs at thenode_repl/jsmetadata layer before the Computer Use bootstrap code can execute.I can reproduce the same Windows Desktop failure and did a local factory-reset style check of the bundled
cua_node/node_replruntime. This points away from local cache corruption and toward a Desktop/app-server <-> bundled runtime metadata mismatch.Environment
OpenAI.Codex_26.616.5445.0_x64__2p2nqsd0c76g0codex-cli 0.142.0-alpha.6codex-cli 0.140.0/ npm latest seen as0.141.0, but this does not appear to be the path used by Desktop for this MCP server.cua_node/a89897d3d9baa117node_replmanifest:Reproduction / observed behavior
js_resethad worked earlier in the same Desktop session, but the minimal JS execution failed before user code ran:Error:
This happens before Browser/Chrome/Computer Use bootstrap code can execute.
Local evidence for metadata-contract mismatch
Local binary string inspection showed:
node_repl.execontainscodex/sandbox-state-metaand expectssandboxPolicy.codex.execontains the newer permission-profile vocabulary, includingpermission_profile,active_permission_profile, andapproval_policy.node_replstill rejects the request becausesandboxPolicyis missing fromcodex/sandbox-state-meta.Factory reset / reinstall attempt
I stopped all
node_repl.exechild 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:
node_repl.exeSHA-256 matches the bundled factorynode_repl.exeexactly.20260609.1/node_repl-20260609.1-x86_64-pc-windows-msvc.zip.cua_noderuntime was found locally.codex-primary-runtime 26.619.11828) is healthy but does not includenode_repl.exe, so reinstalling that bundle does not appear to affect this MCP server.After killing the old child process, already-loaded threads report:
and the MCP server does not hot-recover inside that existing thread. That seems like a secondary recovery issue: once the
node_repltransport 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.1runtime. The likely root cause is that the current Desktop/app-server path sends newer permission-profile metadata while the bundlednode_replruntime still requirescodex/sandbox-state-meta.sandboxPolicy.A product-side fix likely needs one of:
sandboxPolicyfield when calling this bundlednode_repl; ornode_replis updated to accept the newer permission-profile metadata shape; andnode_replMCP transport after the child server exits, rather than staying stuck atTransport closed.Sanitized: no local username, workspace path, project files, thread id, or private data included.
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:
node_repl/jsis visible, andjs_resetsucceeds, but the smallest real JS execution fails before user JavaScript runs:node_repl/js, MCP/tool inventory, skills,@Chrome, in-app browser comparison, Computer Use, network/proxy, AV/security logs, and config/dependency state.NODE_REPL_REQUEST_METAwithcodex/sandbox-state-meta.sandboxPolicy, but the livenode_repl/jsMCP 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:
OpenAI.Codex 26.616.5445.0Microsoft Windows NT 10.0.26200.0 x6426.616.4184526.619.11828v24.16.0; workspace dependency Node:v24.14.0Narrowing from the trace:
@Chromeand Computer Use failed before initialization becausenode_repl/jsrejected the call first.Impact: this blocks
node_repl/jsdirectly 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.
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.exesucceeded, but the already-open Codex thread still held a closed MCP transport. A fresh Codex session / restart path was needed beforenode_repl/jsbecame usable again from the Desktop tool layer.Environment
node_repl/jsInitial failure sequence
The affected thread first failed with:
After stopping the stale
node_replprocess, the same active Codex session then returned:Local repair and direct probe
A local wrapper repair was applied so the runtime
node_repl.exewas replaced by a wrapper and the original binary was preserved asnode_repl.real.exe.Post-repair disk state:
A direct local MCP JSON-RPC probe through the installed runtime succeeded after the repair:
initializesucceededtools/callsucceededok0sandboxPolicyerrorHowever, the already-open Codex Desktop session still reported
Transport closedfornode_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:The in-app Browser bootstrap also succeeded:
Browser backend inspection showed:
Browser navigation check
data:andfile://navigation attempts were rejected by Browser Use URL policy. That appears to be policy behavior, not the originalsandboxPolicy/ closed transport failure.A safe loopback navigation probe using a temporary
127.0.0.1HTTP server succeeded: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_replMCP transport, Desktop appears to keep using a stale closed transport for the current thread.It would help if Codex Desktop could either:
node_repltransport 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.
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 --versionis 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/jsCaused by:
Mcp error: -32602: js: codex/sandbox-state-meta: missing field
sandboxPolicyNo Notepad window was opened and no interaction happened.
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, on windows.
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.
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:
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.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.
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.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.
<!-- fkst:codex-saga:engage:codex-triage:dup:openai/codex#29193 -->