Skip to content

Windows: node_repl rejects MCP sandbox metadata with missing field sandboxPolicy #29338

Closed as duplicate

Description

@shierdianxing

Summary

On Windows, both the bundled Browser and Computer Use plugins fail before any browser/desktop automation code runs because the bundled node_repl rejects the MCP sandbox metadata:

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

Restarting Codex, opening a fresh thread, opening the in-app browser, and using a browser-bound side chat do not resolve it.

Environment

  • Windows 11 (10.0.26200), x64
  • Codex Desktop package: 26.616.5445.0
  • Bundled Codex CLI: 0.142.0-alpha.6
  • Browser plugin: 26.616.41845
  • Computer Use plugin: 26.616.41845
  • Bundled node_repl archive: 20260609.1
  • Permission mode: workspace write / on-request approvals
  • Project is trusted

Reproduction

  1. Enable the bundled Browser and Computer Use plugins.
  2. Open an in-app browser tab.
  3. Ask Codex to control the current tab, causing a call to node_repl/js.
  4. The tool call fails immediately, before the JavaScript body executes.

The same error occurs when bootstrapping Computer Use with node_repl/js.

Expected behavior

Codex should attach sandbox metadata matching the schema expected by the bundled node_repl, and the JavaScript kernel should start inside the configured sandbox.

Actual behavior

node_repl advertises the experimental MCP capability codex/sandbox-state-meta, but rejects the metadata supplied by the Codex MCP client because sandboxPolicy is absent.

Diagnostic findings

  • The desktop application's persisted thread permissions contain a valid sandboxPolicy.
  • Codex logs show the active turn has a valid internal sandbox_policy=WorkspaceWrite.
  • The failure occurs only at the MCP handoff to node_repl.
  • The installed CUA runtime manifest and binaries exactly match the runtime bundled inside the installed Codex Desktop package, so this is not a stale local runtime.
  • In current openai/codex source, codex_mcp::SandboxState serializes fields such as permissionProfile, sandboxCwd, codexLinuxSandboxExe, and useLegacyLandlock; it does not contain a sandboxPolicy field. The bundled node_repl appears to expect an older/different schema.

Relevant source:

  • codex-rs/codex-mcp/src/runtime.rs
  • codex-rs/codex-mcp/src/rmcp_client.rs

Attempted workaround and security impact

Launching node_repl with --disable-sandbox was tested as a temporary workaround. It did not help: metadata validation fails before the JavaScript kernel is launched. The option was immediately removed and the original sandboxed configuration restored.

Please align the bundled node_repl sandbox-state schema with the Codex MCP client schema, or make the metadata handling backward compatible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbrowserbugSomething isn't workingcomputer-usemcpIssues related to the use of model context protocol (MCP) serverssandboxIssues related to permissions or sandboxingwindows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions