VS Code Codex extension on Windows 11: Node REPL MCP fails because sandboxPolicy metadata is missing

Open 💬 0 comments Opened Aug 2, 2026 by pete165

The Node-backed MCP runtime exposed by the Codex extension for Visual Studio Code rejects every mcp__node_repl__js call before any JavaScript executes.

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

This prevents the bundled Spreadsheets skill from loading @oai/artifact-tool. The same error also occurred while initializing the Browser skill, suggesting a session-level Node runtime or sandbox-metadata provisioning problem rather than a spreadsheet-specific failure.

ENVIRONMENT
Codex surface:
Codex extension for Visual Studio Code on Windows
Operating system:
Windows 11 x64, build 26200
Visual Studio Code version:
1.131.0
Visual Studio Code commit:
e4c7e7b1d6d060162f4aa7f8225271b67ce1df75
Codex extension identifier and version:
[openai.chatgpt@26.727.40816](mailto:openai.chatgpt@26.727.40816)
Codex runtime reported by codex --version:
codex-cli 0.146.0-alpha.9.2
PowerShell version:
5.1.26100.8894
Bundled Spreadsheets plugin version:
26.423.10653
Workspace type:
Local Git repository

STEPS TO REPRODUCE
Open any local workspace in Visual Studio Code on Windows 11.

Open the Codex panel using the openai.chatgpt VS Code extension.

Start a new Codex chat/session.

Ask Codex to use the installed Spreadsheets skill.

Call mcp__node_repl__js with this minimal JavaScript:

nodeRepl.write(JSON.stringify({
cwd: nodeRepl.cwd,
tmpDir: nodeRepl.tmpDir,
requestMeta: nodeRepl.requestMeta
}, null, 2))
The tool call fails immediately with:
tool call error: tool call failed for node_repl/js

Caused by:
Mcp error: -32602: js: codex/sandbox-state-meta: missing field sandboxPolicy
Run mcp__node_repl__js_reset.

The reset succeeds and returns:

js kernel reset
Repeat the minimal JavaScript call.

The call fails again with the identical missing-sandboxPolicy error.

Optionally attempt a read-only spreadsheet operation against any valid XLSX workbook:

var artifactTool = await import("@oai/artifact-tool");
var inputBlob = await artifactTool.FileBlob.load(
"<absolute-path-to-valid-test-workbook.xlsx>"
);
var workbook =
await artifactTool.SpreadsheetFile.importXlsx(inputBlob);
var sheets = await workbook.inspect({
kind: "sheet",
include: "id,name"
});
var range = await workbook.inspect({
kind: "table",
range: "<worksheet-name>!A1:E5",
include: "values,formulas",
tableMaxRows: 5,
tableMaxCols: 5
});
nodeRepl.write(JSON.stringify({
sheets: sheets.ndjson,
range: range.ndjson
}, null, 2));
The tool call again fails with the missing-sandboxPolicy error before import("@oai/artifact-tool") executes.

EXPECTED BEHAVIOR
The Codex VS Code extension should attach valid sandbox metadata, including sandboxPolicy, when invoking the Node REPL MCP server.
The supported workspace dependency loader or runtime should expose the workspace package directory containing @oai/artifact-tool.
A valid XLSX workbook should import read-only using FileBlob.load and SpreadsheetFile.importXlsx.
Workbook inspection should return the worksheet metadata and the values from the requested range.

ACTUAL BEHAVIOR
No JavaScript executes because the Node REPL MCP request is rejected during sandbox-metadata validation.
The mcp__node_repl__js input schema exposes code, title, and timeout_ms. It does not provide a user-supplied sandboxPolicy argument. The missing value therefore appears to be internal metadata that must be attached by the Codex host or VS Code extension.
The session exposes these Node REPL tools:
mcp__node_repl__js
mcp__node_repl__js_reset
mcp__node_repl__js_add_node_module_dir
However, the session does not expose a supported workspace dependency loader or an authoritative workspace package-directory provider.
Because the JavaScript request fails before execution, it is not possible to determine whether @oai/artifact-tool is present in the workspace dependencies.

DIAGNOSTIC OBSERVATIONS
The Spreadsheets skill loads successfully.
The bundled Spreadsheets plugin directory and plugin manifest are present.
The Spreadsheets plugin reports version 26.423.10653.
The Node REPL MCP server is installed and responsive because mcp__node_repl__js_reset succeeds.
Only JavaScript execution fails.
The error occurs before import("@oai/artifact-tool") or any workbook operation executes.
The same missing-sandboxPolicy error occurred when attempting to initialize the Browser skill’s Node runtime.
This suggests the problem affects the shared Node REPL runtime rather than only the Spreadsheets plugin.
The test XLSX was a valid Open XML ZIP archive.
The workbook was not modified.
No npm packages were installed.
No system Node or Python runtime was used as a spreadsheet-runtime fallback.
No module-resolution changes were made.
No workspace files were modified during diagnosis.

RECOVERY ATTEMPTS
The persistent JavaScript kernel was reset using mcp__node_repl__js_reset.
The minimal JavaScript call was retried after the reset.
The read-only Artifact Tool import was retried.
Every mcp__node_repl__js attempt returned the identical missing-sandboxPolicy error.
A kernel reset does not resolve the issue.

LIKELY CAUSE
The immediate failure appears to be missing sandboxPolicy data in the codex/sandbox-state-meta metadata attached to mcp__node_repl__js requests by the Codex VS Code extension or its host runtime.
The absence of the supported workspace dependency-loader surface may be a second related session-provisioning problem.
This does not appear to be caused by:
The test workbook
Spreadsheet plugin instructions
Stale JavaScript bindings
Repository dependencies
User JavaScript
An invalid @oai/artifact-tool import

IMPACT
Any Codex skill that depends on the Node REPL runtime is unusable in the affected VS Code session.
This includes at least:
Spreadsheets workflows using @oai/artifact-tool
Browser workflows using the Node-backed runtime
There is no supported repository-level workaround because the failure occurs before user JavaScript executes.

PRIVACY AND INTEGRITY NOTES
All workspace-specific names, paths, worksheet names, workbook contents, and file hashes have been omitted from this report.

View original on GitHub ↗