Skip to content

fix(acp): enable sandbox network access for Codex MCP subprocesses#1363

Merged
wpfleger96 merged 1 commit into
mainfrom
duncan/codex-sandbox-network-access
Jun 29, 2026
Merged

fix(acp): enable sandbox network access for Codex MCP subprocesses#1363
wpfleger96 merged 1 commit into
mainfrom
duncan/codex-sandbox-network-access

Conversation

@wpfleger96

Copy link
Copy Markdown
Member

Codex's Seatbelt sandbox blocks all outbound network by default in workspace-write mode. The existing network_proxy flags (added in #1287) configure the managed HTTP proxy and domain allowlist, but traffic from MCP subprocesses (like buzz-cli) never reaches the proxy because the OS-level sandbox gate is closed first.

This adds sandbox_workspace_write.network_access=true as the first injected -c flag in codex_network_args(), opening the Seatbelt gate so outbound TCP/TLS connections are allowed at the OS level. The managed proxy then enforces the domain allowlist as intended.

Changes

  • crates/buzz-acp/src/config.rscodex_network_args() now returns 6 elements (3 flag pairs) instead of 4:
    1. -c sandbox_workspace_write.network_access=true — opens the Seatbelt sandbox network gate
    2. -c network_proxy.mode="full" — activates the managed proxy (unchanged)
    3. -c network_proxy.domains."<host>"="allow" — allowlists the relay hostname (unchanged)
  • Updated doc comment to describe the layered defense model
  • Updated all existing test assertions to expect the new flag
  • Added codex_network_args_includes_sandbox_network_access test verifying the sandbox flag is first and the vec has 6 elements

Context

Without this fix, Codex-based agents (Thufir/sprout-agent) get network_error when buzz-cli attempts to reach the relay — the Seatbelt sandbox rejects the syscall before any userspace proxy can intercept it. The network_proxy config alone is insufficient; both layers must be enabled.

The Seatbelt sandbox blocks all outbound network by default in
workspace-write mode. The existing network_proxy flags configure the
managed proxy but traffic never reaches it because the OS-level gate
is closed. Add sandbox_workspace_write.network_access=true as the
first injected flag to open the Seatbelt gate so the proxy can then
enforce the domain allowlist.

Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
@wpfleger96 wpfleger96 merged commit 401bb51 into main Jun 29, 2026
29 checks passed
@wpfleger96 wpfleger96 deleted the duncan/codex-sandbox-network-access branch June 29, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant