Skip to content

Linux sandbox rejects valid nsfs mount roots from snapd: mountinfo path is not absolute #46110

Open

Description

@harboriqdev

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/*.mnt path

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

  1. added
    bug
    CLI
    sandbox
    on Sep 17, 2026
  2. harboriqdev commented on Sep 17, 2026

    @harboriqdev
    Author

    Update after checking current openai/codex main source:

    The original host reproduction remains on Codex 0.155.0-alpha.15, but the same source-level failure condition is still present on current main: codex-rs/linux-sandbox/src/daemon_mounts.rs still passes every mountinfo root through mount_path(root)?, and mount_path() still rejects any decoded value that is not an absolute filesystem path.

    That means valid snapd nsfs roots such as:

    2202 397 0:5 mnt:[4026532835] /run/snapd/ns/snapd-desktop-integration.mnt rw - nsfs nsfs rw
    

    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.rs suite 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 as mnt:[...].

    A minimal regression test could add an unrelated nsfs entry like the one above to an otherwise-valid mount table and verify that it does not cause check_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.

  3. cassandracomar commented on Sep 17, 2026

    @cassandracomar

    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

  4. amyzaling commented on Sep 22, 2026

    @amyzaling

    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, …).

  5. kudlaiyevhendev-cpu commented on Sep 22, 2026

    @kudlaiyevhendev-cpu

    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/true sandbox probe. No sandbox protections were disabled.

  6. Chaoscontrol commented on Sep 22, 2026

    @Chaoscontrol

    I can reproduce this same failure in Codex Desktop running through WSL2.

    Environment:

    Codex App: 26.917.51856
    Bundled Codex CLI: codex-cli 0.155.0-alpha.16
    Windows: 10.0.26300.9539 x64
    WSL2: Ubuntu 24.04.2 LTS, kernel 6.18.33.2-microsoft-standard-WSL2
    Bubblewrap: 0.9.0
    

    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.

  7. kudlaiyevhendev-cpu commented on Sep 22, 2026

    @kudlaiyevhendev-cpu

    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/true probe.

    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:

    • read the actual development worktree;
    • apply patches to existing product files inside its workspace-write sandbox;
    • run focused Python regression tests and repository validation.

    For a locally verified 0.147.0 executable, the command pattern we tested is:

    # Run from the intended worktree; set the process working directory explicitly.
    /absolute/path/to/codex-0.147.0 -c 'sandbox_mode="read-only"' sandbox -- /bin/pwd
    /absolute/path/to/codex-0.147.0 -c 'sandbox_mode="workspace-write"' sandbox -- /bin/bash -c '<your local development command>'

    For patching, the same binary's internal --codex-run-as-apply-patch entry 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 .codex control file were rejected with EROFS; read-only mode rejected workspace writes; control-file contents stayed unchanged. The child reported NoNewPrivs: 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 exec session, all plugins/hooks, or security equivalence between versions; no API/credential migration is implied. Desktop's built-in tools remain affected.

  8. scottstensland commented on Sep 23, 2026

    @scottstensland

    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 absolute

    seeing
    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.

  9. InakiBes commented on Sep 23, 2026

    @InakiBes

    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 pwd command:

    error building bubblewrap command: mountinfo path is not absolute
    

    As a result, Codex cannot read or edit files in the workspace.

    On my system, the relevant /proc/self/mountinfo entry is:

    824 256 0:4 mnt:[4026532233] /run/snapd/ns/docker.mnt rw - nsfs nsfs rw
    

    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.61114 still 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.

  10. Mitri45 commented on Sep 23, 2026

    @Mitri45

    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/true fail with error building bubblewrap command: mountinfo path is not absolute; bwrap --ro-bind / / /bin/true succeeds. Restarting Codex did not resolve it.

  11. acoustesh commented on Sep 23, 2026

    @acoustesh

    Additional reproduction from VS Code Remote in WSL2 (2026-09-23):

    • OS: Ubuntu 26.04.1 LTS in WSL2, Linux 6.18.33.2-microsoft-standard-WSL2, x86_64.
    • VS Code server extension: openai.chatgpt 26.5917.61114 (version from its installed package.json).
    • Codex executable bundled with that extension: codex-cli 0.155.0-alpha.16.
    • System packages: bubblewrap 0.11.1-1ubuntu0.3, snapd 2.76.3+ubuntu26.04.

    A normal sandboxed Codex pwd fails before the command runs. The bundled executable also fails independently on a harmless probe:

    ~/.vscode-server/extensions/openai.chatgpt-26.5917.61114-linux-x64/bin/linux-x86_64/codex sandbox /bin/true
    error building bubblewrap command: mountinfo path is not absolute
    

    The system Bubblewrap probe bwrap --ro-bind / / /bin/true exits successfully. Relevant /proc/self/mountinfo entries are:

    403 346 0:4 mnt:[4026532226] /run/snapd/ns/gh.mnt rw - nsfs nsfs rw
    349 346 0:4 mnt:[4026532222] /run/snapd/ns/codex.mnt rw - nsfs nsfs rw
    

    These have a non-path nsfs root 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.

  12. 1 remaining item

  13. EdinUser commented on Sep 23, 2026

    @EdinUser

    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.

  14. tyler-amprobo commented on Sep 23, 2026

    @tyler-amprobo

    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:

    • Error message: error building bubblewrap command: mountinfo path is not absolute
    • offending root: mnt:[4026532833]
    • mountpoint: /run/snapd/ns/snapd-desktop-integration.mnt
    • filesystem hosting repository: ext4

    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.

  15. mikkorantalainen commented on Sep 25, 2026

    @mikkorantalainen

    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.

    openai.chatgpt-26.917.51856-linux-x64
    openai.chatgpt-26.917.62051-linux-x64
    openai.chatgpt-26.917.61114-linux-x64
    

    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.

  16. tyler-amprobo commented on Sep 25, 2026

    @tyler-amprobo

    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.

    openai.chatgpt-26.917.51856-linux-x64
    openai.chatgpt-26.917.62051-linux-x64
    openai.chatgpt-26.917.61114-linux-x64
    

    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.

    @mikkorantalainen Good sleuthing! This does appear to have allowed me to side step the problem for the time being.

  17. brodjustice commented on Sep 26, 2026

    @brodjustice

    The workaround is to downgrade to openai.chatgpt-26.908.40401-linux-x64

    Yes, I also did that and can confirm the workaround.

    Image
  18. ibrahimjaved12 commented on Sep 26, 2026

    @ibrahimjaved12

    The workaround is to downgrade to openai.chatgpt-26.908.40401-linux-x64

    Yes, I also did that and can confirm the workaround.
    Image

    You don't get the newer models GPT-6 Luna and GPT-6 Sol then though, right?

  19. brodjustice commented on Sep 26, 2026

    @brodjustice

    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.

  20. groupzer0 commented on Sep 26, 2026

    @groupzer0

    Additional affected host on 2026-09-26:

    • Ubuntu 24.04.5 LTS, native Linux; kernel 7.0.0-111031-tuxedo
    • VS Code Codex extension 26.917.62051, bundled codex-cli 0.155.0-alpha.16.3 (confirmed from the extension binary and affected session metadata)
    • System bubblewrap 0.9.0-1ubuntu0.3
    • apply_patch fails during file verification before the edit with: fs sandbox helper failed with status exit status: 1: error building bubblewrap command: mountinfo path is not absolute

    The Codex process mountinfo contains these nsfs entries (mount root in field 4, absolute mount point in field 5):

    1856 181 0:5 mnt:[4026532926] /run/snapd/ns/canonical-livepatch.mnt rw - nsfs nsfs rw
    3375 181 0:5 mnt:[4026532756] /run/snapd/ns/firefox.mnt rw - nsfs nsfs rw
    6086 181 0:5 mnt:[4026534768] /run/snapd/ns/multipass.mnt rw - nsfs nsfs rw
    7518 181 0:5 mnt:[4026534770] /run/snapd/ns/snap-store.mnt rw - nsfs nsfs rw
    

    The AppArmor bwrap profile 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.

  21. amir5142 commented on Sep 27, 2026

    @amir5142

    My system’s /proc/self/mountinfo contains valid nsfs mounts whose root fields are not filesystem paths, such as mnt:[…] from snapd and net:[…] from Docker. The Codex CLI bundled with VS Code extension 26.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:

    error building bubblewrap command: mountinfo path is not absolute
    

    The command therefore fails before it starts. On the same host, standalone Codex CLI 0.157.1 successfully ran the same sandboxed command.

    Temporary workaround

    I configured the VS Code extension to use the installed 0.157.1 CLI by setting chatgpt.cliExecutable in 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/pwd succeeded and returned the working directory with exit code 0.

    This workaround does not change system mounts or weaken sandbox settings. The extension documents chatgpt.cliExecutable as a development-only setting, so some extension features may not work as expected with the replacement CLI.

    Reverting the workaround

    Remove chatgpt.cliExecutable from 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.

  22. StephanErbsKorsholm commented on Sep 30, 2026

    @StephanErbsKorsholm

    Additional confirmation from the current VS Code extension bundle:

    • Codex VS Code extension: openai.chatgpt 26.917.62051
    • Bundled Codex CLI: 0.155.0-alpha.16.3
    • VS Code: 1.134.0
    • OS: Ubuntu 26.04 LTS, native Linux x86_64
    • Kernel: 7.0.0-34-generic
    • Sandbox mode: workspace-write

    Both ordinary shell commands and the built-in apply_patch operation fail before execution with:

    error building bubblewrap command: mountinfo path is not absolute
    

    The affected process sees these mountinfo records:

    2516 1111 0:5 mnt:[4026533150] /run/snapd/ns/snapd-desktop-integration.mnt rw - nsfs nsfs rw
    5401 1111 0:5 mnt:[4026532977] /run/snapd/ns/prompting-client.mnt rw - nsfs nsfs rw
    6598 1111 0:5 mnt:[4026532976] /run/snapd/ns/firefox.mnt rw - nsfs nsfs rw
    

    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 CLI 0.155.0-alpha.16.3 still takes the affected mount-root parsing path on native Ubuntu 26.04.

  23. wubingqing1991 commented on Sep 30, 2026

    @wubingqing1991

    Additional reproduction from the Codex VS Code extension on native Ubuntu (2026-09-30).

    Environment

    • Active VS Code extension: openai.chatgpt 26.5917.62051 (Preview)
    • Bundled Codex CLI: codex-cli 0.155.0-alpha.16.3
    • OS: Ubuntu 24.04.5 LTS
    • Kernel: 6.8.0-142-generic x86_64
    • VS Code installation: Snap revision 265, classic confinement
    • System Bubblewrap: 0.9.0 at /usr/bin/bwrap

    Updating the extension to the Preview version did not resolve the problem.

    Minimal reproduction

    $ codex sandbox -- /usr/bin/true
    error building bubblewrap command: mountinfo path is not absolute

    A direct Bubblewrap smoke test succeeds:

    $ bwrap --ro-bind / / --dev-bind /dev /dev --proc /proc -- /usr/bin/true
    $ echo $?
    0
    /proc/self/mountinfo contains valid nsfs entries with non-path values in field 4, including:
    mnt:[...] /run/snapd/ns/snapd-desktop-integration.mnt
    net:[...] /run/docker/netns/default
    

    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/true

    This 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.

  24. larsjohansson-saferadar commented on Sep 30, 2026

    @larsjohansson-saferadar

    I can confirm this regression on Ubuntu 24.04 under WSL2.
    Environment:

    Kernel: 6.6.87.2-microsoft-standard-WSL2
    bubblewrap: 0.9.0
    Working extension: 26.908.40401
    Working bundled CLI: codex-cli 0.154.0-alpha.6.2
    Failing extension: 26.917.62051
    Failing bundled CLI: codex-cli 0.155.0-alpha.16.3
    

    The same direct sandbox command behaves differently between the two bundled CLI versions:

    codex-cli 0.154.0-alpha.6.2:
    codex sandbox /usr/bin/true
    exit code 0
    
    codex-cli 0.155.0-alpha.16.3:
    codex sandbox /usr/bin/true
    exit code 1
    error building bubblewrap command: mountinfo path is not absolute
    

    Bubblewrap itself works:

    bwrap --ro-bind / / \
      --unshare-user \
      --unshare-pid \
      --unshare-net \
      --die-with-parent \
      /usr/bin/true
    

    That command exits successfully.

    /proc/self/mountinfo contains two Snap nsfs entries with non-path values in field 4:

    root=mnt:[4026532239] mount=/run/snapd/ns/cups.mnt filesystem=nsfs
    root=mnt:[4026532240] mount=/run/snapd/ns/docker.mnt filesystem=nsfs
    

    These are valid namespace mount roots, while the mountpoints in field 5 are absolute paths.
    After downgrading the VS Code extension from 26.917.62051 to 26.908.40401 and 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 mount and mountinfo path is not absolute; those strings are absent from the older binary.

  25. arsinclair commented on Sep 30, 2026

    @arsinclair

    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.

  26. LW1118 commented on Nov 16, 2026

    @LW1118

    Additional reproduction: Docker nsfs mounts on Linux Mint 22.2

    I can reproduce this issue with the following environment:

    • OS: Linux Mint 22.2, x86_64
    • Codex CLI: 0.155.0-alpha.16.3
    • Executable: /usr/lib/chatgpt/resources/codex
    • Bubblewrap: 0.9.0
    • Filesystem: ext4
    • Sandbox: Restricted filesystem, restricted network

    Reproduction:

    /usr/lib/chatgpt/resources/codex sandbox /bin/true

    Result:

    error building bubblewrap command: mountinfo path is not absolute
    

    The same error occurs with codex exec -s read-only, even when executing pwd. Running from /tmp and using a minimal environment does not resolve the issue.

    System Bubblewrap works independently.

    Relevant mount information:

    Three Docker nsfs mounts have non-absolute roots of the form net:[...], with mountpoints under /run/docker/netns/.

    A system-call trace confirms that Codex successfully launches codex-linux-sandbox, which opens /proc/self/mountinfo before reporting the error.

    This appears consistent with the previously identified nsfs mount-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.

  27. arsinclair commented on Nov 22, 2026

    @arsinclair

    This is fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIbugsandbox

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions