Improved sandbox diagnostics
Resolved 💬 5 comments Opened Feb 19, 2026 by solomatov Closed May 2, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor)
responded on this thread — see the highlighted reply below.
What version of Codex CLI is running?
codex-cli 0.104.0
What subscription do you have?
plus
Which model were you using?
gpt-5.3-codex
What platform is your computer?
apple container on arm64 macos
What terminal emulator and version are you using (if applicable)?
_No response_
What issue are you seeing?
I run an agent in apple container. I noticed strange behavior of sandbox. When I run codex sandbox linux mkdir -p .codex I got this error:
thread 'main' (12504) panicked at linux-sandbox/src/linux_run_main.rs:138:9:
error applying legacy Linux sandbox restrictions: Sandbox(LandlockRestrict)
Would be nice to at least warn that sandbox can't be applied to the current directory.
What steps can reproduce the bug?
Run codex sandbox linux mkdir -p .codex in a directory where this directory doesn't exist
What is the expected behavior?
Error due to sandbox forbidding this operation
Additional information
_No response_
5 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I asked codex for help, and it said to run:
``
❯ cat /sys/kernel/security/lsm 2>/dev/null | tr ',' '\n' | grep -i landlock || echo "no landlock lsm"``The result is
``
no landlock lsm``So, it seems that the kernel doesn't have landlock.
Bubblewrap also doesn't work, though the error is different:
``
bwrap: Unexpected capabilities but not setuid, old file caps config?``i am getting this,
my
codex.ymlactionlogs
This feature request hasn't received enough upvotes, so I'm closing it.