Suppress the warning `⚠ Codex could not find system bubblewrap at /usr/bin/bwrap` when sandbox is bypassed.

Resolved 💬 15 comments Opened Mar 20, 2026 by your-diary Closed Apr 3, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What variant of Codex are you using?

CLI

What feature would you like to see?

After upgrading to v0.116.0, I get this warning every time I start codex:

⚠ Codex could not find system bubblewrap at /usr/bin/bwrap. Please install bubblewrap with your package manager. Codex will use the vendored bubblewrap in the meantime.

I want this to be shown only when sandboxing is enabled.

Why?

I'm using codex exclusively inside a Docker container with --dangerously-bypass-approvals-and-sandbox.

If I understand correctly, bwrap is not used in this setup.

If so, being forced to install bwrap seems not reasonable.

Additional information

Probably related entry in the changelog:

Improved Linux sandbox startup on symlinked checkouts, missing writable roots, and Ubuntu/AppArmor hosts by preferring system bwrap when available. (https://github.com/openai/codex/pull/14849, https://github.com/openai/codex/pull/14890, https://github.com/openai/codex/pull/14963)

View original on GitHub ↗

15 Comments

larsschellhas · 4 months ago

For anyone coming across this in the first place, wondering how and where to install:

It's a linux package, you can install using sudo apt install bubblewrap

TonyGravagno · 3 months ago

@larsschellhas wrote:

For anyone coming across this in the first place, wondering how and where to install: It's a linux package, you can install using sudo apt install bubblewrap

Thanks - really.

But we're using the Codex extension and most devs would have no idea what bubblewrap is unless their own tooling relies on it. We shouldn't need to know about a dependency through an error message. If this package requires the dependency, it should refer to it correctly. If this is something we really should know about, it should be documented where we have visibility to make an informed decision.

I'm glad the extension uses bwrap, but without some clue about what it is or why it's there or any other nuance, use/devs here should not just install a package based on an error message. That can mask other issues or cause other things to break. The message "Codex will use the vendored bubblewrap in the meantime" does not provide data for people to make informed decisions.

joshlupo · 3 months ago
For anyone coming across this in the first place, wondering how and where to install: It's a linux package, you can install using sudo apt install bubblewrap

Works for most perhaps but does not work on Nixos.
I have bubblewrap installed and bwrap --version from anywhere reports bubblewrap 0.11.0 but Codex still doesn't find it because it only looks at /usr/bin/bwrap which is not where it's installed. Adding it to my path does not help.

Liuyh0308 · 3 months ago
### What variant of Codex are you using? CLI ### What feature would you like to see? After upgrading to v0.116.0, I get this warning every time I start codex: `` ⚠ Codex could not find system bubblewrap at /usr/bin/bwrap. Please install bubblewrap with your package manager. Codex will use the vendored bubblewrap in the meantime. ` I want this to be shown only when sandboxing is enabled. ## Why? I'm using codex exclusively inside a Docker container with --dangerously-bypass-approvals-and-sandbox. If I understand correctly, bwrap is not used in this setup. If so, being forced to install bwrap` seems not reasonable. ### Additional information Probably related entry in the changelog: > Improved Linux sandbox startup on symlinked checkouts, missing writable roots, and Ubuntu/AppArmor hosts by preferring system bwrap when available. (#14849, #14890, #14963)

I also encountered this problem when using this version of Codex. And running pwd within a Codex session reports an error: bwrap: No permissions to create a new namespace, likely because the kernel does not allow non-privileged user namespaces. On e.g. Debian this can be enabled with 'sysctl kernel.unprivileged_userns_clone=1'.
I am also using Codex inside a Docker container, and enabling sandbox mode causes an error. Installing bubblewrap with sudo apt install bubblewrap has no effect.

etraut-openai contributor · 3 months ago

This will be addressed in the next release.

ToxicPine · 3 months ago

@etraut-openai i'd just like to draw attention to the point @joshlupo made, as i'm also on NixOS.

> For anyone coming across this in the first place, wondering how and where to install: > It's a linux package, you can install using sudo apt install bubblewrap Works for most perhaps but does not work on Nixos. I have bubblewrap installed and bwrap --version from anywhere reports bubblewrap 0.11.0 but Codex still doesn't find it because it only looks at /usr/bin/bwrap which is not where it's installed. Adding it to my path does not help.
etraut-openai contributor · 3 months ago

@ToxicPine, This PR should address the lookup problem.

SomwareHR · 3 months ago

I, too, ran into this warning message.
Currently I am not willing to install bubblewrap.
Can use_legacy_landlock = true in ~/.codex/config.toml help in this situation? I didn't implement it yet, I am not sure if it would make any meaningful change.
Thank you
BR
sw

snabb · 3 months ago

Just a hint that can potentially benefit others that come here after searching with the error message. I am on Ubuntu 24.04 and encountered this issue even though I had bubblewrap installed.

The following was needed to make bubblewrap work:

sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0

If you want to have it applied automatically on next reboot, you can do something like this:

echo 'kernel.apparmor_restrict_unprivileged_userns=0' | sudo tee /etc/sysctl.d/99-codex-userns.conf
TonyGravagno · 2 months ago

Still seeing message from CLI but I don't care.

seakros · 2 months ago

From their page (https://developers.openai.com/codex/concepts/sandboxing):

Ubuntu AppArmor note: On Ubuntu 25.04, installing bubblewrap from Ubuntu’s package repository should work without extra AppArmor setup. The bwrap-userns-restrict profile ships in the apparmor package at /etc/apparmor.d/bwrap-userns-restrict. On Ubuntu 24.04, Codex may still warn that it can’t create the needed user namespace after bubblewrap is installed. Copy and load the extra profile:
sudo apt update
sudo apt install apparmor-profiles apparmor-utils
sudo install -m 0644 \
  /usr/share/apparmor/extra-profiles/bwrap-userns-restrict \
  /etc/apparmor.d/bwrap-userns-restrict
sudo apparmor_parser -r /etc/apparmor.d/bwrap-userns-restrict
apparmor_parser -r loads the profile into the kernel without a reboot. You can also reload all AppArmor profiles:
sudo systemctl reload apparmor.service
If that profile is unavailable or does not resolve the issue, you can disable the AppArmor unprivileged user namespace restriction with:
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
TonyGravagno · 2 months ago

Sure, we can play with other system settings. The point is that this tool is warning us about something that it wants and needs, and this isn't documented or a part of the install process.

codex-cli 0.124.0

warning: Codex could not find bubblewrap on PATH. Install bubblewrap with your OS package manager. See the sandbox prerequisites: https://developers.openai.com/codex/concepts/sandboxing#prerequisites. Codex will use the vendored bubblewrap in the meantime.
2026-04-25T17:27:37.942506Z ERROR rmcp::transport::worker: worker quit with fatal: Transport channel closed, when Client(HttpRequest(HttpRequest("http/request failed: error sending request for url (https://chatgpt.com/backend-api/wham/apps)")))
2026-04-25T17:28:12.990627Z ERROR codex_api::endpoint::responses_websocket: failed to connect to websocket: IO error: failed to lookup address information: Try again, url: wss://chatgpt.com/backend-api/codex/responses
2026-04-25T17:28:18.194641Z ERROR codex_api::endpoint::responses_websocket: failed to connect to websocket: IO error: failed to lookup address information: Try again, url: wss://chatgpt.com/backend-api/codex/responses
ERROR: Reconnecting... 2/5
2026-04-25T17:28:23.626157Z ERROR codex_api::endpoint::responses_websocket: failed to connect to websocket: IO error: failed to lookup address information: Try again, url: wss://chatgpt.com/backend-api/codex/responses
ERROR: Reconnecting... 3/5
2026-04-25T17:28:29.417219Z ERROR codex_api::endpoint::responses_websocket: failed to connect to websocket: IO error: failed to lookup address information: Try again, url: wss://chatgpt.com/backend-api/codex/responses
ERROR: Reconnecting... 4/5
2026-04-25T17:28:35.978681Z ERROR codex_api::endpoint::responses_websocket: failed to connect to websocket: IO error: failed to lookup address information: Try again, url: wss://chatgpt.com/backend-api/codex/responses
ERROR: Reconnecting... 5/5
2026-04-25T17:28:44.307559Z ERROR codex_api::endpoint::responses_websocket: failed to connect to websocket: IO error: failed to lookup address information: Try again, url: wss://chatgpt.com/backend-api/codex/responses
ERROR: Reconnecting... 1/5
ERROR: Reconnecting... 2/5

These other errors are just because Codex CLI no longer works after update. I'll take that up separately, But the warning is still there.

abulgher · 2 months ago
From their page (https://developers.openai.com/codex/concepts/sandboxing): > Ubuntu AppArmor note: On Ubuntu 25.04, installing bubblewrap from Ubuntu’s package repository should work without extra AppArmor setup. The bwrap-userns-restrict profile ships in the apparmor package at /etc/apparmor.d/bwrap-userns-restrict. > On Ubuntu 24.04, Codex may still warn that it can’t create the needed user namespace after bubblewrap is installed. Copy and load the extra profile: > `` sudo apt update sudo apt install apparmor-profiles apparmor-utils sudo install -m 0644 \ /usr/share/apparmor/extra-profiles/bwrap-userns-restrict \ /etc/apparmor.d/bwrap-userns-restrict sudo apparmor_parser -r /etc/apparmor.d/bwrap-userns-restrict ` > apparmor_parser -r loads the profile into the kernel without a reboot. You can also reload all AppArmor profiles: ` sudo systemctl reload apparmor.service ` > If that profile is unavailable or does not resolve the issue, you can disable the AppArmor unprivileged user namespace restriction with: ` sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 ``

And what about all the developers not having root rights on their development machine?

ShengLin1001 · 2 months ago

I ran into a related variant of this warning and found that the result depends on the directory from which codex is launched.

In my case, bwrap was installed without root privileges and was available on PATH as:

/public3/home/scg6928/mysoft/tools/bubblewrap/0.11.0/bin/bwrap

From the shell, this looked correct everywhere:

$ bwrap --version
bubblewrap 0.11.0

However, Codex behaved differently depending on the current working directory:

  • Launching Codex from /public3/home/scg6928/mysoft/tools/codex did not show the warning.
  • Launching Codex from /public3/home/scg6928/mysoft did show the warning:
Codex could not find bubblewrap on PATH. Install bubblewrap with your OS package manager. See the sandbox prerequisites: https://developers.openai.com/codex/concepts/sandboxing#prerequisites. Codex will use the vendored bubblewrap in the meantime.

The reason appears to be that Codex does not simply accept the first bwrap found by the shell. It rejects a bwrap binary when that binary is located inside the current workspace/sandbox root. In the example above:

  • When the workspace is /public3/home/scg6928/mysoft/tools/codex, the bwrap path is outside that workspace, so Codex accepts it.
  • When the workspace is /public3/home/scg6928/mysoft, the same bwrap path is inside the workspace, so Codex ignores it and reports that no system bwrap was found.

The practical workaround is to put bwrap somewhere outside any directory that may be used as the Codex workspace, for example:

~/.local/bin/bwrap

and make sure that path appears before any workspace-local bwrap path in PATH.

This behavior is subtle because which bwrap and bwrap --version can both look correct in the user's shell, while Codex still rejects that same binary depending only on the launch directory.

TonyGravagno · 1 month ago

FWIW, I did find good documentation in the Codex docs about bwrap:
https://developers.openai.com/codex/concepts/sandboxing
Mention here about Codex/Windows and need for bubblewrap-like tooling:
https://openai.com/index/building-codex-windows-sandbox/

At this point I'm pleased and satisfied that this topic has received enough attention to guide us on what this is and how to use it.

Frankly, I just installed bwrap to address the concerns and now I don't need to see any messages. So at this point everything is done/finished.

Thanks team!