bwrap: Unknown option --argv0

Resolved 💬 10 comments Opened Mar 20, 2026 by cvjxendra Closed Mar 21, 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?

codex-cli 0.116.0

What subscription do you have?

Plus

Which model were you using?

gpt-5.4 high

What platform is your computer?

WSL/Ubuntu

What terminal emulator and version are you using (if applicable)?

Windows Terminal

What issue are you seeing?

I'm hitting a Codex CLI sandbox/runtime bug that blocks normal command execution.

Symptoms:

  • regular local commands fail immediately before the command itself runs
  • the failure happens in the sandbox wrapper, not in my command
  • the error is:
bwrap: Unknown option --argv0

Why this is a problem:

  • it prevents basic local inspection commands such as git diff, rg, and file-processing scripts
  • in my case it made review/verification unreliable
  • I had to switch to a less normal execution path just to continue working

What I expected:

  • commands should run normally inside the sandbox, or fail because of my command
  • bwrap should not reject its own arguments

What seems to be happening:

  • Codex is invoking bubblewrap with --argv0
  • the installed bwrap on this environment does not support that option
  • so the sandbox bootstrap fails before user commands execute

Environment:

  • Linux/WSL-based development environment
  • Codex CLI session
  • the issue appears at command startup, not during the actual tool logic

Impact:

  • breaks normal command execution in the session
  • makes code review results untrustworthy
  • forces use of escalated or alternate execution routes

Please investigate compatibility between Codex's sandbox launcher and the installed bwrap version, especially around the use of --argv0.

What steps can reproduce the bug?

Uploaded thread: 019d07b7-3614-75f2-8899-71e9d6aec06c

What is the expected behavior?

Don't show the error message.

Additional information

_No response_

View original on GitHub ↗

10 Comments

cvjxendra · 4 months ago

A show stopper for my diffs.

github-actions[bot] contributor · 4 months ago

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

  • #15283
  • #15291
  • #15335
  • #15302
  • #15260

Powered by Codex Action

pelegm · 4 months ago

This appears to me to be a real new bug, so I do not except it to be a duplicate.

johnnoren · 4 months ago

I have the same issue on Linux debian1 6.1.0-37-amd64. /dev/null is also blocked from the sandbox.

pedrosarkis · 4 months ago

same here

ronglingze · 4 months ago

npm install -g @openai/codex@0.115.0, may be codex@0.116 have some wrong.

cvjxendra · 4 months ago

This is the way.

Em sex., 20 de mar. de 2026, 23:04, ronglingze @.***>
escreveu:

ronglingze left a comment (openai/codex#15356) <https://github.com/openai/codex/issues/15356#issuecomment-4101823631> npm install -g @@., may be @. have some wrong. — Reply to this email directly, view it on GitHub <https://github.com/openai/codex/issues/15356?email_source=notifications&email_token=AXGBWKTJVJ4YQFVKS3Y2FRD4RX2CBA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMJQGE4DEMZWGMY2M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-4101823631>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AXGBWKSLFTLYW6I2X2QOIFT4RX2CBAVCNFSM6AAAAACWZUYNOSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DCMBRHAZDGNRTGE> . You are receiving this because you authored the thread.Message ID: @.***>
sgt1796 · 4 months ago

I reproduced the same failure with codex-cli 0.116.x:

codex sandbox linux /usr/bin/echo hello
# bwrap: Unknown option --argv0

In my case, this was not a missing-/usr/bin/bwrap problem. /usr/bin/bwrap existed, but the installed version was too old/incompatible for the arguments Codex is passing (--argv0).

Working workaround:

# ~/.codex/config.toml
[features]
use_legacy_landlock = true

It is also mentioned here [https://github.com/openai/codex/issues/15283#issuecomment-4098134409](url)

One WSL-specific gotcha: the active config is the Linux-side ~/.codex/config.toml, not the Windows-side C:\Users\<user>\.codex\config.toml.

So the underlying issue seems to be:

  • Codex is selecting the system bwrap
  • that bwrap does not support --argv0
  • sandbox bootstrap fails before the user command runs

This looks closely related to #15335 / #15291, but the useful immediate workaround on WSL is use_legacy_landlock = true.

oguz-hanoglu · 3 months ago

Workaround (worked at Ubuntu 22.04.5 LTS):
Manually install new one. Symlink the old one(bubblewrap 0.6.1) to the new one(bubblewrap 0.10.0).

sudo apt install -y libcap-dev libseccomp-dev meson ninja-build pkg-config
cd /tmp
wget https://github.com/containers/bubblewrap/releases/download/v0.10.0/bubblewrap-0.10.0.tar.xz
tar xf bubblewrap-0.10.0.tar.xz
cd bubblewrap-0.10.0
meson setup build --prefix=/usr/local
ninja -C build
sudo ninja -C build install
sudo ln -sf /usr/local/bin/bwrap /usr/bin/bwrap
ttulttul · 3 months ago

I'm also seeing this bug on 22.04.1 with Codex v0.116.0.