You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bubblewrap sandbox fails inside container for commands on bind-mounted host paths #14976
What terminal emulator and version are you using (if applicable)?
No response
What issue are you seeing?
On a shared filesystem without sudo, I run Codex CLI inside an Apptainer container (1.4.1) to restrict Codex read access to the host.
Since Codex 0.115.0, reading a file from a bind-mounted path into the container fails before file access with a bubblewrap error.
This does not occur with Codex 0.114.0, so it appears related to the Linux sandbox change in 0.115.0, where bubblewrap became the default on Linux (#13996, @viyatb-oai).
What steps can reproduce the bug?
Start an Apptainer container with a bind-mounted host directory.
Start Codex CLI inside the container.
Ask Codex to read a file in the bind-mounted directory.
Observe that the command fails before file access with: bwrap: Can't bind mount /oldroot/ on /newroot/: Unable to mount source on destination: Invalid argument
Running the same read through Codex CLI’s ! shell escape succeeds.
What is the expected behavior?
No response
Additional information
A native way to restrict Codex CLI filesystem read access, as discussed in #2847, would provide a workaround by allowing Codex to run directly on the host without relying on nested container sandboxing for read isolation.
Reacted by 0x241F31, Gasser Loïc, Guadalupe and Unchun Yang
@loicgasser This should be fixed in Codex 0.117.0 by #15693, which fixes compatibility with older system bubblewrap versions that do not support --argv0.
Please update to 0.117.0 and let us know if you're still seeing this.
@viyatb-oai: The problem still exists: in v0.122.0, it's possible to run Codex CLI in a container with the legacy landlock, but not with the bwrap sandbox (then, bind-mounts to the host don't work). However, the legacy landlock will be discontinued soon. Why was the issue closed?
Activity
github-actions commentedon Mar 17, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
zb-dvlpr commentedon Mar 17, 2026
Can confirm that this is happening at my end too. codex-cli 0.115.0
jocado commentedon Mar 19, 2026
I'm hitting the same issue with
0.115.0loicgasser commentedon Mar 26, 2026
This is an issue for linux users:
viyatb-oai commentedon Mar 27, 2026
@loicgasser This should be fixed in Codex 0.117.0 by #15693, which fixes compatibility with older system bubblewrap versions that do not support --argv0.
Please update to 0.117.0 and let us know if you're still seeing this.
JannikWolff commentedon Apr 22, 2026
@viyatb-oai: The problem still exists: in
v0.122.0, it's possible to run Codex CLI in a container with the legacy landlock, but not with the bwrap sandbox (then, bind-mounts to the host don't work). However, the legacy landlock will be discontinued soon. Why was the issue closed?smocherla-brex commentedon May 20, 2026
+1 on the above , bwrap doesn't seem to work when the root is overlayfs backed
with errors like. Adding explicit sandbox mounts and permissions like below works but it is still tedious to add the paths I care about.