openai / openai/codex

`codex exec` option to skip the inner sandbox for already-isolated runtimes (external-sandbox / BYO-seccomp)

Open
#38,779 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

CLI enhancement exec sandbox
Dominant language
Rust
Stars
125k
Forks
19.5k
PR merge metrics
PR metrics pending

Description

What variant of Codex are you using?

CLI

What feature would you like to see?

Please expose an "external sandbox / no inner sandbox" option on codex exec (a flag or sandbox_mode = "external") for environments that are already isolated (Lambda, gVisor, hardened containers). Same environment as #4725 (closed with a fork/EC2 workaround). apply_patch works; only child-process spawning is blocked.

Additional information

codex exec --dangerously-bypass-approvals-and-sandbox (sandbox=danger-full-access) still fails to spawn shell processes inside AWS Lambda with Operation not permitted (EPERM): Codex installs a LinuxSeccomp jail on every shell child (danger-full-access → PermissionProfile::Disabledunrestricted()should_require_platform_sandbox = true → SandboxType::LinuxSeccomp), and Lambda's own seccomp profile denies the nested install. The only profile yielding SandboxType::None is ExternalSandbox, which the exec CLI/config can't select (SandboxMode = read-only|workspace-write|danger-full-access).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the exec CLI/config handling for SandboxMode and trace how PermissionProfile selects SandboxType for shell children. Verify the new external-sandbox option produces SandboxType::None and allows child-process spawning in an already-isolated runtime such as AWS Lambda without installing a nested LinuxSeccomp jail.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.