Skip to content

bwrap: Unknown option --argv0 #15356

Closed as duplicate
Closed as duplicate

Description

@cvjxendra

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

Activity

  1. added
    bug
    on Mar 20, 2026
  2. cvjxendra commented on Mar 20, 2026

    @cvjxendra
    Author

    A show stopper for my diffs.

  3. added
    CLI
    sandbox
    windows-os
    on Mar 20, 2026
  4. pelegm commented on Mar 20, 2026

    @pelegm

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

  5. johnnoren commented on Mar 21, 2026

    @johnnoren

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

  6. pedrosarkis commented on Mar 21, 2026

    @pedrosarkis

    same here

  7. ronglingze commented on Mar 21, 2026

    @ronglingze

    npm install -g @openai/[email protected], may be [email protected] have some wrong.

  8. cvjxendra commented on Mar 21, 2026

    @cvjxendra
    Author
  9. sgt1796 commented on Mar 21, 2026

    @sgt1796

    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

    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.

  10. oguz-hanoglu commented on Mar 25, 2026

    @oguz-hanoglu

    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
    
  11. ttulttul commented on Mar 27, 2026

    @ttulttul

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIbugsandboxwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions