Windows Codex App WSL mode requires danger-full-access because sandbox blocks WSL access
Open 💬 2 comments Opened May 28, 2026 by yfcube
What version of the Codex App are you using (From “About Codex” dialog)?
26.519.81530
What subscription do you have?
Plus
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What issue are you seeing?
Environment:
- Windows 11
- Codex App on Windows
- WSL 2 installed with 3 distros:
- Ubuntu-20.04 default
- Ubuntu-22.04
- Ubuntu-22.04-clone
Problem:
Codex App cannot run in WSL mode unless sandbox_mode = "danger-full-access". The user must disable command sandbox entirely to use WSL mode.
What steps can reproduce the bug?
Reproduction:
- Set [windows] sandbox = "elevated"
- Restart Codex App
- In Codex shell, whoami returns ...\codexsandboxoffline
- wsl -l shows no installed distributions
- Set [windows] sandbox = "unelevated"
- Restart Codex App
- In Codex shell, whoami returns real user ...\<user_name>
- HKCU\Software\Microsoft\Windows\CurrentVersion\Lxss contains distro entries
- But wsl -l fails with:
Wsl/EnumerateDistros/Service/E_ACCESSDENIED
- Only sandbox_mode = "danger-full-access" allows wsl -l and WSL agent to work.
What is the expected behavior?
Expected:
WSL agent mode should be able to access the current user's WSL distros without requiring danger-full-access.
Additional information
_No response_
2 Comments
Hi maintainers,
I looked into this and searched the public
openai/codexcodebase for the WSL launcher path.I could find Windows sandbox/app-server protocol references and generic Rust process spawning paths, but I could not find the Windows App host-side WSL bootstrap code that directly launches or enumerates WSL distributions through
wsl.exe.From the issue behavior, the problem seems to be in the Windows App layer before the agent enters WSL:
elevatedsandbox runs as the sandbox user and cannot see the current user's WSL distrosunelevatedsandbox uses the real user but WSL enumeration/start fails withE_ACCESSDENIEDdanger-full-accessworks because the host-sidewsl.exelauncher is not sandboxedMy proposed fix would be to special-case only the WSL agent bootstrap path so that the native Windows sandbox is not applied to the host-side
wsl.exelauncher. Once the agent is running inside WSL, the Linux sandbox should apply as documented.Before I open a PR, could you confirm whether the Windows App WSL bootstrap code is present in this repository? If yes, please point me to the right module/file. If that code lives outside the public repo, I can help with a smaller docs/diagnostic PR instead.
fk your mom codex noob shit suck my dick!!!!