Windows Desktop + WSL workspace: node_repl rejects /mnt/c sandboxCwd before Chrome/browser bootstrap
What version of the Codex App are you using (From “About Codex” dialog)?
Version 26.616.51431 Build 2026.6.21 ( Observed related plugin/runtime versions: - openai-bundled Chrome plugin: 26.616.51431 - Chrome extension: 1.1.5_0)
What subscription do you have?
Plus
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
Codex Desktop on Windows fails to start node_repl for a WSL workspace before any JavaScript code executes.
The workspace is opened from WSL as:
/mnt/c/Users/<user>/Documents/Codex/2026-06-22/chrome-codex
The same path maps cleanly to Windows:
C:\\Users\\<user>\\Documents\\Codex\\2026-06-22\\chrome-codex
However, calling mcp__node_repl__js fails before the provided JS code runs:
tool call failed for `node_repl/js`
Caused by:
Mcp error: -32602: js: codex/sandbox-state-meta:
sandboxCwd is not a local file URI:
file:///mnt/c/Users/<user>/Documents/Codex/2026-06-22/chrome-codex
This blocks Chrome/browser plugin bootstrap in WSL workspaces because the Chrome skill depends on node_repl.
The Chrome native host static configuration appears valid after repair:
- Chrome is running.
- Codex Chrome Extension is installed and enabled in the selected Chrome profile.
- Native messaging manifest exists.
- HKCU registry default value points to the manifest.
extension-host.exeexists.extension-host-config.jsonexists.browserClientPath,nodePath,nodeReplPath, andcodexCliPathall point to existing files.
Despite that, the browser/Chrome bootstrap cannot start because node_repl rejects the WSL-style sandboxCwd before browser code is reached.
This looks like a WSL path-to-Windows-file-URI conversion issue. The Windows-side node_repl appears to receive:
file:///mnt/c/Users/<user>/Documents/Codex/2026-06-22/chrome-codex
but likely expects a Windows-local URI such as:
file:///C:/Users/<user>/Documents/Codex/2026-06-22/chrome-codex
What steps can reproduce the bug?
- Use Codex Desktop on Windows.
- Open a WSL workspace whose path is under
/mnt/c, for example:
/mnt/c/Users/<user>/Documents/Codex/2026-06-22/chrome-codex
- Confirm the WSL path maps cleanly to a Windows path:
wslpath -w /mnt/c/Users/<user>/Documents/Codex/2026-06-22/chrome-codex
Expected output:
C:\\Users\\<user>\\Documents\\Codex\\2026-06-22\\chrome-codex
- Confirm WSL interop works:
cmd.exe /c ver
This succeeds and prints the Windows version.
- In Codex, invoke the Chrome/browser skill, or run a minimal
node_replcall such as:
nodeRepl.write("hello");
- The call fails before the JavaScript code executes:
tool call failed for node_repl/js
Caused by:
Mcp error: -32602: js: codex/sandbox-state-meta:
sandboxCwd is not a local file URI:
file:///mnt/c/Users/<user>/Documents/Codex/2026-06-22/chrome-codex
- Verify that the Chrome native host configuration is not the failing layer:
- Chrome is running.
- Codex Chrome Extension is installed and enabled.
- Native messaging manifest exists.
- HKCU native messaging registry entry points to the manifest.
extension-host.exeexists.extension-host-config.jsonexists.browserClientPath,nodePath,nodeReplPath, andcodexCliPathall point to existing files.
- Retry the browser/Chrome bootstrap.
Actual result: it still fails at node_repl startup with the same sandboxCwd error, before browser code runs.
Session id / token usage / context usage:
Not available from the UI at the time of filing.
Possibly related issues found before filing:
- #19365
- #21147
- #25280
- #25090
What is the expected behavior?
When a Codex Desktop thread uses a WSL workspace, node_repl should either receive a Windows-local file URI for /mnt/c/... paths, for example:
file:///C:/Users/<user>/Documents/Codex/2026-06-22/chrome-codex
instead of:
file:///mnt/c/Users/<user>/Documents/Codex/2026-06-22/chrome-codex
or run in the WSL/Linux context and accept Linux-local workspace paths.
The Chrome/browser plugin should be able to bootstrap from WSL workspaces when the native host configuration is valid.
Additional information
WSL uname -mprs:
Linux 6.6.114.1-microsoft-standard-WSL2 x86_64 x86_64
I initially investigated this as a Chrome extension/native host problem.
There were native host setup issues on this machine, but after manually repairing them the static checks pass:
- Manifest path:
C:\\Users\\<user>\\AppData\\Local\\OpenAI\\extension\\com.openai.codexextension.json
- Registry key:
HKCU\\Software\\Google\\Chrome\\NativeMessagingHosts\\com.openai.codexextension
- Registry default value:
C:\\Users\\<user>\\AppData\\Local\\OpenAI\\extension\\com.openai.codexextension.json
- Host path:
C:\\Users\\<user>\\.codex\\plugins\\cache\\openai-bundled\\chrome\\latest\\extension-host\\windows\\x64\\extension-host.exe
extension-host-config.jsonexists and points to existing files.
After this repair, the failure remains exactly at node_repl startup with the sandboxCwd is not a local file URI error. This suggests the remaining problem is independent of Chrome native messaging and is instead caused by WSL workspace path metadata being passed to a Windows-side runtime without conversion.
Also note: the bundled Chrome plugin package on this installation only contains the Windows host binary:
extension-host/windows/x64/extension-host.exe
No Linux/WSL native host binary was present, so installing Chrome inside WSL does not appear to be a practical workaround for this plugin.
7 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I put up a branch for the WSL-to-Windows
sandboxCwdpath mismatch described here:https://github.com/openai/codex/compare/main...Nicolas0315:codex/wsl-windows-mcp-sandbox-cwd?expand=1
Commit:
187047147bcf16a2f6a8fe302b8e7263482f9f90What it changes:
.exelaunched through interop, rewrites only thecodex/sandbox-state-meta.sandboxCwdvalue for that MCP call./mnt/c/...to a Windows drive file URI such asfile:///C:/..../home/...tofile://wsl.localhost/<distro>/home/....Verification:
just fmt,git diff --check, focusedcodex-coretests, existingmcp_sandbox_cwdtests,codex-mcpmetadata test, andcargo check -p codex-core -p codex-mcpall passed.cyberagent-mac-m5max: fetched the commit over SSH,git diff --check, focused tests, andcargo check -p codex-core -p codex-mcppassed.nicolas2025: fetched over SSH,git diff --check, focused tests, andcargo check -p codex-core -p codex-mcppassed; no lingering cargo/rustc/link processes.nicolas-macbook-pro: fetched over SSH andgit diff --checkpassed; cargo is not installed there.rtx5060ti: fetched over SSH andgit diff --checkpassed; Rust build is blocked by the machine's knownlink.exesetup issue (link: extra operand ...), with no lingering cargo/rustc/link processes.git merge-tree --write-tree origin/main HEADis clean against currentorigin/main(69596f0e4).I can still reproduce this on 2026-07-02 after restarting Codex Desktop.
Environment:
/mnt/c/Users/<user>/Documents/Codex/<workspace>26.623.81905A minimal
node_repl/jsinvocation fails before any JavaScript executes:The same failure blocks both:
sky.list_apps()can runbrowser-clientsetup can runBoth plugin client files are installed. This appears to remain a WSL-to-Windows
sandboxCwdURI translation issue rather than a Chrome, OpenAI login, or website issue.I can still reproduce this on 2026-07-03 after several Codex Desktop updates and a full Browser plugin reinstall/re-enable cycle.
Environment:
codex-cli 0.142.3BROWSER_USE_CODEX_APP_VERSION="26.623.81905"BROWSER_USE_AVAILABLE_BACKENDS="chrome"node_repl: enabled/home/<user>/projects/<repo>\\wsl.localhost\Ubuntu\home\<user>\projects\<repo>CODEX_HOMEpoints to the Windows Codex home:/mnt/c/Users/<user>/.codexMinimal smoke test:
Observed result in the WSL filesystem workspace:
I also tested a Windows-filesystem workspace while the Codex App agent environment was still set to WSL:
That fails before JavaScript execution as well:
Control case:
With the Codex App agent environment switched to Windows native, a Windows-filesystem test project succeeds:
Results in that control case:
nodeRepl.write('ok'): succeedshttp://127.0.0.1:8768/index.html: succeedsResult matrix:
| Agent environment | Workspace | Result |
| --- | --- | --- |
| Windows native |
C:\tmp\codex-browser-repro| Success || WSL |
/home/<user>/projects/<repo>| Fails before JS execution || WSL |
/mnt/c/Users/<user>/Documents/BrowserUseTest| Fails before JS execution |This makes the failure look broader than just a WSL-filesystem path issue. As long as the agent environment is WSL,
sandboxCwdis generated as a Linux file URI (file:///home/...orfile:///mnt/c/...) and the Windows-sidenode_repl.exerejects it before Browser Use, Chrome setup, or any JavaScript can initialize.The current best diagnosis is still a WSL-agent-to-Windows-
node_replsandbox metadata path/URI namespace mismatch.Adding another data point from Windows + WSL mode, with one extra bit of instrumentation that may help locate the failing layer.
Environment / setup:
codex-cli 0.142.4./home/<user>/projects/economics.Minimal live tool call still fails:
Observed result:
Additional proxy/bypass evidence:
I configured
[mcp_servers.node_repl]to point at a small WSL Python proxy instead of directly at the Windowsnode_repl.exe.codex mcp get node_replreports the expected proxy command:That proxy logs incoming
tools/callmetadata and rewrites WSLsandboxCwdfile URIs before forwarding to the Windows runtime. Manual/synthetic proxy tests show it does rewrite the path, for example:However, after a full Codex Desktop restart and a fresh thread, the actual
mcp__node_repl.jstool call above still fails with the originalfile:///home/...value, and the proxy trace receives no new entry from that live call.At the same time, the process tree shows both:
So the visible config says
node_replis proxied, and the proxy works in isolation, but the live exposedmcp__node_repl.jstool appears to be bound to a Desktop/app-server-owned directnode_repl.exeroute instead of the configured[mcp_servers.node_repl]command.That seems consistent with this being a Desktop Windows+WSL app-server/runtime bridge issue rather than a Chrome plugin install issue. It may also explain why config-level MCP workarounds do not fully resolve the problem: the Desktop-managed Node REPL bridge can still bypass the configured MCP server entry.
Follow-up: Computer Use is affected by the same bridge failure in this WSL session.
The Computer Use plugin files are installed, including:
But the prescribed lightweight Computer Use bootstrap/list-apps call fails before Computer Use can initialize:
Observed result:
So the issue is not Chrome-specific on this machine. In WSL agent mode, both Chrome and Computer Use are blocked at the shared
node_repl/jsbridge layer before either plugin's own client code can run.Another occurrence of this same bug (Feedback ID: 019f68a0-acfa-7be3-af89-9082ba15d05c):
Chrome fails to connect from a WSL2 workspace before reaching the extension.
node_repl/jsrejects thecodex/sandbox-state-metabefore any JS runs:Mcp error: -32602: js: codex/sandbox-state-meta:
sandboxCwd is not a local file URI:
file:///mnt/c/Users/<user>/Documents/Codex/<date>/chrome-integration-validation
Expected behavior: the desktop integration should translate the WSL path into a Windows-local URI (e.g. file:///C:/Users/<user>/Documents/Codex/<date>/chrome-integration-validation) or run the Chrome bridge inside the WSL context, consistent with what's already reported in this issue.