WSL: No solution to "Error: The combination of seccomp/landlock that Codex uses for sandboxing is not supported in this environment."?
What version of Codex is running?
0.1.2505172129
Which model were you using?
o4-mini
What platform is your computer?
Linux 4.4.0-19041-Microsoft x86_64 x86_64
What steps can reproduce the bug?
Issue happens randomly during normal use on WSL.
What is the expected behavior?
A useable agent.
What do you see instead?
Error: The combination of seccomp/landlock that Codex uses for sandboxing is not
supported in this environment.
If you are running in a Docker container, you may want to try adding
restrictions to your Docker container such that it provides your desired
sandboxing guarantees and then run Codex with the
--dangerously-auto-approve-everything option inside the container.
If you are running on an older Linux kernel that does not support newer
features of seccomp/landlock, you will have to update your kernel to a newer
version.
at file:///root/.nvm/versions/node/v22.15.0/lib/node_modules/@openai/codex/dist/cli.js:498:184
at ChildProcess.exithandler (node:child_process:421:5)
at ChildProcess.emit (node:events:518:28)
at x0.emit (file:///root/.nvm/versions/node/v22.15.0/lib/node_modules/@openai/codex/dist/cli.js:332:3112)
at maybeClose (node:internal/child_process:1101:16)
at Socket.<anonymous> (node:internal/child_process:456:11)
at Socket.emit (node:events:518:28)
at x0.emit (file:///root/.nvm/versions/node/v22.15.0/lib/node_modules/@openai/codex/dist/cli.js:332:3112)
at Pipe.<anonymous> (node:net:351:12)
Additional information
Codex has been perfectly useable over the last 2 weeks on WSL until today. Now I receive the above across a wide variety of prompts & tasks. I doubt it's a change in codex, more likely something in my project is suddenly triggering it. The --dangerously-auto-approve-everything doesn't change anything. Codex is no longer able to complete any tasks in this project as a result.
5 Comments
We are seeing this happen in privileged kube containers running Linux as well using the exact same test used in #763.
Seems
--full-auto --auto-edittriggers sandboxing and any attempts to exempt ourselves from the sandboxing via--dangerously-auto-approve-everythingstill fails. Not using--full-auto --auto-editis the solution for now, but it's impractical to run automated handsfree workflows without this.reporting same issue here
effectively duplicate of #973
I'm not sure what's up with that
dangerously-auto-approve-everythingflag that gets suggested. It doesn't seem to actually be implemented anywhere.The environment variable
CODEX_UNSAFE_ALLOW_NO_SANDBOXis already implemented and seems intended to let you skip sandboxing entirely (#699), but was always after the check for Darwin and also got placed after the check for Linux sandboxing (#763). That PR also mentions the flag, but I don't see implementation.You could implement #996 on a custom codex build to be able to skip sandboxing using
CODEX_UNSAFE_ALLOW_NO_SANDBOX.Getting the same error
Error: The combination of seccomp/landlock that Codex uses for sandboxing is notsupported in this environment.
Thank you for the feedback. Please try using the latest version of Codex CLI. If the issue persists, we'd appreciate it if you could test it with the native/Rust implementation and let us know if it still occurs. More details can be found in our project update: https://github.com/openai/codex/discussions/1174.