If you get this error when using codex on debian 12 bookworm, this post is for you.
I’m currently blocked from editing your repo: every shell/tool call fails with:
bwrap: Unknown option --argv0
The --argv0 parameter requires requires bubblewrap 0.9.0+, debian 12 bookworm has 0.8.0-2. To fix this issue, you can upgrade bwrap on your host.
Clone the source code from https://github.com/containers/bubblewrap
Install some dependencies
sudo apt instal -t bookworm-backports meson
sudo apt install libcap-dev ninja-build
Get the code and build it
git clone https://github.com/containers/bubblewrap
cd bubblewrap
meson build
cd build
ninja
sudo ninja install
Confirm bwrap is installed
which bwrap
#/usr/local/bin/bwrap
bwrap --version
#bubblewrap 0.11.1
Now the problem is codex only use /usr/bin/bwrap, so you have to copy it to that path.
sudo cp /usr/bin/bwrap /usr/bin/bwrap.old
sudo cp /usr/local/bin/bwrap /usr/bin/bwrap
ldd /usr/bin/bwrap
Now restart codex, bwrap should work now. Happy coding.