Default bubblewrap sandbox is incompatible with standard unprivileged Replit workspaces and similar restricted container environments
What version of Codex CLI is running?
0.117.0 CLI (Also observed in 0.115.0+)
What subscription do you have?
Pro
Which model were you using?
gpt-5.4 xhigh
What platform is your computer?
Linux / Replit workspace
What terminal emulator and version are you using (if applicable)?
_No response_
What issue are you seeing?
This issue is separate from #15340 and the system-bwrap lookup fixes.
Even when bwrap is installed and available in the environment, Codex’s default bubblewrap sandbox backend appears incompatible with a standard unprivileged Replit workspace and likely other similar restricted remote/container environments.
Replit uses a Nix-managed environment, so binaries can be present and usable in the shell without living under /usr/bin. The lookup side of that is already being addressed elsewhere. The issue here is different: the default Codex Linux bubblewrap pipeline explicitly uses user/PID namespace isolation, and in this environment bwrap fails because it cannot create the required namespaces.
Running bwrap directly in Replit fails with an error along the lines of:
bwrap: No permissions to create new namespace, likely because the kernel does not allow non-privileged user namespaces
So even after system bwrap discovery is fixed, Codex still cannot use the default bubblewrap sandbox in this environment.
What steps can reproduce the bug?
- Open a standard Replit workspace.
- Install bubblewrap in the workspace environment.
- Confirm that
bwrapis available in the shell. - Run a Codex action that requires the Linux sandbox.
- Observe that sandbox startup fails because
bwrapcannot create the required namespaces.
What is the expected behavior?
Codex should do one of the following:
- detect at startup that the environment denies the namespace operations required by the default bubblewrap backend and surface a clear message,
- document Replit and similar restricted container environments as unsupported for the default bubblewrap sandbox, and/or
- suggest or automatically fall back to an alternative supported backend when available instead of presenting this as a missing-package problem.
Additional information
This seems to affect standard unprivileged remote/container workspaces where:
- packages are provided by the environment rather than installed into
/usr/bin, and/or - unprivileged user namespaces are unavailable.
In my case, older Codex behavior worked in this environment before the bubblewrap-based default became the active path. The regression is specifically with the current default bubblewrap sandbox backend, not with Codex in general.
A clearer startup error would help a lot here, because installing or locating bwrap inside the workspace does not resolve the underlying incompatibility when namespace creation itself is blocked.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗