Sandbox failure on Ubuntu 22.04: bwrap --argv0 not supported (bubblewrap 0.6.1)

Resolved 💬 2 comments Opened Mar 23, 2026 by ericataetherbiomech Closed Mar 23, 2026

What version of the Codex App are you using (From “About Codex” dialog)?

Identifier openai.chatgpt Version 26.318.11754 Last Updated 0 seconds ago Size 233.03MB

What subscription do you have?

Enterprise

What platform is your computer?

Environment: OS: Ubuntu 22.04.3 LTS Bubblewrap: 0.6.1 Codex config included: sandbox_mode = "workspace-write" approval_policy = "on-request" initially VS Code extension environment

What issue are you seeing?

Normal Codex file edits fail before touching the repo
Error returned:
bwrap: Unknown option --argv0
This breaks the standard editing path even for simple Python file edits

Expected behavior:

Codex should be able to edit files normally on common LTS Linux environments like Ubuntu 22.04
If a newer Bubblewrap feature is required, Codex should detect unsupported versions and fall back gracefully instead of hard failing
Impact:

Prevents normal code edits through the standard Codex toolchain
Forces users into confusing sandbox/runtime debugging unrelated to their actual coding task
Makes the extension unreliable on otherwise common developer environments

Additional notes:

The machine had /usr/bin/bwrap version 0.6.1
Ubuntu 22.04 package sources only offered 0.6.1 / 0.6.1-1ubuntu0.1, so this is not an unusual setup
Changing use_legacy_landlock helped narrow the issue, but the core problem is that the runtime appears to assume a Bubblewrap capability not present on Ubuntu 22.04

What steps can reproduce the bug?

Let codex silently auto update while running ubuntu 22 and vscode with codex extension. Ask for code modifications.

Exact conversation:

GPT:
The patch tool itself is tripping over the sandbox wrapper in this session, so I’m retrying the edit path carefully. If it keeps failing, I’ll need to fall back to a shell edit just to unblock the fix.

I’m falling back to a direct shell edit because the patch tool is failing under this sandbox wrapper. I’ll keep the change minimal and verify it immediately afterward.

The approval prompt for the fallback edit was denied, so I’m trying one last non-escalated route to see if I can still patch this safely inside the sandbox.

Me:
I dont understand this, this change should only require changes to the python files, I dont know why you need to run pearl

GPT:
Final message
It doesn’t require Perl logically. You’re right.

The actual code change is just a small Python edit in the helper and test file. I reached for perl -0pi only as a fallback text-edit command because the normal patch/edit path is failing in this session with the sandbox error:

bwrap: Unknown option --argv0

So the problem is not the implementation itself. It’s that the editing toolchain in this shell is currently broken, and I tried a shell-based file edit as a workaround.

What is the expected behavior?

Expected behavior:

Codex should be able to edit files normally on common LTS Linux environments like Ubuntu 22.04
If a newer Bubblewrap feature is required, Codex should detect unsupported versions and fall back gracefully instead of hard failing

Additional information

Additional notes:

The machine had /usr/bin/bwrap version 0.6.1
Ubuntu 22.04 package sources only offered 0.6.1 / 0.6.1-1ubuntu0.1, so this is not an unusual setup
Changing use_legacy_landlock helped narrow the issue, but the core problem is that the runtime appears to assume a Bubblewrap capability not present on Ubuntu 22.04

use_legacy_landlock does not make any difference.

Suggested fix:

Detect Bubblewrap feature support before using --argv0
Provide a compatibility fallback for older bwrap versions
Avoid runtime changes that effectively require OS/package upgrades on common LTS distributions without a fallback path

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗