removing "codex --enable use_legacy_landlock" will cause a lot of issues for a lot of people
What version of the Codex App are you using (From “About Codex” dialog)?
0.122.0
What subscription do you have?
the 20 dollar one
What platform is your computer?
ubuntu/pop os 24.04 (actually its running inside a docker container on that host)
What issue are you seeing?
https://github.com/openai/codex/issues/14919#issuecomment-4076504751
this solution codex --enable use_legacy_landlock
is something i rely on heavily in order for my codex to run in a docker container.
removing this flag will cause huge issues with my workflow.
and i'm sure there are a lot of others that will have this issue too.
please dont remove it or i will have to like fork the repo and figure it out.
i got this warning when updating today
⚠ [features].use_legacy_landlock is deprecated and will be removed soon.
<img width="676" height="356" alt="Image" src="https://github.com/user-attachments/assets/2a10cffc-9306-4fdc-b7e9-03be59576439" />
the whole reason i have to do the legacy thing is because of an issue with ubuntu 24.04 new security around permissions.
What steps can reproduce the bug?
i saw the warning when i run
codex --enable use_legacy_landlock
What is the expected behavior?
i just want to keep this feature
Additional information
_No response_
6 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
hey @user-22-33-56, thanks for the feedback. The main reason we’re moving away from landlock is that Codex needs one Linux sandbox path with more consistent filesystem, namespace, and network behavior across environments. The current direction is
bwrapplusseccomp, which gives us a clearer isolation boundary and better fail-closed behavior.If your host environment can’t run that sandbox directly, a good workaround is to run Codex inside a container and let Docker be the outer security boundary. We have an example devcontainer here:
https://github.com/openai/codex/tree/main/.devcontainer
In VS Code, open the folder in a devcontainer using
.devcontainer/devcontainer.secure.json, or from the CLI run:Inside the container, you can either keep Codex’s Linux sandbox enabled if the container grants the needed
bwrapcapabilities, or run Codex with--sandbox danger-full-accessif the container itself is the intended isolation boundary.Currently your default sandbox configuration FAILS on all vanilla ubuntu based systems - you need to fix it or provide clear instructions on how to get bubblewrap working on defauly Ubuntu installation.
DO NOT REMOVE THE LEGACY CONFIG before you have provided documentation and tested yourself how to get your default sandbox working on default Ubuntu installation.
Please refer to this documentation which @viyatb-oai just posted. Let us know if that's helpful or if you have any follow-up questions.
@mikkom-aimbition can you please try this? ubuntu 25.x ships with a profile
bwrap-userns-restrictwith apparmor-profiles that is somehow not on Ubuntu 24.04 by default - it was removed due to a Flatpak regression. See https://www.ubuntuupdates.org/package/core/noble/main/updates/apparmor-profiles and https://apparmor.net/news/release-4.0.2/@mikkom-aimbition ^ this fix worked for someone else https://github.com/openai/codex/issues/14936#issuecomment-4296166611.
I've updated the docs to reflect this https://developers.openai.com/codex/concepts/sandboxing#prerequisites - please let me know if its missing anything. Thanks!