CODEX_UNSAFE_ALLOW_NO_SANDBOX env has no effect for linux platform
Seems like the CODEX_UNSAFE_ALLOW_NO_SANDBOX has no effect on linux platform and only affects not darwin and not linux platforms. This also leads to being locked up at https://github.com/openai/codex/blob/a67a67f3258fc21e147b6786a143fe3e15e6d5ba/codex-cli/src/utils/agent/sandbox/landlock.ts#L97 on MacOS with the --dangerously-auto-approve-everything do nothing and the node.platform detected as linux
This makes it impossible to run the Codex in headless mode in Docker on MacOS, and in theory, impossible to run Codex on Linux in headless non-sandboxed mode too because you'll always fall into LINUX_LANDLOCK and never into the last branch that checks for CODEX_UNSAFE_ALLOW_NO_SANDBOX value
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗