Skip to content

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

Closed

Description

@bobchristof-gp

Title: Codex Desktop 26.616.41845 node_repl fails: codex/sandbox-state-meta missing sandboxPolicy

Component: Codex Desktop / bundled node_repl MCP / Chrome plugin
Version: Codex Desktop 26.616.41845, build 4198
Bundled CLI: codex-cli 0.142.0-alpha.6
OS: macOS 26.5.1 arm64

Problem:
Chrome plugin/browser automation cannot run because mcp__node_repl.js fails before executing any JS.

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

Expected:
mcp__node_repl.js should execute a minimal JS call, or Codex Desktop should provide the sandboxPolicy field expected by bundled node_repl.

Observed:
Every call to mcp__node_repl.js fails before JS execution.

Minimal repro:

  1. Enable/use bundled Chrome plugin in Codex Desktop.
  2. Start a local thread with sandbox_mode = danger-full-access / approval_policy = never.
  3. Expose node_repl via tool search.
  4. Run:
    nodeRepl.write(JSON.stringify({ ok: true }))
  5. Tool fails with:
    codex/sandbox-state-meta: missing field sandboxPolicy

Investigation:

  • Current thread context logs show sandbox_policy snake_case.
  • Bundled node_repl binary expects sandboxPolicy camelCase inside codex/sandbox-state-meta.
  • Restarting Codex Desktop did not fix it.
  • Attempted config workaround:
    [mcp_servers.node_repl]
    args = ["--disable-sandbox"]
    But Codex Desktop launched node_repl without that arg / appears to ignore generated TOML args for this bundled server.
  • Restored config to normal.

Impact:
Chrome plugin automation is blocked, including Shopify admin/browser tasks.

Activity

  1. added
    bugSomething isn't working
    appIssues related to the Codex desktop app
    mcpIssues related to the use of model context protocol (MCP) servers
    sandboxIssues related to permissions or sandboxing
    on Jun 20, 2026
  2. derekNeedCoffee commented on Jun 20, 2026

    @derekNeedCoffee

    I am hitting the same issue on macOS.

    Environment:

    • Codex Desktop: 26.616.41845, build 4198
    • macOS: 26.5 (25F71), arm64
    • Chrome plugin path: chrome@openai-bundled, app build 26.616.41845
    • Codex Chrome Extension is installed and enabled in the selected Default profile; extension version reported locally as 1.1.5_0
    • Native messaging host manifest check passes: exists=true, correct=true, problem=null

    Observed behavior:

    • A minimal mcp__node_repl.js call such as nodeRepl.write('ok') fails before user JS runs:
    Mcp error: -32602: js: codex/sandbox-state-meta: missing field `sandboxPolicy`
    

    Impact:

    • The Chrome plugin cannot bootstrap because node_repl/js fails before it can import the browser client or call agent.browsers.get('extension').
    • This blocks Chrome-backed workflows even though the Chrome extension and native host appear healthy.

    Additional local debugging:

    • The thread context records sandbox_policy in snake_case.
    • The bundled node_repl appears to require sandboxPolicy in camelCase inside codex/sandbox-state-meta.
    • In a standalone MCP probe, the same malformed/snake_case sandbox meta reproduces this exact error; passing camelCase sandboxPolicy succeeds.
    • A local wrapper that normalizes sandbox_policy -> sandboxPolicy works in a standalone probe, but Codex Desktop appears to launch the bundled node_repl directly / rewrite or ignore mcp_servers.node_repl command/args, so this is not a stable workaround from ~/.codex/config.toml.
  3. andryserbice commented on Jun 20, 2026

    @andryserbice

    Independent Windows reproduction from Codex Desktop 26.616.5445.0 on Windows 10 IoT Enterprise LTSC 10.0.19044 x64. Bundled Browser plugin 26.616.41845 is installed and enabled; bundled CLI/app-server is codex-cli 0.142.0-alpha.6. The exact codex/sandbox-state-meta: missing field sandboxPolicy error occurs before user JavaScript or navigation, in both an existing thread and a fresh thread after a full app restart. Session metadata does contain sandbox policy danger-full-access and permission profile disabled, but the field expected by node_repl is still absent. This is not site- or project-specific and makes Browser automation completely unavailable while ordinary shell/file tools continue to work. Related Windows report: #29193.

  4. davidwushi1145 commented on Jun 20, 2026

    @davidwushi1145

    I’m hitting the same issue on macOS.

    Environment:

    • Codex Desktop: 26.616.41845
    • CLI observed earlier: codex-cli 0.141.0
    • OS: macOS
    • Chrome plugin: chrome@openai-bundled enabled
    • Browser plugin: browser@openai-bundled enabled

    Observed behavior:

    Chrome/Browser automation fails before any browser page or user JavaScript is accessed. The tool is discovered and invoked, but node_repl/js fails internally with:

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

    This happens even after reinstalling Codex and removing the manually registered node_repl MCP from codex mcp list.

    My current understanding is that this is not the older “Node REPL tool is not exposed” failure mode. In my case, the tool call reaches node_repl/js, but the bundled Node REPL bridge expects a camelCase sandboxPolicy field from codex/sandbox-state-meta, while the active session appears to provide sandbox metadata in a different shape.

    Impact:

    The Chrome plugin cannot bootstrap, so Chrome-backed workflows fail even though the Chrome extension/plugin appears installed and enabled. Regular shell access still works.

    This looks consistent with the root cause described above: a schema mismatch between Codex Desktop 26.616.41845 and the bundled node_repl / Chrome plugin runtime.

  5. fduch-stranger commented on Jun 20, 2026

    @fduch-stranger

    I can reproduce this on macOS in Codex Desktop 26.616.41845.

    Additional evidence from local Codex session history in the same project:

    • In-app Browser control worked earlier in this same project with Browser plugin/runtime 26.616.32156.
    • The successful bootstrap connected to backend iab, opened http://localhost:5173/, got title Age of Agents, and inspected the DOM through tab.playwright.domSnapshot().
    • After update to Browser plugin/runtime 26.616.41845, the same Browser bootstrap fails before any user JS runs:
    Mcp error: -32602: js: codex/sandbox-state-meta: missing field `sandboxPolicy`
    
    • A minimal nodeRepl.write("ok") call fails with the same error, so this is not caused by the Browser client import, Playwright, or project code.
    • Changing thread permissions / full access does not help.
    • Attempting to work around this with --disable-sandbox in mcp_servers.node_repl.args is not effective because Codex Desktop appears to rewrite or ignore the bundled node_repl args.

    This looks like a regression between 26.616.32156 and 26.616.41845, where Desktop/app-server no longer passes the sandboxPolicy field expected by bundled node_repl/js.

  6. joshp123 commented on Jun 20, 2026

    @joshp123

    I'm experiencing the same issue; couple of additional data points:

    • chrome plugin isn't visible in plugin dropdown/menu either
    Image
    • feedback uploaded with this ID: 019ee476-ed0c-7d03-827b-fcee6c5dbb0a in which codex debugs the session itself.
  7. cameronfairbairn commented on Jun 20, 2026

    @cameronfairbairn

    I can reproduce the same failure on macOS with the current Desktop build.

    Environment:

    • Codex Desktop: 26.616.41845, build 4198
    • Bundled CLI: codex-cli 0.142.0-alpha.6
    • macOS: 26.3 build 25D125, arm64
    • Chrome plugin path used by the session: chrome@openai-bundled runtime 26.616.41845
    • Chrome: 149.0.7827.115
    • Codex Chrome Extension: installed/enabled in the selected Default profile, extension version 1.1.5_0
    • Native messaging host manifest check: exists=true, correct=true, expected origin present

    Minimal repro in the affected Codex thread:

    nodeRepl.write('ping')

    Actual result, before any user JS executes:

    tool call error: tool call failed for `node_repl/js`
    
    Caused by:
        Mcp error: -32602: js: codex/sandbox-state-meta: missing field `sandboxPolicy`
    

    Additional recovery attempts / checks:

    • Fully quit Chrome via AppleScript, verified old Google Chrome and extension-host processes exited.
    • Reopened Chrome using the bundled plugin script scripts/open-chrome-window.js; fresh Chrome and extension-host processes started.
    • Re-ran the Chrome plugin diagnostics:
      • scripts/chrome-is-running.js --check -> OK
      • scripts/check-extension-installed.js --json -> installed/enabled true for selected profile
      • scripts/check-native-host-manifest.js --json -> manifest correct
    • Restarted Codex Desktop and retried.
    • The same sandboxPolicy error persists.

    Impact:

    • Chrome/Browser automation cannot bootstrap because node_repl/js fails before importing the browser client or calling agent.browsers.get('extension').
    • This does not appear to be a Chrome install, extension enablement, native-host manifest, or local page issue.
  8. giufrat commented on Jun 20, 2026

    @giufrat

    Confirmed on macOS 26.5.1 arm64 with Codex Desktop 26.616.41845 (build 4198) and bundled runtime 0.142.0-alpha.6.

    Additional evidence:

    • Codex.app was updated locally at 10:12 on 2026-06-20.
    • The same nested node_repl/js Browser workflow succeeded before the update and began failing after it.
    • The failure affects both newly created threads and an older thread that successfully controlled the in-app browser before the update, so thread recreation does not resolve it.
    • The recorded turn context contains sandbox_policy: {"type":"danger-full-access"}.
    • Desktop global state also contains sandboxPolicy: {"type":"dangerFullAccess"} for the affected thread.
    • Despite those values being present upstream, node_repl/js rejects the MCP call before executing JavaScript with:
      Mcp error: -32602: js: codex/sandbox-state-meta: missing field sandboxPolicy
    • js_reset still works, confirming the failure is specific to the execution call requiring sandbox metadata.
    • Attempting to supply _meta explicitly is rejected by the exposed tool schema, so there is no agent-side workaround.
    • This blocks the bundled in-app Browser backend; it is unrelated to the target website or authentication state.

    This looks like a regression in Desktop/app-server metadata propagation introduced with the current build.

  9. mahidalhan commented on Jun 20, 2026

    @mahidalhan

    Additional macOS confirmation from my local setup after updating the standalone runtime:

    Environment:

    • Codex Desktop: 26.616.41845, build 4198
    • Standalone CLI/app-server after codex update: codex-cli 0.142.0-alpha.7
    • App-server status: running on 0.142.0-alpha.7
    • OS: macOS arm64
    • Project feature flags: browser_use, browser_use_external, in_app_browser, plugins, computer_use, apps, and enable_mcp_apps all effectively enabled in the project

    Minimal repro still fails after the standalone update and app-server restart:

    nodeRepl.write("ok")

    Result:

    tool call error: tool call failed for `node_repl/js`
    
    Caused by:
        Mcp error: -32602: js: codex/sandbox-state-meta: missing field `sandboxPolicy`
    

    Important extra detail: codex mcp list --json still wires node_repl to the Desktop app bundle:

    /Applications/Codex.app/Contents/Resources/cua_node/bin/node_repl
    BROWSER_USE_CODEX_APP_VERSION=26.616.41845
    CODEX_CLI_PATH=/Applications/Codex.app/Contents/Resources/codex
    

    I also inspected the public rust-v0.142.0-alpha.7 macOS DMG from the GitHub release; it contains CLI payloads (codex, codex-responses-api-proxy) rather than a replacement Codex.app, so that update path does not refresh the desktop-bundled node_repl.

    This makes the failure look independent of the project/user feature flags and independent of the standalone CLI/app-server version: the stale/mismatched Desktop-bundled node_repl path is still the component rejecting the sandbox metadata before any user JS runs.

  10. Siruuui commented on Jun 20, 2026

    @Siruuui

    same on Codex Desktop 26.616.41845 build 4198, macOS Darwin 25.5.0 arm64, minimal nodeRepl.write('ping') fails with the same missing sandboxPolicy error.

  11. giufrat commented on Jun 20, 2026

    @giufrat

    Additional macOS confirmation after updating the standalone runtime:

    Environment

    • Codex Desktop: 26.616.41845, build 4198
    • Standalone CLI/app-server after codex update: codex-cli 0.142.0-alpha.7
    • App-server status: running on 0.142.0-alpha.7
    • OS: macOS arm64
    • Project feature flags: browser_use, browser_use_external, in_app_browser, plugins, computer_use, apps, and enable_mcp_apps all effectively enabled

    Minimal repro

    The failure remains after the standalone update and app-server restart:

    nodeRepl.write("ok")

    Result:

    tool call error: tool call failed for `node_repl/js`
    
    Caused by:
        Mcp error: -32602: js: codex/sandbox-state-meta: missing field `sandboxPolicy`
    

    Important additional detail

    codex mcp list --json still wires node_repl to the Desktop app bundle:

    /Applications/Codex.app/Contents/Resources/cua_node/bin/node_repl
    BROWSER_USE_CODEX_APP_VERSION=26.616.41845
    CODEX_CLI_PATH=/Applications/Codex.app/Contents/Resources/codex
    

    The public rust-v0.142.0-alpha.7 macOS DMG from the GitHub release contains CLI payloads (codex, codex-responses-api-proxy) rather than a replacement Codex.app, so that update path does not refresh the Desktop-bundled node_repl.

    This makes the failure independent of project/user feature flags and independent of the standalone CLI/app-server version: the Desktop-bundled node_repl path remains the component rejecting the sandbox metadata before any user JavaScript runs.

  12. 40 remaining items

  13. tagcturner commented on Jun 20, 2026

    @tagcturner

    Adding another Windows data point from Codex Desktop after today's update.

    Environment observed locally:

    • OS: Windows, TAGTools workspace under WSL/Rocky8
    • Codex Desktop package path shows OpenAI.Codex_26.616.5445.0_x64__2p2nqsd0c76g0
    • Bundled Chrome plugin cache: openai-bundled/chrome/26.616.41845
    • node_repl runtime path: AppData/Local/OpenAI/Codex/runtimes/cua_node/a89897d3d9baa117/bin/node_repl.exe

    Minimal repro in a local thread:

    nodeRepl.write('ok')

    Result before any JS executes:

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

    Additional checks/recovery attempted:

    • Restarted Codex Desktop: same error.
    • Rediscovered node_repl with tool search: same error.
    • Chrome health check was clean: extensionReady: true, nativeHostCorrect: true, chromeRunning: false, bridgeResetRecommended: false.
    • Killed stale node_repl.exe helpers: the tool then reported Transport closed until rediscovered/restarted, then returned to the same sandboxPolicy failure.
    • Temporarily moved the cached cua_node runtime aside to force reprovisioning; Codex did not recreate it in-thread, so I restored the runtime folder.
    • Chrome itself is not involved; the failure happens with the one-line nodeRepl.write('ok') call before any browser/bootstrap code runs.

    This lines up with the suspected desktop app / bundled MCP schema mismatch rather than a Chrome native-host issue.

  14. kevinb9n commented on Jun 20, 2026

    @kevinb9n

    Adding another macOS reproduction with a small direct-MCP diagnostic.

    Environment:

    • Codex Desktop: 26.616.41845, build 4198
    • Bundled CLI: codex-cli 0.142.0-alpha.6
    • Bundled Node: v24.14.0
    • macOS: 26.5 (25F71), arm64
    • node_repl path: /Applications/Codex.app/Contents/Resources/cua_node/bin/node_repl
    • codex CLI path: /Applications/Codex.app/Contents/Resources/codex
    • Configured sandbox mode: workspace-write

    Observed in a normal Codex Desktop thread:

    tool call error: tool call failed for `node_repl/js`
    
    Caused by:
        Mcp error: -32602: js: codex/sandbox-state-meta: missing field `sandboxPolicy`
    

    This happens with a trivial non-browser JS call, before any user JavaScript runs:

    nodeRepl.write(JSON.stringify({ ok: true, cwd: nodeRepl.cwd }, null, 2))

    Additional direct-MCP diagnostics:

    1. Running the bundled server directly with --disable-sandbox succeeds for a minimal JS call:
    manual js ok
    
    1. Running the bundled server normally and manually sending an empty sandbox metadata object
      reproduces the exact error:
    {
      "_meta": {
        "codex/sandbox-state-meta": {}
      }
    }

    Result:

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

    This suggests the bundled node_repl server and Node kernel are healthy, but the Codex
    Desktop/tool bridge is sending codex/sandbox-state-meta without the fields required by this
    node_repl build. It also confirms the Chrome/browser connector is only a downstream casualty:
    the failure happens before any Chrome connector code can run.

  15. m-thomson commented on Jun 20, 2026

    @m-thomson

    In case anyone would like to downgrade to the previous release until this is addressed:

    https://persistent.oaistatic.com/codex-app-prod/Codex-darwin-arm64-26.616.32156.zip

    As the name suggests, that's the MacOS/Arm build. I'm not sure how to download others, sorry.

    Tip: You can verify that oaistatic.com is indeed an official OpenAI domain by going to https://chatgpt.com/download/ and observing that all MacOS downloads come from there.

  16. hkay-dev commented on Jun 20, 2026

    @hkay-dev

    I'm running into this as well. If it helps (but I'm guessing based on all these comments, it does not) I started a project on the latest Codex windows build, pushed a brand new repo, and moved over to macOS, downlaoded the repo, and opened it up in Codex macos build, and I'm stuck here.

    Huge thank you to @m-thomson, this worked for me, just need to ignore that tempting Update button until this gets fixed.

    In case anyone would like to downgrade to the previous release until this is addressed:

    persistent.oaistatic.com/codex-app-prod/Codex-darwin-arm64-26.616.32156.zip

    As the name suggests, that's the MacOS/Arm build. I'm not sure how to download others, sorry.

    Tip: You can verify that oaistatic.com is indeed an official OpenAI domain by going to chatgpt.com/download and observing that all MacOS downloads come from there.

  17. gkb commented on Jun 21, 2026

    @gkb

    Adding another macOS repro with matching symptoms.

    Environment

    • macOS 26.5.1, build 25F80, arm64
    • Codex Desktop / bundled Chrome plugin version observed: 26.616.41845
    • Google Chrome: 149.0.7827.116 at /Applications/Google Chrome.app
    • Chrome profile selected by Codex checks: Default
    • Codex Chrome Extension: installed and enabled, version 1.1.5_0
    • Native messaging host manifest: present and valid

    Failure

    Any attempt to use the Chrome bridge / browser automation path fails before JS executes:

    tool call error: tool call failed for `node_repl/js`
    
    Caused by:
        Mcp error: -32602: js: codex/sandbox-state-meta: missing field `sandboxPolicy`
    

    Checks Performed

    • scripts/chrome-is-running.js --check: Chrome is running.
    • scripts/installed-browsers.js --check: Google Chrome is installed.
    • scripts/check-extension-installed.js --json: selected Default profile has the Codex Chrome Extension installed and enabled.
    • scripts/check-native-host-manifest.js --json: manifest exists, host name matches, expected extension origin is allowed, and correct: true.
    • Opened a blank Chrome window through scripts/open-chrome-window.js for the selected Default profile, waited, then retried the bridge. Same missing field sandboxPolicy error.

    Assessment

    This looks like the same app-side metadata/schema issue described here, rather than a missing or disabled extension or a broken native host manifest.

  18. etraut-openai commented on Jun 21, 2026

    @etraut-openai
    Contributor

    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.

  19. murillodutt commented on Jun 21, 2026

    @murillodutt

    Update after the hotfix: resolved on my macOS setup.

    Environment now:

    • Codex Desktop: 26.616.51431, build 4212
    • Browser plugin/runtime: 26.616.51431
    • macOS: 26.5.1 (25F80), arm64

    Validation:

    • mcp__node_repl.js now executes and returns the bundled Browser documentation.
    • In-app Browser bootstrap succeeds with agent.browsers.get("iab").
    • A local development page loads in the in-app browser and tab.playwright.domSnapshot() returns page content.

    So the codex/sandbox-state-meta: missing field sandboxPolicy failure is fixed in this environment.

  20. 3VILALLIUM commented on Jun 21, 2026

    @3VILALLIUM

    Confirmed fixed on my Windows Codex Desktop host after updating.

    Previous failing repro from my earlier comments:

    • Codex Desktop: 26.616.5445.0
    • Bundled Browser/Chrome/Computer Use runtime observed: 26.616.41845
    • Failure: every real node_repl/js execution failed before user JS ran with Mcp error: -32602: js: codex/sandbox-state-meta: missing field sandboxPolicy
    • Downstream impact: Browser, @Chrome, and Computer Use could not initialize.

    Current retest after hotfix/update:

    • Codex Desktop package: 26.616.6631.0
    • Bundled Browser/Chrome/Computer Use cache observed locally: 26.616.51431
    • Workspace dependency bundle: 26.619.11828
    • OS: Windows 10.0.26200.8655

    Smoke results:

    • mcp__node_repl.js_reset succeeded.
    • Minimal JS execution succeeded: nodeRepl.write('node-repl-ok') returned node-repl-ok.
    • In-app Browser comparison succeeded: opened https://example.com/, title Example Domain.
    • @Chrome initially reported Browser is not available: extension while Chrome was not running. After launching Chrome, extension-backed bootstrap succeeded, opened https://example.com/, read title Example Domain, and finalized the agent-created tab.
    • Computer Use bootstrap succeeded. sky.list_apps() returned successfully with 40 apps, 6 running apps, and 8 targetable windows. I did not test click/type/window activation in this pass.

    So the original shared node_repl/js sandboxPolicy failure is resolved on this Windows host after the hotfix. The only caveat I observed is separate from the original bug: Chrome still needs to be running before the extension-backed @Chrome path connects.

  21. waleed-salama commented on Jun 21, 2026

    @waleed-salama

    Confirmed fixed for me after updating Codex. The built-in Browser plugin now bootstraps successfully, and I can open/read a localhost page without the previous codex/sandbox-state-meta: missing field sandboxPolicy failure.

  22. enginoid commented on Jun 21, 2026

    @enginoid

    Confirmed working after update at version 26.616.51431 on macOS – thanks for a quick fix!

    Image
  23. maheshvi-dev02 commented on Jun 21, 2026

    @maheshvi-dev02

    It is good to know that its resolved, but the reason such a major bug existed without proper testing, needs to be investigated. It is okay if codex doesn't ship new features often, but stability of existing features is what should matter the most.

  24. bobchristof-gp commented on Jun 21, 2026

    @bobchristof-gp
    Author

    Confirmed fixed, thank you

  25. added a commit that references this issue on Jun 22, 2026
    2beb487
  26. riwagne commented on Jun 23, 2026

    @riwagne

    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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbrowserbugSomething isn't workingmcpIssues related to the use of model context protocol (MCP) serverssandboxIssues related to permissions or sandboxing

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions