Codex and Claude Code command allowlists leave separate tool servers outside their scope
A six-document comparison separates network access from destination enforcement. Strict domain controls exist, but their reach depends on settings, client versions and where code runs—not just which hosts appear on a list.
Codex and Claude Code command allowlists leave separate tool servers outside their scope
Listen to this story
The audio brief
About 1:30
0:001:30
Story brief
3 key points
A documentation comparison finds that OpenAI Codex and Anthropic Claude Code do not apply their command-network boundaries to separately launched MCP servers; approving a server does not limit its downstream destinations. The shell controls also require specific configurations: Codex needs network access and proxy enforcement, while Claude Code needs sandboxing and strict allowlist mode for an across-modes destination ceiling. Administrators must separately restrict managed domains and prevent execution from escaping the sandbox. The review used six primary documents and declared a November 18, 2026 cutoff, but does not establish their exact contents on that date or report security tests.
01
Codex networking is off by default; enabling network access without its proxy allows unrestricted direct outbound connections.
02
Claude Code’s strict allowlist requires version 2.1.219 or later; sandbox startup failures can otherwise leave commands unsandboxed unless administrators enforce availability.
03
Codex excludes MCP connections from its command proxy, and Claude Code places local MCP servers outside its shell sandbox.
Restricting where an AI coding agent’s commands can connect does not restrict everything the agent starts. Superpower Daily’s comparison of Codex and Claude Code documentation finds that their command-network allowlists leave separately launched MCP servers outside the boundary. Even for shell commands, listing approved destinations is not always enough to enforce them.
The review covers local macOS and Linux sessions and six primary documents: OpenAI’s security, managed-configuration and configuration-reference pages, plus Anthropic’s sandboxing, settings-precedence and settings-reference pages. We compared network access, destination restrictions, subprocess coverage, administrator controls and exceptions. The declared investigation cutoff was November 18, 2026, at 21:31 UTC; this synthesis uses the supplied documents, without claiming they establish each page’s exact historical contents at that cutoff. No commands or security experiments were run. The result is a configuration comparison, not a security ranking.
Codex separates permission to connect from destination enforcement
Codex’s security guide describes two controls with different jobs. The sandbox limits what a command can technically do; the approval policy decides when Codex must ask before acting. Local command networking is off by default. For workspace-write sessions, sandbox_workspace_write.network_access grants networking, while features.network_proxy.enabled activates destination enforcement. OpenAI documents three combinations:
Network off, proxy on: commands remain offline. Turning on the proxy does not itself grant access.
Network on, proxy off: commands have unrestricted direct outbound access. Domain entries alone do not constrain destinations.
Network on, proxy on: configured destination rules constrain sandboxed scripts, programs and their child processes.
Permission profiles preserve the same distinction: network.enabled grants command networking, while the proxy feature enforces domain rules. Administrator-managed requirements offer another route. In requirements.toml, [experimental_network] enabled=true starts managed proxying independently of the user feature toggle, but the sandbox must still permit networking.
To make destinations administrator-exclusive, OpenAI documents managed_allowed_domains_only=true alongside administrator-owned allow entries. That prevents user rules and domain approvals from expanding the list. Its managed-configuration guide also warns about migration: Codex 0.166.0 accepts the canonical [network_proxy] table, but OpenAI recommends retaining the older name until all clients and validators support it.
An active Codex proxy allows no external destinations until allow rules exist; a deny beats an allow. Local and private destinations are blocked by default, with explicit exceptions available. OpenAI calls its DNS classification best-effort and recommends lower-layer outbound network controls when hostile DNS is a concern.
Claude Code provides strict and administrator-only domain controls
Claude Code’s sandboxing guide starts from a different configuration: the shell sandbox itself is off by default. With sandbox.enabled=true, it covers shell commands and their descendants. Connections pass through a local proxy that checks hosts against allowed domains, whose initial list is empty.
An allowedDomains list alone is not a fixed ceiling. Manual permission modes can approve additional hosts, and bypassPermissions permits unlisted hosts. With the built-in proxy, sandbox.network.strictAllowlist=true blocks unlisted hosts across modes. It requires version 2.1.219 or later and belongs in user, managed or --settings configuration. WebFetch domain allow rules also contribute; deniedDomains takes precedence.
Administrator exclusivity is a separate setting. Managed sandbox.network.allowManagedDomainsOnly=true accepts only managed allowedDomains and managed WebFetch domain allow rules, automatically blocking other hosts. Ordinary settings arrays otherwise merge across scopes. Giving managed settings higher priority does not, by itself, make an allowed-domain list exclusive.
Approvals and exclusions can move execution outside the boundary
Codex distinguishes a narrow network grant from full sandbox escalation. Where policy permits full escalation and it is approved, execution can bypass the command proxy. Administrators therefore need to constrain sandbox choices and approvals alongside destinations. The configuration reference includes sandbox-mode restrictions and approval_policy.granular.sandbox_approval=false for rejecting escalation prompts.
Claude Code’s sandbox availability also needs enforcement. macOS uses Seatbelt; Linux requires bubblewrap and socat. If startup dependency checks fail, Claude Code normally runs commands unsandboxed. Managed sandbox.enabled=true and failIfUnavailable=true require sandbox availability; allowUnsandboxedCommands=false prevents model retries outside it. Excluded commands remain unsandboxed, however, and developers can still add user-level exclusions. Repository-widening protections require version 2.1.285 or later.
Approving a tool server does not restrict its destinations
MCP servers provide connections to tools and data. Separately launched servers do not become covered merely because the agent’s shell commands have a domain allowlist. Codex excludes MCP server connections from its command proxy; Claude Code places local MCP servers outside its shell sandbox.
Server eligibility is a different control. Codex supports approved MCP identities through managed mcp_servers; an empty table disables all servers. Those rules select which servers may run, not which downstream destinations they may contact.
Claude Code sandbox.enabled=true covers shell commands and descendants, not separately launched local MCP servers. macOS uses Seatbelt; Linux requires bubblewrap and socat. Managed enabled=true, failIfUnavailable=true and allowUnsandboxedCommands=false require availability and prevent model retries outside the sandbox. Excluded commands remain outside; developers can still add user-level exclusions. Repository-widening protections require v2.1.285 or later.
Claude Code allowedDomains alone is not a fixed ceiling: manual modes can approve new hosts; bypassPermissions permits unlisted hosts. With the built-in proxy, sandbox.network.strictAllowlist=true blocks unlisted hosts across modes; it requires v2.1.219+, belongs in user, managed or --settings configuration, and includes WebFetch domain allow rules. deniedDomains takes precedence.
Reader comments
Newest comments first. Replies stay oldest first.