[TypeScript] Unable to skip sandboxing on platforms Codex considers supported

Resolved 💬 1 comment Opened May 17, 2025 by thingersoft Closed Aug 7, 2025

There is currently no way to run commands without sandboxing on platforms that Codex assumes support it (i.e., darwin and linux).
This prevents Codex from working in environments like Windows WSL 1, which is detected as linux but does not support seccomp/landlock.

The --dangerously-auto-approve-everything flag mentioned in the resulting error message has no effect, and I couldn’t find any reference to it in the Codex source code.
Similarly, setting the CODEX_UNSAFE_ALLOW_NO_SANDBOX environment variable doesn’t help, as its evaluation happens after the platform check in /codex-cli/src/utils/agent/handle-exec-command.ts.

Possible solution:
I'm not sure if the current behavior of CODEX_UNSAFE_ALLOW_NO_SANDBOX is intentional, but I would suggest changing it to fully disable sandboxing, even on platforms where it's theoretically available.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗