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
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

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_

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 5 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #14694
  • #14261
  • #14672
  • #14715

Powered by Codex Action

yiteng-guo · 5 months ago

this might be fixed by #14674 - let me try the pre-release version.

yiteng-guo · 5 months ago

yep it's fixed. Sry for the noise.