bwrap: Can't mkdir /home/$USER: No such file or directory
Resolved 💬 3 comments Opened Mar 16, 2026 by yiteng-guo Closed Mar 16, 2026
What version of Codex CLI is running?
0.114.0
What subscription do you have?
API
Which model were you using?
gpt-5.3-codex
What platform is your computer?
linux
What terminal emulator and version are you using (if applicable)?
_No response_
What issue are you seeing?
bwrap sandbox doesn't work due to the following error. It fails and then will ask users for permissions to run commands that could be run inside the sandbox.
codex -c 'features.use_linux_sandbox_bwrap=true'
› can you echo hello to test.txt
bwrap: Can't mkdir /home/$USER: No such file or directory
I believe the issue is that my home dir is symlinked to some NFS dir.
> realpath /home/$USER
/mnt/.../.../user/home/$USER
A min repro is
> bwrap --die-with-parent --ro-bind / / --bind /home/$USER /home/$USER bash -lc 'ls /home/$USER'
bwrap: Can't mkdir /home/$USER: No such file or directory
> bwrap --die-with-parent --ro-bind / / --bind /home/$USER /mnt/.../user/home/$USER bash -lc 'ls /home/$USER'
(this works)
So this could be fixed by using the realpath ofDEST in --bind.
What steps can reproduce the bug?
see above
What is the expected behavior?
_No response_
Additional information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗