Repository navigation
Description
Summary
Codex 0.155.0-alpha.15 fails before executing any filesystem-restricted command on a native Ubuntu host when /proc/self/mountinfo contains valid nsfs entries created by snapd.
The failure is:
error building bubblewrap command: mountinfo path is not absolute
The affected mountinfo entries have an nsfs root such as mnt:[4026532835]. That is a valid Linux representation for a persisted mount namespace, but codex-rs/linux-sandbox/src/daemon_mounts.rs passes the mount root through mount_path(), which rejects any decoded path for which PathBuf::is_absolute() is false.
Environment
- Codex CLI:
0.155.0-alpha.15 - Native Codex SHA-256:
fa6c7e9ec934ffc2257208cc25586214a9f83b0d52b9e7494b083336bda31b13 - OS: Ubuntu 26.04.1, native Linux
- Architecture: x86_64
- Kernel:
7.0.0-31-generic - bubblewrap:
0.11.1 - snapd installed and providing persisted mount namespaces under
/run/snapd/ns
Reproduction
Run a filesystem-restricted Codex command using 0.155.0-alpha.15 on a system whose /proc/self/mountinfo contains snapd nsfs namespace mounts.
In the observed case, Codex emitted a public command_execution item but failed before the requested command started:
status: failed
exit code: 1
output: error building bubblewrap command: mountinfo path is not absolute
The requested positive-control command was never executed.
Relevant mountinfo entries
The actual Codex process tree and the invoking shell shared the same mount namespace (mnt:[4026531832]). The Codex processes saw these valid entries:
2202 397 0:5 mnt:[4026532835] /run/snapd/ns/snapd-desktop-integration.mnt rw - nsfs nsfs rw
5180 397 0:5 mnt:[4026532900] /run/snapd/ns/prompting-client.mnt rw - nsfs nsfs rw
6212 397 0:5 mnt:[4026532636] /run/snapd/ns/firmware-updater.mnt rw - nsfs nsfs rw
For each entry:
- filesystem type:
nsfs - field 4 / root:
mnt:[...](valid, but not an absolute filesystem pathname) - field 5 / mount point: absolute
/run/snapd/ns/*.mntpath
These are normal Linux nsfs representations for persisted mount namespaces.
Root cause
In codex-rs/linux-sandbox/src/daemon_mounts.rs, check_mounts() parses both the mount root and destination using mount_path():
let root = mount_path(root)?;
let destination = mount_path(destination)?;mount_path() then rejects non-absolute decoded values:
if !path.is_absolute() {
return Err(io::Error::other("mountinfo path is not absolute"));
}Calling mount_path("mnt:[4026532835]") deterministically produces the observed error. The first nsfs line therefore aborts sandbox construction before bubblewrap or the requested command runs.
Expected behavior
Valid nsfs mount roots such as mnt:[...] should not cause sandbox construction to fail. The mount-alias hardening should handle or safely ignore mountinfo roots whose semantics are not ordinary absolute filesystem paths, while preserving the intended isolation guarantees.
Actual behavior
Any filesystem-restricted command fails during bubblewrap argument construction on this host before command execution begins.
Additional notes
- No system mounts, snapd configuration, Codex configuration, or sandbox settings were changed as part of diagnosis.
- The Codex processes were not in a different mount namespace from the invoking shell.
- The failure is specific to the newer mountinfo validation path; the same machine did not hit this error with Codex
0.154.0. - No workaround that disables bubblewrap or weakens the sandbox has been applied.
Activity
harboriqdev commentedon Sep 17, 2026
Update after checking current
openai/codexmainsource:The original host reproduction remains on Codex
0.155.0-alpha.15, but the same source-level failure condition is still present on currentmain:codex-rs/linux-sandbox/src/daemon_mounts.rsstill passes every mountinfo root throughmount_path(root)?, andmount_path()still rejects any decoded value that is not an absolute filesystem path.That means valid snapd
nsfsroots such as:still reach the absolute-path check before they can be determined to be unrelated to the protected daemon-directory filesystem.
The existing
daemon_mounts_tests.rssuite has good alias/overmount coverage, but I do not see a regression case for a valid mountinfo entry whose root has non-path semantics such asmnt:[...].A minimal regression test could add an unrelated
nsfsentry like the one above to an otherwise-valid mount table and verify that it does not causecheck_mounts()to fail.A narrowly scoped implementation approach would be to avoid requiring an absolute filesystem path for mount roots that cannot participate in the target-device alias calculation, while continuing to require absolute mount destinations and retaining strict absolute-root validation wherever the root is actually used for alias/security reasoning.
I have not rebuilt and executed current
main; this update is based on the original real host reproduction plus current source inspection. I can immediately test any candidate fix on the original Ubuntu 26.04.1 / snapd host. If maintainers would like an external PR for the regression test and fix, I’m happy to prepare one.cassandracomar commentedon Sep 17, 2026
I put together the following patch to fix this but I can't open a PR with it as I'm not a collaborator.
codex-nsfs-mount-root.patch
amyzaling commentedon Sep 22, 2026
Same on Ubuntu (kernel 6.11), ChatGPT desktop 26.917.51856 (bundled codex 0.155.0-alpha.16), triggered via remote access from macOS. Standalone codex-cli 0.155.1 works fine. mountinfo has mnt:[…] nsfs roots under /run/snapd/ns/ (firefox, thunderbird, snap-store, …).
kudlaiyevhendev-cpu commentedon Sep 22, 2026
Confirmed on desktop 26.917.51856, bundled Codex 0.155.0-alpha.16. This blocks both sandboxed command execution and apply_patch. A debugger captured an nsfs
mnt:[…]root entering the absolute-path decoder before sandbox construction failed. On the same host, Codex 0.147.0 successfully executes the identical read-only/bin/truesandbox probe. No sandbox protections were disabled.Chaoscontrol commentedon Sep 22, 2026
I can reproduce this same failure in Codex Desktop running through WSL2.
Environment:
My /proc/self/mountinfo contains this entry:
root=mnt:[4026532227] mount=/run/snapd/ns/cups.mnt filesystem=nsfs
The non-absolute value is field 4 (mount root); field 5 (mount point) is absolute. This appears to match the nsfs trigger described here.
In a new Codex Desktop thread using WSL, running pwd fails before execution with:
error building bubblewrap command: mountinfo path is not absolute
The bundled CLI sandbox reproduces it from both a Windows-mounted project (/mnt/c/Users//.codex) and an ext4 project under /home. A direct system Bubblewrap smoke test succeeds. Restarting Codex and running wsl --shutdown did not resolve it.
The issue began after the latest app update; Codex had been working earlier that day. This also appears related to #47345, which reports the same error with app version 26.917.51856 and bundled CLI 0.155.0-alpha.16.
kudlaiyevhendev-cpu commentedon Sep 22, 2026
Follow-up: standalone Codex CLI 0.147.0 is a usable temporary workaround for local development on this affected host, not just for the earlier
/bin/trueprobe.With Desktop 26.917.51856 / bundled CLI 0.155.0-alpha.16 still failing with
mountinfo path is not absolute, we successfully used the already-installed 0.147.0 binary to:workspace-writesandbox;For a locally verified 0.147.0 executable, the command pattern we tested is:
For patching, the same binary's internal
--codex-run-as-apply-patchentry point worked when invoked inside that workspace-write sandbox. This is an observed version-specific workaround, not a claim that the internal entry point is a stable public API.Bounded isolation checks also passed: write-open attempts against an outside-workspace control file and a protected
.codexcontrol file were rejected withEROFS; read-only mode rejected workspace writes; control-file contents stayed unchanged. The child reportedNoNewPrivs: 1,Seccomp: 2, and a separate network namespace. Two existing loopback tests remained blocked by socket restrictions—we did not disable those restrictions.We did not replace Desktop's bundled binary, edit global configuration, disable the sandbox/AppArmor, change mounts, or stop snapd/Docker. If invoking this from Desktop, the outer launch still needs the normal approval for running the old executable outside the broken launcher; the actual development command remains inside the old CLI's explicit sandbox.
Scope/limits: this restores the tested local command/patch workflow only. We have not tested a new model-backed
codex execsession, all plugins/hooks, or security equivalence between versions; no API/credential migration is implied. Desktop's built-in tools remain affected.scottstensland commentedon Sep 23, 2026
was working until today when I ran normal system updates
after chatgpt got updates error message started
26.917.61114 fails; however downgrading to 26.901.51231 fixes it on the same updated system.
Ubuntu 26.04; desktop package chatgpt 26.917.61114, current in the stable APT repository.
Sending continue fails before the thread starts, while loading AGENTS.md.
on typing in
continue
codex shows red text popup window saying
Error submitting message
error creating thread: failed to load AGENTS.md instructions for environment
local: fs sandbox helper failed with status exit status: 1: error building bubblewrap command: mountinfo path is not absoluteseeing
tycho@emma ~ $ awk '$4 !~ /^// || $5 !~ /^//' /proc/self/mountinfo
2291 598 0:5 mnt:[4026533112] /run/snapd/ns/canonical-livepatch.mnt rw - nsfs nsfs rw
3967 598 0:5 mnt:[4026533171] /run/snapd/ns/snapd-desktop-integration.mnt rw - nsfs nsfs rw
4229 32 0:5 net:[4026533199] /run/docker/netns/fe01d7958d71 rw shared:1940 - nsfs nsfs rw
4475 32 0:5 net:[4026533355] /run/docker/netns/11a1ea2f43e6 rw shared:1957 - nsfs nsfs rw
4228 32 0:5 net:[4026533413] /run/docker/netns/e9371f361143 rw shared:1974 - nsfs nsfs rw
4231 32 0:5 net:[4026533471] /run/docker/netns/99e763138a61 rw shared:1991 - nsfs nsfs rw
4226 32 0:5 net:[4026533182] /run/docker/netns/3a6a83d208ae rw shared:2008 - nsfs nsfs rw
4555 32 0:5 net:[4026533529] /run/docker/netns/81428f06e019 rw shared:2025 - nsfs nsfs rw
4225 32 0:5 net:[4026533297] /run/docker/netns/7aafc32f08f7 rw shared:2042 - nsfs nsfs rw
8460 598 0:5 mnt:[4026533833] /run/snapd/ns/prompting-client.mnt rw - nsfs nsfs rw
9885 598 0:5 mnt:[4026533658] /run/snapd/ns/telegram-desktop.mnt rw - nsfs nsfs rw
I need sandboxing preserved, so Full access is not an acceptable workaround.
InakiBes commentedon Sep 23, 2026
I’m seeing the same issue with the Codex VS Code extension
26.917.61114, updated today.I’m not using the standalone Codex CLI or Codex Desktop.
Sandboxed command execution fails before Codex can access the repository, even for a simple
pwdcommand:As a result, Codex cannot read or edit files in the workspace.
On my system, the relevant
/proc/self/mountinfoentry is:So this appears to be exactly the same
nsfs/mnt:[...]case described in this issue.Since #46535 already contains the fix, this may indicate that the runtime bundled with the current VS Code extension
26.917.61114still does not include it.Adding this datapoint specifically because the issue is also reproducible in the current VS Code extension, not only in the CLI/Desktop builds mentioned above.
Mitri45 commentedon Sep 23, 2026
Confirmed on our system too. ChatGPT desktop 26.917.61114 with bundled Codex 0.155.0-alpha.16 and /usr/bin/bwrap 0.9.0. /proc/self/mountinfo contains an nsfs entry with a non-absolute root (net:[…]) mounted at /run/docker/netns/…. Both the normal sandboxed shell and
/usr/lib/chatgpt/resources/codex sandbox /bin/truefail witherror building bubblewrap command: mountinfo path is not absolute;bwrap --ro-bind / / /bin/truesucceeds. Restarting Codex did not resolve it.acoustesh commentedon Sep 23, 2026
Additional reproduction from VS Code Remote in WSL2 (2026-09-23):
6.18.33.2-microsoft-standard-WSL2, x86_64.openai.chatgpt26.5917.61114(version from its installedpackage.json).codex-cli 0.155.0-alpha.16.bubblewrap 0.11.1-1ubuntu0.3,snapd 2.76.3+ubuntu26.04.A normal sandboxed Codex
pwdfails before the command runs. The bundled executable also fails independently on a harmless probe:The system Bubblewrap probe
bwrap --ro-bind / / /bin/trueexits successfully. Relevant/proc/self/mountinfoentries are:These have a non-path
nsfsroot in field 4 and an absolute mount point in field 5, matching this issue. No mounts, sandbox settings, or system packages were changed during reproduction.1 remaining item
EdinUser commentedon Sep 23, 2026
Confirmed on native Fedora with Docker-created network namespace mounts.
App package:
chatgpt-26.917.61114-1.x86_64
Bundled Codex:
codex-cli 0.155.0-alpha.16
Bundled binary SHA-256:
b385b08da83c598f0e6db7eea545093aeea9f2569c7994165a67c2d62cc230b4
Relevant valid mountinfo roots:
net:[4026533133] /run/docker/netns/... nsfs
net:[4026532980] /run/docker/netns/... nsfs
Minimal reproduction:
/usr/lib/chatgpt/resources/codex sandbox /bin/true
Result:
error building bubblewrap command: mountinfo path is not absolute
exit status 1
This is the Docker net:[inode] variant explicitly covered by PR #46535,
which merged as 22dea11 and shipped in CLI 0.156.0. The current Linux
desktop package 26.917.61114 still bundles the pre-fix alpha.16 backend.
Please refresh the Linux desktop package with Codex CLI 0.156.0 or newer.
tyler-amprobo commentedon Sep 23, 2026
I ran into a bubblewrap issue as well after the Codex VS Code extension updated on me this morning.
OS: Ubuntu 22.04.05, Linux 6.8.0-138-generic x86_64 x86_64 ( I ssh into this machine from a Mac, noted in the error message)
VS Code Codex Extension Version: 26.917.62051
Some additional details:
Adding this additional datapoint since it seems like it affects the extension on more OS versions and extension versions than noted above.
This persists through uninstalling and reinstalling the extension, reboots, apt update/upgrades, etc.
As many other users in this thread sandboxing is a a feature I do not want to disable.
mikkorantalainen commentedon Sep 25, 2026
Confirming that following VS Code extension versions are broken on Ubuntu 24.04 LTS. It should be possible to reproduce the issue by installing Thunderbird via Snap system.
The workaround is to downgrade to openai.chatgpt-26.908.40401-linux-x64 which can be found via Extensions list ("Codex - OpenAI's coding agent" entry) and gear icon menu
Install specific version...– note that the gear icon on the extension page (tab) doesn't provide this option.tyler-amprobo commentedon Sep 25, 2026
@mikkorantalainen Good sleuthing! This does appear to have allowed me to side step the problem for the time being.
brodjustice commentedon Sep 26, 2026
Yes, I also did that and can confirm the workaround.
ibrahimjaved12 commentedon Sep 26, 2026
You don't get the newer models GPT-6 Luna and GPT-6 Sol then though, right?
brodjustice commentedon Sep 26, 2026
Indeed. The Codex extension in VSCode and the Codex app then does not allow you to use anything beyond GPT-6-Astra. Not a great situation.
groupzer0 commentedon Sep 26, 2026
Additional affected host on 2026-09-26:
7.0.0-111031-tuxedo26.917.62051, bundledcodex-cli 0.155.0-alpha.16.3(confirmed from the extension binary and affected session metadata)bubblewrap 0.9.0-1ubuntu0.3apply_patchfails during file verification before the edit with:fs sandbox helper failed with status exit status: 1: error building bubblewrap command: mountinfo path is not absoluteThe Codex process mountinfo contains these
nsfsentries (mount root in field 4, absolute mount point in field 5):The AppArmor
bwrapprofile is enabled; briefly disabling it caused separate sandbox errors, so it was restored. No Snap mounts were removed. This appears to be the same pre-fix mount-root parsing path addressed by #46535, still present in the currently installed VS Code extension bundle.amir5142 commentedon Sep 27, 2026
My system’s
/proc/self/mountinfocontains validnsfsmounts whose root fields are not filesystem paths, such asmnt:[…]from snapd andnet:[…]from Docker. The Codex CLI bundled with VS Code extension26.917.62051(0.155.0-alpha.16.3) treats these values as regular paths. Since they are not absolute paths, Bubblewrap command construction fails with:The command therefore fails before it starts. On the same host, standalone Codex CLI
0.157.1successfully ran the same sandboxed command.Temporary workaround
I configured the VS Code extension to use the installed
0.157.1CLI by settingchatgpt.cliExecutablein the VS Code user settings:{ "chatgpt.cliExecutable": "~/.codex/packages/standalone/releases/0.157.1-x86_64-unknown-linux-musl/bin/codex" }After applying the setting, run Developer: Reload Window so the extension reloads it. With this CLI,
codex sandbox -- /bin/pwdsucceeded and returned the working directory with exit code0.This workaround does not change system mounts or weaken sandbox settings. The extension documents
chatgpt.cliExecutableas a development-only setting, so some extension features may not work as expected with the replacement CLI.Reverting the workaround
Remove
chatgpt.cliExecutablefrom VS Code user settings, then run Developer: Reload Window. The extension will use its bundled CLI again. On this system, that CLI version reproduces the mountinfo error.StephanErbsKorsholm commentedon Sep 30, 2026
Additional confirmation from the current VS Code extension bundle:
openai.chatgpt 26.917.620510.155.0-alpha.16.31.134.07.0.0-34-genericworkspace-writeBoth ordinary shell commands and the built-in
apply_patchoperation fail before execution with:The affected process sees these mountinfo records:
The same requested commands succeed through approved execution outside the restricted sandbox. No repository permissions, Codex configuration, or system mounts were changed during diagnosis.
This confirms that extension
26.917.62051/ bundled CLI0.155.0-alpha.16.3still takes the affected mount-root parsing path on native Ubuntu 26.04.wubingqing1991 commentedon Sep 30, 2026
Additional reproduction from the Codex VS Code extension on native Ubuntu (2026-09-30).
Environment
openai.chatgpt 26.5917.62051(Preview)codex-cli 0.155.0-alpha.16.324.04.5 LTS6.8.0-142-genericx86_640.9.0at/usr/bin/bwrapUpdating the extension to the Preview version did not resolve the problem.
Minimal reproduction
A direct Bubblewrap smoke test succeeds:
I also tested another installed extension bundle, 26.917.62051. It contains the same Codex CLI version and fails identically.
As a control, I ran the same bundled Codex executable inside a temporary outer Bubblewrap namespace containing only ordinary absolute-root mounts. Inside that clean namespace, the following command succeeds:
codex sandbox -- /usr/bin/trueThis strongly indicates that the failure is triggered by Codex parsing valid nsfs mount roots. Bubblewrap itself, AppArmor, unprivileged user namespaces, and workspace permissions are all functioning.
One additional observation: codex doctor --json reports sandbox.helpers as OK because it checks helper and configuration readability, but it does not detect this sandbox-construction failure.
larsjohansson-saferadar commentedon Sep 30, 2026
I can confirm this regression on Ubuntu 24.04 under WSL2.
Environment:
The same direct sandbox command behaves differently between the two bundled CLI versions:
Bubblewrap itself works:
That command exits successfully.
/proc/self/mountinfocontains two Snapnsfsentries with non-path values in field 4:These are valid namespace mount roots, while the mountpoints in field 5 are absolute paths.
After downgrading the VS Code extension from
26.917.62051to26.908.40401and restarting VS Code, normal sandboxed commands worked again. I also verified that Codex could create, read, and remove a temporary file inside the repository. The repository remained clean afterward.This isolates the regression to the sandbox implementation introduced between bundled CLI versions 0.154.0-alpha.6.2 and 0.155.0-alpha.16.3. The newer binary also contains the strings
unsupported host mountandmountinfo path is not absolute; those strings are absent from the older binary.arsinclair commentedon Sep 30, 2026
Guys can you stop spamming please? You're attaching literally the same information and root cause for this problem is clear. Just upvote the issue.
LW1118 commentedon Nov 16, 2026
Additional reproduction: Docker nsfs mounts on Linux Mint 22.2
I can reproduce this issue with the following environment:
0.155.0-alpha.16.3/usr/lib/chatgpt/resources/codex0.9.0Reproduction:
Result:
The same error occurs with
codex exec -s read-only, even when executingpwd. Running from/tmpand using a minimal environment does not resolve the issue.System Bubblewrap works independently.
Relevant mount information:
Three Docker
nsfsmounts have non-absolute roots of the formnet:[...], with mountpoints under/run/docker/netns/.A system-call trace confirms that Codex successfully launches
codex-linux-sandbox, which opens/proc/self/mountinfobefore reporting the error.This appears consistent with the previously identified
nsfsmount-root parsing issue.I would appreciate confirmation that the fix is included in a Codex Desktop release compatible with Linux Mint. I would prefer to preserve the restricted filesystem sandbox rather than disable sandboxing or modify Docker mounts.
arsinclair commentedon Nov 22, 2026
This is fixed.