Repository navigation
Browser Use Node REPL fails in Windows Desktop app with WSL workspace due to unmapped sandboxCwd #29639
Description
Summary
Browser Use / Node REPL does not work in the Codex Windows Desktop app when the agent is configured to run in WSL and the project lives on the WSL filesystem. The Desktop app auto-generates a node_repl MCP server that runs a Windows node_repl.exe, but tool calls send a Linux/WSL sandboxCwd URI (file:///home/...). The Windows-side Node REPL rejects that path as not being a local file URI.
All paths below are anonymized.
Environment
- Codex Desktop app on Windows
- Agent configured to run in WSL2
- Integrated terminal configured as WSL
- WSL distro: Ubuntu 22.04
- Project path inside WSL:
/home/<user>/projects/<repo> - Windows view of same project:
\\wsl.localhost\Ubuntu-22.04\home\<user>\projects\<repo> CODEX_HOMEinside the WSL agent session:/mnt/c/Users/<windows-user>/.codex- Codex CLI from
codex doctor:Codex Doctor v0.142.0 · linux-x86_64 - Desktop/browser runtime version visible in generated MCP env:
BROWSER_USE_CODEX_APP_VERSION=26.616.71553 - Browser Use plugin enabled
Relevant config state:
[desktop]
runCodexInWindowsSubsystemForLinux = true
integratedTerminalShell = "wsl"
[plugins."browser-use@openai-bundled"]
enabled = trueReproduction Steps
- On Windows, configure Codex Desktop to run the agent in WSL.
- Open a project located on the WSL filesystem, e.g.
/home/<user>/projects/<repo>. - Enable the Browser Use plugin.
- Start/restart Codex Desktop.
- Inspect MCP configuration from the WSL agent session:
codex mcp get node_replCodex Desktop auto-generates a user-level MCP server similar to:
[mcp_servers.node_repl]
command = "/mnt/c/Users/<windows-user>/AppData/Local/OpenAI/Codex/runtimes/cua_node/<runtime-id>/bin/node_repl.exe"
startup_timeout_sec = 120
[mcp_servers.node_repl.env]
BROWSER_USE_AVAILABLE_BACKENDS = "chrome"
CODEX_HOME = "C:\\Users\\<windows-user>\\.codex"
CODEX_CLI_PATH = "/usr/local/bin/codex"
WSLENV = "..."- Trigger a Node REPL JS call, for example through Browser Use setup or directly via the exposed
node_repl/jstool.
Actual Behavior
The Node REPL tool is visible, but every JS execution fails immediately:
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:///home/<user>/projects/<repo>
This blocks Browser Use entirely. The in-app browser cannot be automated from Codex in this setup.
Expected Behavior
When the Desktop app is configured to run the agent in WSL, Browser Use should work for WSL-hosted projects. Either:
- the
node_replMCP process should run in the matching WSL/Linux environment, or - Codex should map the WSL sandbox cwd to a Windows-local/UNC path before passing it to a Windows-side
node_repl.exe, e.g.\\wsl.localhost\Ubuntu-22.04\home\<user>\projects\<repo>, or - Browser Use should provision its internal Node REPL / backend in a way that does not mix Windows runtime expectations with Linux
file:///home/...sandbox metadata.
Additional Diagnostics
codex doctor --summary from the WSL agent session confirms the agent/runtime is Linux/WSL:
Codex Doctor v0.142.0 · linux-x86_64
Environment: Ubuntu 22.04, WSL_DISTRO_NAME present
Configuration: config loaded from /mnt/c/Users/<windows-user>/.codex/config.toml
MCP: 1 server (1 stdio)
Sandbox: restricted fs + restricted network
codex mcp get node_repl confirms the generated MCP server uses a Windows executable:
command: /mnt/c/Users/<windows-user>/AppData/Local/OpenAI/Codex/runtimes/cua_node/<runtime-id>/bin/node_repl.exe
cwd: -
I also tested adding an explicit UNC cwd to the generated MCP block:
cwd = '\\wsl.localhost\Ubuntu-22.04\home\<user>\projects\<repo>'Codex accepted and displayed that cwd via codex mcp get node_repl, but the tool still failed with the same sandboxCwd is not a local file URI: file:///home/... error. After restarting Codex Desktop, the generated MCP block was overwritten again and the explicit cwd was removed.
I also tested disabling the Chrome and Computer Use plugins while keeping Browser Use enabled. Codex Desktop still regenerated the same Windows node_repl.exe MCP block with BROWSER_USE_AVAILABLE_BACKENDS = "chrome".
I did not use --disable-sandbox; this report is about the default sandboxed path.
Activity
github-actions commentedon Jun 23, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
atlantho commentedon Jun 23, 2026
This is related to #29413 and likely shares the same root cause, but this report covers a distinct reproduction variant: the project is stored on the native WSL filesystem under
/home/..., not on a Windows-mounted/mnt/c/...path. It also specifically blocks Browser Use / in-app browser automation, not only Chrome extension bootstrap.\n\nI tested adding an explicit Windows UNCcwdfor the generatednode_replMCP server, e.g.\\wsl.localhost\Ubuntu-22.04\home\<user>\projects\<repo>. Codex accepted and displayed thatcwd, but the tool call still failed because the internally sent sandbox metadata remainedsandboxCwd=file:///home/.... After restarting Codex Desktop, the generated MCP block was overwritten again.\n\nSo this may be the same underlying sandboxCwd mapping issue as #29413, but it confirms the failure also affects native WSL filesystem projects and Browser Use / IAB.Nicolas0315 commentedon Jun 26, 2026
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).atlantho commentedon Jul 8, 2026
Version and severity update: this still matters on the current Codex
0.143.0setup.The original report was filed with
0.142.0, but Browser Use / Node REPL remains blocked in the Windows Desktop + WSL-backed runtime/workspace configuration. This should be treated as critical for this setup because Browser Use / in-app browser automation is a core Codex Desktop capability, not an optional diagnostic feature.Current relevant setup:
The user-visible impact is that Browser Use cannot be used reliably in this Windows Desktop + WSL-backed configuration.
tompw89 commentedon Jul 11, 2026
Current-build update from a fresh Windows Desktop + WSL reproduction.
Current state
26.707.3748.026.707.314280.144.1/home/<wsl-user>/projects/<repo>node_repl.exeMCP is present and enabledCODEX_HOME=C:\Users\<windows-user>\.codex_wslBROWSER_USE_AVAILABLE_BACKENDS="chrome"A no-op JS call still fails before execution with the exact error tracked here:
The failure persists after fully quitting and relaunching Codex Desktop.
Separate Desktop eligibility gate
The same fresh launch also logs:
Settings correspondingly shows:
Both
browser_useandin_app_browserare enabled.Runtime health isolation
The primary Workspace Dependencies runtime is now healthy and Settings reports
26.709.11516; its bundled Nodev24.14.0and Python3.12.13execute successfully. This rules out the previously missing workspace dependency bundle as the cause of the Node REPLsandboxCwdfailure.This suggests there are currently two distinct gates for WSL Browser Use:
sandboxCwdURI sent to a Windows-side stdio MCP process is not translated from WSL semantics; andreason=wsl-disabled.A
sandboxCwdtranslation fix appears necessary, but may not by itself enable the in-app Browser unless the Desktop availability gate and IAB backend provisioning are also changed.satyalyadav commentedon Jul 13, 2026
Fresh reproduction on 2026-07-13 with a newer Windows Desktop build.\n\nEnvironment:\n- Codex Desktop MSIX: 26.707.8479.0\n- Browser runtime/plugin reported in generated node_repl env: 26.707.62119\n- WSL Codex CLI: 0.144.1\n- Agent environment: WSL\n- Integrated terminal: WSL\n- Workspace: native WSL path under /home//writer\n- Generated node_repl command: Windows node_repl.exe under the Codex cua_node runtime\n\nA minimal call that does not initialize Chrome or browser-client:\n\n nodeRepl.write(nodeRepl.cwd)\n\nstill fails before JavaScript execution:\n\n Mcp error: -32602: js: codex/sandbox-state-meta:\n sandboxCwd is not a local file URI: file:///home//writer\n\nThe Windows bridge process is present and running, BROWSER_USE_AVAILABLE_BACKENDS is set to chrome, and WSL can map the workspace to:\n\n \wsl.localhost\Ubuntu\home<user>\writer\n\nThis remains a pre-browser WSL-to-Windows sandboxCwd translation failure on the current build.
tanjaduro commentedon Jul 16, 2026
Confirming this exact issue on a later Windows build.
Product shown in About: Powered by Codex & OWL
Version:
26.707.72221Release date:
14 July 2026Platform: Windows, with the agent configured to run in WSL2 / Ubuntu
Project location: WSL filesystem (
/home/...), not/mnt/c/...The built-in browser-control tool fails before executing any requested JavaScript:
The same error occurs for a minimal, harmless JavaScript request that does not attempt navigation or page interaction.
Local Codex session logs record the failure before the supplied JavaScript runs. The Desktop application logs also show that browser control uses a native Windows runtime:
The logged runtime reports:
The observed flow is therefore:
Ordinary repository operations through Codex CLI inside WSL work correctly. This confirms that the repository and normal WSL execution are functional, although the CLI does not expose an equivalent Desktop in-app browser-control bridge.
Windows can access the same repository through its UNC path:
However, I could not complete an equivalent
node_repl/jscomparison from a UNC-backed Codex task. The UNC-backed sessions inspected encountered a separate Windows sandbox/CMD UNC-path error before reaching browser control. Therefore, opening the project through UNC remains an inconclusive workaround rather than a verified fix or failure.I inspected the available Windows and WSL Codex configuration and found no supported user-level setting for translating
sandboxCwdfrom a WSL path into a Windows-accessible representation.No repository files, Codex binaries, bundled runtimes, application configuration, browser-security settings, sandbox settings, or system settings were modified.
Expected behavior: before a WSL-backed task invokes a native Windows MCP or browser-control runtime, Codex should normalize
sandboxCwdto a Windows-accessible path or valid file URI derived from the equivalent Windows or UNC path.The failure appears independent of the repository and website content because it occurs before the requested JavaScript executes.
I can provide sanitized excerpts from the Codex session log and Desktop application log if useful.
tanjaduro commentedon Jul 16, 2026
Additional current-build check from
26.707.72221:codex-cli 0.144.4.0.144.5; release notes do not include the WSLsandboxCwdfix.187047147bcf16a2f6a8fe302b8e7263482f9f90exists but is not on currentmain,rust-v0.144.5, orrust-v0.145.0-alpha.16; GitHubshows no associated PR.
file://wsl.localhostmapping string.node_repl/jsstill fails before JS execution with:codex/sandbox-state-meta: sandboxCwd is not a local file URI: file:///home/tdurova/code/personal/wiso-steuer-front-formsbrowser_use_availability_resolved ... reason=wsl-disabled, so even aftersandboxCwdmapping lands, Browser Use maystill need the WSL availability gate addressed.
oteme commentedon Jul 22, 2026
Still reproducible on 2026-07-22 with a newer build.
Environment (paths anonymized):
26.715.2305.0codex-cli 0.145.0-alpha.18node_repl 20260713.2, Node 24.14.0, windows-x6426.715.21425A minimal read-only call such as
nodeRepl.write("hello")fails before JavaScript execution:I also ran a controlled comparison against the same bundled Windows
node_repl.exeprocess:sandboxCwd: file:///C:/Users/<user>-> succeeds; reported cwd isC:\\Users\\<user>sandboxCwd: file:///home/<user>/<project>-> reproduces the exact-32602errorChanging only an exec command's workdir to
/mnt/c/...does not affect the MCP metadata; the thread's WSL workspace cwd is still sent. Full access also does not avoid the failure: the permission profile is unrestricted/disabled, butsandboxCwdis still attached and validated.This further isolates the failure to WSL-to-Windows
sandboxCwdURI conversion before browser/Chrome bootstrap, rather than the Chrome extension or native host. No Codex binaries, configuration, browser settings, or repository files were modified.3 remaining items
medking82 commentedon Aug 1, 2026
Fresh reproduction and current-
maincode check (2026-08-01).Environment
26.727.6591.00.146.0-alpha.9.226.727.51351/home/<user>/github/codexnode_replcommand: native Windowsnode_repl.exereached through/mnt/c/...A minimal Chrome runtime setup call still fails before any supplied JavaScript, browser discovery, or extension communication:
Chrome is running and the extension-installed/enabled checks pass, but those states are downstream of this specific rejection.
Current-main check
At current
maincommitee0247f95a6f,augment_mcp_tool_request_meta_with_sandbox_statestill selects the server environment'sPathUriand serializes it unchanged. It does not translate that URI into the target stdio server process's path namespace.I also fetched the community prototype
187047147bcf16a2f6a8fe302b8e7263482f9f90. Its intended behavior still matches the failure, but it no longer applies cleanly to currentmainbecause the MCP call path has moved to the newerPreparedMcpCall/ capturedMcpConfigarchitecture.A focused repair boundary appears to be: when a WSL session calls a Windows stdio MCP server, translate only
codex/sandbox-state-meta.sandboxCwdfor that target runtime:Native Linux servers and non-WSL hosts should remain unchanged. Regression coverage should include both mappings, URI encoding, and unchanged native-server behavior.
This is a separate, earlier blocker from #30265: this issue fails before JavaScript; #30265 concerns subsequent Desktop plugin/native-host reconciliation.
I understand external contributions are invitation-only. Could a maintainer confirm the preferred ownership layer for this conversion and, if appropriate, invite a focused PR adapting the regression tests and repair to current
PreparedMcpCall?StreamVi commentedon Aug 3, 2026
Fresh reproduction on 2026-08-04 with Codex Desktop on Windows and an Ubuntu 22.04 WSL workspace. Codex CLI: 0.144.6. A minimal
node_repl/jsrequest still fails before JavaScript execution with:The issue has persisted across multiple Codex Desktop updates and completely blocks in-app browser verification for WSL-hosted projects. Please prioritize WSL-to-Windows path normalization or run the browser-control runtime inside WSL.
StreamVi commentedon Aug 12, 2026
Additional reproduction on 2026-08-12. This remains reproducible in Codex Desktop on Windows with the agent and workspace running in WSL.
Environment (sanitized):
/home/<user>/<repo>0.146.00.146.0-alpha.9.2iabbackendA minimal
node_repl/jsbootstrap fails before any supplied JavaScript executes:Reproduction:
/home/<user>/<repo>in Codex Desktop on Windows with Codex configured to run in WSL.mcp__node_repl__js.sandboxCwdbefore the JavaScript is evaluated.Filesystem, Git, shell commands, frontend tests, and the in-app browser itself continue to work; only the agent-to-browser control bridge is blocked. This has occurred repeatedly across unrelated WSL projects, so it is not project-specific.
Expected behavior: translate the WSL workspace path to a Windows-accessible local/UNC URI before invoking the Windows-side runtime, or run
node_replinside WSL sofile:///home/...is local to that process.SenlerBot commentedon Aug 30, 2026
Fresh reproduction on 2026-08-30.
Environment:
26.825.5331.0/home/<user>/aisenleriabbackendThe required
mcp__node_repl__jsbootstrap still fails before any JavaScript executes:This completely blocks agent-driven inspection of local web applications. The target page is not involved—the request is rejected before Browser Use initializes. The issue therefore remains reproducible on the current
26.825Desktop build.SenlerBot commentedon Aug 31, 2026
Still reproducible in Codex Desktop on Windows with a WSL2-backed task.
Environment:
codex-cli 0.130.0-alpha.50.1.0-alpha1/home/<user>/<workspace>Following the bundled Browser Use instructions, the first
mcp__node_repl__jscall fails before any JavaScript executes:The same pre-execution failure also blocks the bundled Computer Use bootstrap, which confirms that the problem is in the shared Node REPL / Windows–WSL bridge rather than the target page or Browser client code.
Impact: local frontend services are reachable and can be tested through HTTP and ordinary shell tools, but the Codex in-app browser cannot be controlled for visual QA from the WSL-backed task.
JoshiCx commentedon Sep 1, 2026
Fresh reproduction on 2026-09-01 with a newer Windows Desktop build. The issue remains present, and this setup exposes both the WSL availability/provisioning gate and the Windows Node REPL path rejection.
Environment
OpenAI.Codex_26.831.1445.0_x6426.831.200050.152.0/home/<user>/<repo>/mnt/c/Users/<windows-user>/Documents/Codex/...runCodexInWindowsSubsystemForLinux = trueCurrent observations
The official Browser and Chrome bundles are physically present in the installed Windows app package. The browser host also starts and its named pipe is present. However, the active WSL agent's generated configuration contains:
The active WSL bundled-plugin marketplace snapshot omits both
browser@openai-bundledandchrome@openai-bundled, even though those bundles are present in the Windows application package. This makes Browser unavailable in fresh WSL tasks.Independently of that availability gate, directly exercising the installed Windows
node_repl.exestill fails before JavaScript execution. From a projectless WSL-backed task on a Windows-mounted path:The same runtime previously failed from the native WSL workspace with:
The installed
node_repl.exehash matches the executable packaged with this Desktop build, so this is not a stale-runtime mismatch. The Desktop-bundled WSL CLI is also already0.152.0.Impact
The official in-app Browser cannot be used while keeping the agent and primary repositories in WSL. Switching the whole agent back to Windows-native would reintroduce a Windows-to-WSL command/path boundary and is not a viable product fix for WSL-native repositories.
No plugins were force-installed, no Browser backend was manually enabled, and no application, repository, sandbox, or system configuration was modified during this reproduction.
This current-build evidence suggests both layers still need to be addressed:
sandboxCwdinto the target Windows runtime's path namespace (or run the browser-control runtime inside WSL).rodrigo-itao commentedon Sep 5, 2026
I'm experiencing the same issue as well.
Feedback ID: no-active-thread-01a07263-2ad9-7170-94c9-9305c822c821
StreamVi commentedon Sep 5, 2026
Confirmed this is still reproducible in Codex Desktop for Windows version 26.901.5280.0 with a workspace stored in the native WSL filesystem.
This reproduction uses the bundled Browser Use plugin with the in-app browser backend (
iab), not the external Chrome backend and not Computer Use. The standard bootstrap fails on the firstnode_repl/jscall, beforesetupAtlasRuntimecan execute or any browser tab can be inspected:The workspace itself is usable in the same task: terminal commands and file reads/writes work normally. Only the Node REPL/browser-control path is blocked. This suggests the WSL-to-Windows path translation issue still affects the current bundled
iabBrowser Use flow.Lili679280 commentedon Sep 9, 2026
2026-09-09 update: package 26.901.6511.0, both path forms, and a working local bridge diagnostic
Confirming the Windows Node REPL / WSL metadata mismatch on a newer package, with a direct runtime comparison. Related: #29413 for
/mnt/c/...tasks and #31049 for desktop integration availability.Environment: Windows x64 desktop app, local agent on WSL2 / Fedora Linux 44. AppX package
26.901.6511.0; earlier end-to-end browser checks used a privately patched26.901.5003.0copy. These are package versions, not About-dialog versions.Runtime-level evidence
Invoking the original bundled Windows
node_repl.exewith a WSLcodex/sandbox-state-meta.sandboxCwdstill rejects the request before JavaScript runs:A diagnostic stdio bridge translates the metadata path to the Windows runtime's namespace, using
wslpath -wfollowed by Windows-aware file-URI encoding:With this bridge and the
26.901.6511.0runtime/environment, JavaScript successfully evaluated1+1and usedfs.stat(nodeRepl.cwd)on both a C-drive workspace and a native WSL workspace. The unwrapped runtime reproduced the original rejection in the same diagnostic run.The integration diagnostic used the task's existing unrestricted permission profile. It does not establish end-to-end correctness under every restricted sandbox profile. Separate unit checks verify that translation preserves submitted code, permission/access decisions, network settings, unrelated metadata, and MCP callback responses; path values are the parts translated.
Separate desktop availability gate
As earlier comments noted, correcting
sandboxCwdis not sufficient by itself: the stock desktop renderer also marks browser integrations unavailable for local WSL execution. The relevant guard is still present in the26.901.6511.0bundle.A private
26.901.5003.0diagnostic copy combined the path bridge with an availability exception limited to the local WSL host when the bridge is installed. On 2026-09-07, the existing Edge extension backend and the in-app browser both passed an actual localhost-page check: page reading, Chinese/ASCII input, button click, and screenshot. Temporary tabs/server were then closed. Native-host registration had also recovered, so this is a combined working configuration, not proof that changing only the availability guard fixes all browser failures.The local correction retained account rollout/configuration permission checks and remote-host exclusions. For
26.901.6511.0, bundled-code tests and the Node REPL integration check pass; complete desktop/browser UI testing on that newer private copy has not yet been repeated.Please address both runtime metadata translation and supported desktop provisioning/availability for local WSL tasks. All paths here are anonymized. This report does not attribute a separate WSL executable-registration failure to Codex, and the original Store package was left unchanged.
m13v commentedon Sep 9, 2026
the UNC remap you tried (option 2) can't really win here: \wsl.localhost... is a network path, so the same 'local file URI' check rejects it, which is exactly what you saw. and even if it passed, the sandbox fs restrictions were computed by the linux agent against /home/..., so remapping just the cwd string hands the windows node_repl.exe a root its sandbox metadata was never scoped to. you'd swap a hard failure for one that runs but restricts the wrong tree, which is the worse of the two. running node_repl in the matching wsl env (option 1) is the only one that keeps the sandbox honest instead of papering over the boundary.
Lili679280 commentedon Sep 9, 2026
@m13v Regarding your comment, the distinction between restoring functionality and preserving sandbox enforcement is important. A clarification about the diagnostic in my preceding comment:
26.901.6511.0, the converted URIfile://wsl.localhost/<distro>/home/<user>/<workspace>was accepted in our integration test. JavaScript executed andfs.stat(nodeRepl.cwd)succeeded for the native WSL workspace. The/mnt/c/...workspace also passed after conversion tofile:///C:/.... The rejection reproduced in the unwrapped comparison was for the original Linux-style URI. This is evidence for this runtime/configuration, not a claim that UNC works with every version or sandbox profile.sandboxCwd: it also translates path values in the filesystem permission metadata. Unit tests check preservation of access decisions, network settings, submitted code, and MCP callbacks. However, preserving those fields does not prove that the Windows runtime enforces an equivalent policy over the resulting filesystem paths.As disclosed in the original comment, the live integration test used the task's existing
permissionProfile: { type: "disabled" }. We have not verified restricted-profile enforcement end to end, including allowed/denied reads and writes or path-alias behavior. Your concern about incorrect scoping therefore remains a valid requirement for any production solution; the successful functionality test does not settle it.Running the runtime in WSL may be an appropriate upstream design. The evidence here establishes a working local compatibility fix under the tested configuration, not that this bridge is ready for all users, nor that a Windows-side implementation can never preserve the required restrictions. Both the metadata boundary and the separate desktop browser-availability gate still need an upstream solution.
m13v commentedon Sep 9, 2026
worth naming what the
disabledprofile does to your own test: with enforcement off, the runtime never walks the allow/deny path over the translated URIs, so a passing fs.stat proves reachability, not scoping. that turns the fail-closed -32602 into a green run that structurally can't surface the wrong-tree exposure it was guarding against. the restricted-profile run is the only one that can.Lili679280 commentedon Sep 10, 2026
@m13v Following your latest comment, I have now run separate restricted-profile tests against the Windows runtime from package
26.901.6511.0(2026-09-10). Your distinction between reachability and enforcement is valid; these results narrow what I can claim about the local bridge.The test harness itself ran outside the tested sandbox, but each tested Node REPL request explicitly used
permissionProfile.type = "managed",file_system.type = "restricted", andnetwork = "restricted". No tested request used the disabled profile. Only disposable fixture files were used.Two policy variants were tested:
access = "none".For each applicable case I compared direct Windows-runtime invocation using Windows paths with invocation through the actual WSL bridge using Linux metadata paths.
EPERMEPERMEPERMEPERMThe read-restricted startup failure reports:
I did not enable an elevated backend or count the startup failure as a successful denied-read test. The UNC fixture directory was independently confirmed to exist and be readable by the outer Windows process; the restricted runtime still refused even explicitly granted operations.
So the bridge matches the Windows baseline for the tested C-drive write restrictions, but the native WSL filesystem case is not a working restricted-mode solution in this setup. Successful unrestricted UNC access from my earlier test does not change that conclusion. I found no out-of-scope writes in these cases, but denied-read enforcement remains unverified, and this is not an exhaustive alias/symlink or sandbox-equivalence audit.
Separately, the earlier functional smoke test has since been repeated on the private
26.901.6511.0desktop copy after restoring its matching bundled Browser plugin cache: Chrome and the in-app browser both passed local-page reading, input, clicking, and screenshots. That functional result is separate from the restricted-profile results above.m13v commentedon Sep 11, 2026
That UNC row is the tell: even explicitly granted writes come back EPERM through \wsl.localhost, both direct and through the bridge. So the remap doesn't just scope the wrong tree, the Windows backend can't hang any grant off a UNC root, so it fails closed on everything. You'd swap a clean pre-exec 'not a local file URI' reject for a runtime where allowed ops EPERM too, and now it reads as the user's policy being wrong rather than a path-mapping bug.
ojungo69 commentedon Oct 4, 2026
Review of the proposed WSL → Windows
sandboxCwdfixI reviewed the community proposal linked earlier in this issue, commit
187047147bcf16a2f6a8fe302b8e7263482f9f90, against current upstream4ad985e2caaf877b96dafd8138dae2def467e01e.The proposal addresses the boundary mismatch reported in this issue, but needs the following corrections before it can be treated as a supported fix. This is a code-review and reproduction report, following the current contribution policy; it is not a claim that the proposal has landed or that browser support has been restored.
1. Convert or construct a complete target-runtime sandbox context
The proposed metadata construction changes
sandboxCwd, then serializesturn_context.permission_profile()unchanged. At that revision,SandboxState.permission_profileusesPermissionProfile<AbsolutePathBuf>by default. Explicit filesystem entries therefore retain Linux-native strings such as/mnt/c/workand/mnt/c/work/private, while the cwd becomesfile:///C:/work.The receiving runtime needs both cwd and the path-bearing permission entries in its own namespace, with the same read/write/deny decisions. A successful unrestricted
fs.statcannot establish that a restricted profile works. Glob rules, project roots, temporary paths, and native-WSL/UNC support also need an explicit contract, rather than a cwd-only rewrite.Current upstream already captures per-environment cwd and permission profiles, and the public executor validates explicit permission paths for the receiving host. The fix should preserve these checks and construct the context for the actual receiver. This finding concerns inconsistent metadata in the unmerged proposal; I did not demonstrate a sandbox escape in the shipped browser runtime.
2. Use the MCP server's execution environment, not the orchestrator's WSL distro
The proposed
sandbox_cwd_for_mcp_serverfirst selects a cwd byenvironment_id, but then uses the current process'sis_wsl()andWSL_DISTRO_NAMEto transform it. Non-local stdio MCP servers are launched on their selected executor.For example, with a remote Windows executable such as
/mnt/c/bin/node_repl.exe, a local Ubuntu orchestrator must not rewrite a remote Debian WSL server's/home/user/workasfile://wsl.localhost/Ubuntu/home/user/work. At minimum, local WSL mapping must be restricted to a verified local interop process. Other environments need mapping information obtained from their own execution context.3. Preserve path identity; do not use a lossy legacy path renderer for execution
The proposal calls
cwd.inferred_native_path_string(). That passes throughLegacyAppPathString, whose documented behavior is lossy UTF-8 rendering.For
file:///home/user/%FF, the mapper produces a different filename containing U+FFFD. An input that cannot be represented for the target runtime should be rejected as unsupported, not silently redirected to another name. Ordinary space/percent/hash/question-mark escaping is handled by the existing URL segment builder and is not the defect here.4. Resolve the launched program and mount layout before classifying interop
The proposed Windows executable detector only accepts a
.exespelled under/mnt/<drive>/...or with a Windows drive prefix. It missesnode_repl.exeresolved throughPATH, and/c/bin/node_repl.exewith WSL's documentedautomount.root=/setting. WSL supports configurable automount roots and importing Windows PATH entries.The classification should use the actual execution/launch context and a verified target platform. Path conversion should use that environment's mount mapping, not assume every
/mnt/c/...is C: or that every drive is mounted under/mnt.5. Keep a drive root absolute
The proposed drive-path builder maps both
file:///mnt/candfile:///mnt/c/tofile:///C:. A drive root should be emitted asfile:///C:/.As a separate consumer check, Node v24.19.0's
fileURLToPath(uri, { windows: true })returnsC:for the first spelling, andpath.win32.isAbsolutereturnsfalse; the trailing-slash spelling produces an absolute Windows drive root. This checks Windows path syntax on a Linux host, not the proprietary Windows Node REPL receiver.Validation and remaining integration work
I compiled an isolated Rust workspace with the original
PathUriandAbsolutePathBufutility crates, an unchanged extraction of the proposal's pure conversion helpers, and its four original helper tests. The direct dependency versions match the original lockfile; the isolated workspace has its own lockfile. Host: Linux x86_64; Rust 1.95.0.file:///C:. Passing an observation test does not mean the observed root output is correct.file:///home/alice/project-%FFandfile:///home/alice/project-%EF%BF%BDfile://wsl.localhost/Ubuntu/home/alice/project-%EF%BF%BDnode_repl.exe, assuming PATH resolves it to a Windows executablefile:///home/alice/project/c/tools/node_repl.exe, assumingautomount.root=/file:///home/alice/projectThese fixtures supply the helper's existing
is_wsl=trueand distro-name parameters. They do not mount drives, configure PATH, or launch Windows executables. Permission-profile consistency and non-local environment handling above are source-review findings, outside this small harness.For a minimal independent check, call
sandbox_cwd_for_stdio_server_runtime_with_wsl_contextfrom the original test module with the table's inputs,Some("/mnt/c/tools/node_repl.exe")for the two filename inputs,true, andSome("Ubuntu"). Assert that the two filename outputs differ. For each executable fixture, use that command and the common cwdfile:///home/alice/project; assert the output isfile://wsl.localhost/Ubuntu/home/alice/project. All three assertions fail on the proposal revision.The original five-file patch also fails
git apply --checkagainst the upstream revision above; it needs adaptation to the current per-environment metadata design.This review does not establish Windows/WSL end-to-end browser success, and I did not build all of Codex. The separate desktop
wsl-disabledavailability gate reported in #44253 still needs a supported solution; a metadata-path change does not itself address that gate.Suggested regression coverage: restricted read/write/deny preservation on a Windows-drive workspace and a native WSL workspace; correct behavior for non-local executors; lossless path handling or explicit rejection; resolved
PATHexecutables and alternate mount roots; and actual browser discovery plus page read/input/click under the supported desktop configuration.