Repository navigation
Description
The coder-labs/codex module installs and validates the Codex CLI, but does not check or document its Linux sandbox prerequisites. A workspace can therefore have a working codex --version while still missing the recommended system bwrap executable.
Observed environment
- Module:
registry.coder.com/coder-labs/codex/coderv5.5.0 - OS: Ubuntu 24.04.5 LTS, amd64, EC2 workspace
- Installed CLI:
codex-cli 0.169.0 command -v bwrap: no output, exit status 1
Module configuration:
module "codex" {
source = "registry.coder.com/coder-labs/codex/coder"
version = "5.5.0"
agent_id = coder_agent.main.id
manage_config = false
}The workspace bootstrap does not install bubblewrap. Codex reports:
Codex could not find bubblewrap on PATH. Install bubblewrap with your OS package manager. See the sandbox prerequisites: https://developers.openai.com/codex/concepts/sandboxing#prerequisites. Codex will use the bundled bubblewrap in the meantime.
The missing executable was checked in the current shell, so the observation is not based solely on a potentially stale daemon warning.
Why this matters
OpenAI's sandbox prerequisites recommend installing the distribution's bubblewrap package. Codex uses the first bwrap on PATH; its bundled fallback depends on support for unprivileged user namespace creation. The documentation also describes an additional AppArmor profile setup that may be needed on Ubuntu 24.04.
The module's install script delegates installation to OpenAI's installer and validates codex --version, but has no sandbox prerequisite check. The README does not cover bubblewrap or the Ubuntu AppArmor prerequisite.
Suggested improvement
- Document the Linux prerequisites and link to OpenAI's OS-specific instructions, including the Ubuntu 24.04 AppArmor caveat.
- Add a non-fatal Linux preflight warning when
bwrapis missing, explaining that the workspace image/template should provide it and that the bundled fallback has additional requirements. - Consider opt-in dependency installation if it fits the module's scope. Automatic privileged package installation or host security changes should not be assumed.
A missing bwrap should not automatically fail installation: Codex has a bundled fallback, and the module supports different environments. Template owners can install the OS dependencies themselves; documenting and detecting the prerequisite would make that responsibility clear.
Separate runtime observation
During read-only sandboxed commands in this environment, the sandbox also returned:
bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted
We have not established the cause of that runtime error or verified that installing the distribution package resolves it. This issue's primary request is prerequisite documentation and detection.
Activity
linear-code commentedon Nov 14, 2026
REG-140
fix(codex): warn about missing Linux sandbox prerequisites (coder#1258)