Skip to content

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

@thingersoft

Description

@thingersoft

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions