Skip to content

cli: support --profile for codex sandbox#24110

Merged
bolinfest merged 1 commit into
mainfrom
pr24110
May 22, 2026
Merged

cli: support --profile for codex sandbox#24110
bolinfest merged 1 commit into
mainfrom
pr24110

Conversation

@bolinfest
Copy link
Copy Markdown
Collaborator

@bolinfest bolinfest commented May 22, 2026

Why

codex sandbox now always runs the host sandbox backend, so it should accept the same profile selection mechanism as the rest of the runtime CLI surface. Without --profile, sandbox debugging can exercise only the default config stack unless users manually translate profile config into ad hoc -c overrides.

Supporting --profile lets sandbox invocations load $CODEX_HOME/<name>.config.toml, including permission profile configuration, before resolving the sandbox policy for the command being run.

What Changed

  • Added --profile NAME / -p NAME to the host-specific codex sandbox argument structs as config_profile.
  • Allowed root-level codex --profile NAME sandbox ... and made a sandbox-local codex sandbox --profile NAME ... override the root selection.
  • Threaded LoaderOverrides through sandbox config loading so selected config profile files participate in permission resolution before the legacy read-only fallback.
  • Documented the new sandbox flag in codex-rs/README.md.

Verification

  • Added parser coverage for codex sandbox --profile.
  • Added sandbox config-loader coverage that verifies selected config profile loader overrides select the profile config rather than falling back to read-only.
  • Ran cargo test -p codex-cli.

@bolinfest bolinfest changed the title cli: support profiles for sandbox cli: support --profile for codex sandbox May 22, 2026
@bolinfest bolinfest force-pushed the pr24110 branch 2 times, most recently from a576f40 to f1ee82e Compare May 22, 2026 18:46
@bolinfest bolinfest merged commit 36a71a8 into main May 22, 2026
31 checks passed
@bolinfest bolinfest deleted the pr24110 branch May 22, 2026 20:00
@github-actions github-actions Bot locked and limited conversation to collaborators May 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants