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 ↗

2 Comments

pratibhatomar · 3 months ago

Seeing the same issue on VS Code Remote Linux with extension openai.chatgpt-26.506.31421-linux-x64.

Host has bwrap:

which bwrap
/bin/bwrap

bwrap --version
bubblewrap 0.4.0

Active Codex binary:

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

Extension package has only codex and rg; no bundled bwrap:

find /nobackup/<redacted>/.vscode-server/extensions/openai.chatgpt-* -path '*/codex-resources/bwrap' -ls
# no output

Symlinking /bin/bwrap as codex-resources/bwrap is rejected with digest mismatch:

expected sha256:067a1289020a7398e71cf0cebbb057277b792831735da080f6cd88b8ec1237fa
got sha256:eb767688b8224d8d3dbe1f8cb30ac3dff9ae8b02ff0452eaec9f94874d4e0011

This suggests the Linux VS Code extension package is missing bundled codex-resources/bwrap, and the launcher is not resolving system /bin/bwrap.

wu200267 · 3 months ago

Update: this appears to be fixed after updating to VS Code extension openai.chatgpt-26.513.21555 with codex-cli 0.131.0-alpha.9.

I re-tested normal sandboxed command execution without escalation. Basic shell commands, repository reads, and /tmp writes now complete successfully, and the previous bubblewrap is unavailable failure no longer reproduces for me.

Closing this issue from my side.