collaborating-with-codex
MANDATORY: ALWAYS run codex_bridge.py in the background. When invoking
codex_bridge.pyvia the Bash tool, you MUST setrun_in_background: true. Codex calls typically block for 60-120 seconds. Running them in the foreground freezes the entire conversation. Never omit this flag. No exceptions.Sandbox policy:
--sandbox read-onlyis rejected at the argparse layer. When--sandbox workspace-writeis requested, the bridge first probes bubblewrap by callingbwrap --unshare-user --unshare-net --unshare-pid --ro-bind / / true(result cached for 5 minutes at/tmp/codex_bridge_bwrap_probe.<uid>). If the probe fails — typicallybwrap: loopback: Failed RTM_NEWADDR: Operation not permittedon Ubuntu 24.04+ with restricted unprivileged user namespaces, or in containers withoutCAP_NET_ADMIN— the bridge auto-downgrades todanger-full-accessand writes a warning to stderr with the fix command (sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0). SetCODEX_BRIDGE_SKIP_BWRAP_PROBE=1to bypass the probe when you know the host is fine. The defaultdanger-full-accessmode never runs the probe.
Workflow
Every delegation follows the same four steps. The recipe blocks below are variations on this spine.