VS Code extension sandbox cannot find system bwrap even though /usr/bin/bwrap is on PATH

Resolved 💬 2 comments Opened May 9, 2026 by wu200267 Closed May 15, 2026

What version of the IDE extension are you using?

26.506.31421

What version of Codex CLI is running?

codex-cli 0.130.0-alpha.5

Which IDE are you using?

VS Code Remote / VS Code Server with the OpenAI Codex extension.

Extension path:

<vscode-server extensions>/openai.chatgpt-26.506.31421-linux-x64

Codex binary:

<vscode-server extensions>/openai.chatgpt-26.506.31421-linux-x64/bin/linux-x86_64/codex

What platform is your computer?

The Codex session is running inside a Linux container / remote VS Code environment.

Container userspace:

Ubuntu 20.04 LTS, x86_64

Host and container runtime details are intentionally redacted.

What issue are you seeing?

After updating the VS Code extension, sandboxed shell commands still fail before the target command runs. Even a trivial command such as pwd fails during Linux sandbox startup with:

thread 'main' (...) panicked at linux-sandbox/src/launcher.rs:43:13:
bubblewrap is unavailable: no system bwrap was found on PATH and no bundled codex-resources/bwrap binary was found next to the Codex executable
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

This happens even though system bubblewrap exists, is on PATH, and can run manually:

$ command -v bwrap
/usr/bin/bwrap

$ test -x /usr/bin/bwrap && echo executable
executable

$ bwrap --version
bubblewrap 0.4.0

$ bwrap --ro-bind / / /bin/true
# exits successfully

The PATH visible from commands that bypass the broken sandbox includes /usr/bin and the extension binary directory; the full PATH is redacted:

...:/usr/sbin:/usr/bin:/sbin:/bin:<extension bin>

I also checked the updated extension directory and did not find a bundled codex-resources/bwrap next to the Codex executable:

$ find <vscode-server extensions>/openai.chatgpt-26.506.31421-linux-x64 -path '*codex-resources*' -o -name bwrap
# no output

This makes normal sandboxed shell execution unusable. The only workaround is to run commands with escalation / outside the sandbox, which is noisy and defeats the normal workflow.

What steps can reproduce the bug?

  1. Use the VS Code OpenAI Codex extension in a Linux remote/container environment where /usr/bin/bwrap is installed and works.
  2. Start a Codex session with normal sandboxing enabled (workspace-write).
  3. Ask Codex to run a trivial command, for example:
pwd
  1. Observe that the command fails before execution with:
bubblewrap is unavailable: no system bwrap was found on PATH and no bundled codex-resources/bwrap binary was found next to the Codex executable
  1. Run the same diagnostics outside the sandbox / with escalation and observe that /usr/bin/bwrap is present, on PATH, and executable.

What is the expected behavior?

Codex should either:

  • discover and use the system bwrap available on PATH, or
  • ship/use a bundled codex-resources/bwrap with the VS Code extension, or
  • provide a clear supported way to configure the bwrap path.

At minimum, the sandbox launcher should not report that no system bwrap exists when /usr/bin/bwrap is available on PATH and runs successfully in the same environment.

Additional information

This appears to be different from older issues where bwrap is found but fails because of an unsupported option or namespace operation. In this case the launcher reports that it cannot find any system or bundled bwrap at all, even though /usr/bin/bwrap is available and working.

A useful diagnostic would be to log the exact PATH and candidate paths that linux-sandbox/src/launcher.rs checks before panicking.

View original on GitHub ↗

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