Skip to content

Sandboxed tool calls fail on Ubuntu 20.04 with bubblewrap 0.4.0 ('bwrap: Unknown option --argv0') #15283

@YSAA1

Description

@YSAA1

What version of Codex is running?

codex-cli 0.116.0

What subscription do you have?

Pro

Which model were you using?

Observed in the Codex CLI agent environment. The failure appears to happen before model-specific behavior matters.

What platform is your computer?

Ubuntu 20.04.6 LTS (focal), amd64

What issue are you seeing?

Description

On Ubuntu 20.04.6 with the system bubblewrap package (0.4.0-1ubuntu4.1), sandboxed tool calls fail immediately with:

bwrap: Unknown option --argv0

In the same environment, commands that bypass the normal sandbox path can still run, which suggests this is specifically a sandbox wrapper compatibility problem.

Reproduction

  1. Use Ubuntu 20.04.6 LTS with /usr/bin/bwrap provided by the distro package bubblewrap 0.4.0-1ubuntu4.1
  2. Run Codex CLI (codex-cli 0.116.0)
  3. Trigger a normal sandboxed tool call
  4. Observe immediate failure with bwrap: Unknown option --argv0

Expected behavior

Codex should either:

  • gracefully support older bubblewrap versions,
  • detect that the installed bwrap does not support --argv0 and show a clearer compatibility error,
  • or provide a documented fallback path before attempting sandbox launch.

Additional evidence

  • bwrap --version reports bubblewrap 0.4.0
  • bwrap --help does not list --argv0
  • /usr/bin/bwrap is owned by the Ubuntu package bubblewrap
  • apt-cache policy bubblewrap on this machine shows:
Installed: 0.4.0-1ubuntu4.1
Candidate: 0.4.0-1ubuntu4.1
500 http://mirrors.aliyun.com/ubuntu focal-updates/main amd64 Packages
500 http://mirrors.aliyun.com/ubuntu focal-security/main amd64 Packages

This means a normal apt upgrade on Ubuntu 20.04 will not reach a version that supports --argv0.

Likely root cause

Codex appears to assume bubblewrap supports --argv0, but Ubuntu 20.04 ships an older version that does not. This seems like a Codex / local sandbox compatibility gap rather than a repo-specific problem.

Possibly related official issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsandboxIssues related to permissions or sandboxingtool-callsIssues related to tool calling

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions