fix(acp): enable sandbox network access for Codex MCP subprocesses#1363
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Codex's Seatbelt sandbox blocks all outbound network by default in
workspace-writemode. The existingnetwork_proxyflags (added in #1287) configure the managed HTTP proxy and domain allowlist, but traffic from MCP subprocesses (likebuzz-cli) never reaches the proxy because the OS-level sandbox gate is closed first.This adds
sandbox_workspace_write.network_access=trueas the first injected-cflag incodex_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.rs—codex_network_args()now returns 6 elements (3 flag pairs) instead of 4:-c sandbox_workspace_write.network_access=true— opens the Seatbelt sandbox network gate-c network_proxy.mode="full"— activates the managed proxy (unchanged)-c network_proxy.domains."<host>"="allow"— allowlists the relay hostname (unchanged)codex_network_args_includes_sandbox_network_accesstest verifying the sandbox flag is first and the vec has 6 elementsContext
Without this fix, Codex-based agents (Thufir/sprout-agent) get
network_errorwhenbuzz-cliattempts to reach the relay — the Seatbelt sandbox rejects the syscall before any userspace proxy can intercept it. Thenetwork_proxyconfig alone is insufficient; both layers must be enabled.