Skip to content

Conversation

@apanasenko-oai
Copy link
Collaborator

Motivation

  • Allow codex exec to be used in environments that already enforce an external sandbox while still communicating network restrictions to the agent.
  • Reduce failed attempts/retries caused by the agent assuming network access when it is actually blocked by the surrounding sandbox.

Description

  • Extend codex exec --sandbox to accept external-sandbox and add --network-access restricted|enabled to declare outbound network availability.
  • When external-sandbox is selected, override the effective config to use SandboxPolicy::ExternalSandbox { network_access } without adding config-wide support.
  • Add validation for incompatible flag combinations and integration tests covering all --sandbox options plus the key error cases.

Testing

  • cargo test -p codex-exec (pass)

@apanasenko-oai apanasenko-oai force-pushed the anton_panasenko_codex_exec_external_sandbox branch from 6b7cd39 to 54b882d Compare January 5, 2026 19:22
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.

2 participants