Codex Linux sandbox fails with "bwrap: Unknown option --argv0" despite updated bubblewrap

Resolved 💬 2 comments Opened Mar 21, 2026 by amerqureshi Closed Mar 21, 2026

What version of the Codex App are you using (From “About Codex” dialog)?

26.318.11754

What subscription do you have?

Pro

What platform is your computer?

Linux NUC 6.8.0-100-generic #100~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Jan 19 17:10:19 UTC x86_64 x86_64 x86_64 GNU/Linux

What issue are you seeing?

Title:
Codex Linux sandbox fails with "bwrap: Unknown option --argv0" even with updated bubblewrap

Environment:

  • OS: Ubuntu 22.04 (jammy)
  • VS Code:
  • Snap 1.109.5
  • apt/deb 1.112.0
  • Codex extension:
  • stable
  • pre-release
  • bubblewrap:
  • /home/amer/.local/bin/bwrap
  • version 0.11.0
  • System also had:
  • /usr/bin/bwrap (0.6.1)

Problem:
Codex sandboxed shell commands fail with:

bwrap: Unknown option --argv0

This occurs even after:

  1. upgrading bubblewrap to 0.11.0
  2. confirming bwrap --version works in shell
  3. switching from Snap VS Code to non-Snap VS Code
  4. testing both stable and pre-release Codex extensions

Behavior:

  • bwrap --version works and shows 0.11.0
  • Codex sandboxed commands fail:
  • pwd → bwrap error
  • which bwrap → bwrap error
  • Codex repeatedly falls back to escalated prompts

Additional diagnostics:
The failure persists regardless of PATH ordering, suggesting Codex may not be using the shell-visible bwrap.

Repro command:
~/.vscode/extensions/openai.chatgpt-*/bin/linux-x86_64/codex sandbox linux /bin/true

Hypothesis:
The Codex sandbox appears to invoke bwrap with --argv0, but the actual binary used does not support that flag. It may be resolving to a system or internal binary instead of the updated one on PATH.

Impact:

  • All sandboxed shell commands fail
  • Workflow becomes unusable without escalation

Request:
Please confirm whether the sandbox uses a pinned/internal bwrap path or ignores PATH, and whether fallback to a compatible binary is planned.

What steps can reproduce the bug?

  1. Install VS Code on Ubuntu 22.04 (tested with both Snap and apt/deb versions).
  1. Install the OpenAI Codex extension (tested with both stable and pre-release).
  1. Ensure two versions of bubblewrap exist:
  • System: /usr/bin/bwrap (older version, e.g. 0.6.1)
  • User-installed: ~/.local/bin/bwrap (newer version, e.g. 0.11.0)
  1. Verify the newer bubblewrap is visible in the shell:

which bwrap
bwrap --version

Expected:
~/.local/bin/bwrap
bubblewrap 0.11.0

  1. Open a project folder in VS Code.
  1. Start a Codex session.
  1. Ask Codex to run a simple shell command:

pwd

or:
which bwrap

  1. Observe the error:

bwrap: Unknown option --argv0

What is the expected behavior?

_No response_

Additional information

This issue reproduces consistently across multiple VS Code installs and Codex extension versions.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗