feat: ship bubblewrap in the base image for the Codex CLI sandbox#119
Conversation
The OpenAI Codex CLI's Linux sandbox uses the first bwrap executable on PATH and warns at startup when only its bundled fallback helper is available. Install the Ubuntu bubblewrap package image-tier so the system bwrap is always present, matching upstream's recommended setup. Adds bwrap to the always-present core command inventory in the e2e suite and documents the tool in the README and changelog. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GiQdQXNUM2Wca7VcWrByhS
|
@claude should it only be bundled if codex has been selected? |
|
I considered that, and I'd recommend keeping it unconditional in the image. The problem with tying it to the Codex Selection is Box replacement: Codex itself lives in the Managed home (mise Node + npm global), so it survives replacement, and Making it reconcile correctly would mean adding a bwrap presence check that runs outside the assistant skip logic, plus a runtime apt/network dependency at setup time for the sandbox to work. Against that, the unconditional cost is ~1 MB in the image and the package is inert when Codex isn't selected. It also matches how other cross-cutting runtime deps ( Happy to rework it Box-tier with the reconcile handling if you'd rather keep the image minimal — just say the word. Generated by Claude Code |
Why
The OpenAI Codex CLI's Linux sandbox uses the first
bwrapexecutable it finds onPATH. When none exists it warns at startup (⚠ Codex could not find system bubblewrap at /usr/bin/bwrap) and falls back to a bundled helper that still depends on unprivileged user-namespace support. Upstream's recommended setup is to install the distribution'sbubblewrappackage (Codex sandboxing docs, openai/codex#14963).What
bubblewrapto the base APT package layer, with a comment recording the Codex rationale.bwrapto the always-present core command inventory so the Candidate suite gates on it.Placement rationale
Image tier rather than Box tier: assistants install into the Managed home (mise-managed Node, npm globals), so after Box replacement
--reconcile-boxskipsinstall_codexwhen thecodexbinary survives — a Box-tierapt_install bubblewraphung off that path would silently go missing on every Box replacement. Shipping it in the image keepsbwrappresent unconditionally with no reconcile logic, at ~1 MB of image cost, and it benefits any Codex selection made at any time.Validation
tests/test-*.shsuites pass.e2e-test.sh smoke(which now assertsbwrappresence viatools.core.bwrap) run in CI.🤖 Generated with Claude Code
https://claude.ai/code/session_01GiQdQXNUM2Wca7VcWrByhS
Generated by Claude Code