Skip to content

Conversation

bolinfest
Copy link
Collaborator

@bolinfest bolinfest commented Sep 18, 2025

Previous to this PR, both of these functions take a single cwd:

pub async fn spawn_command_under_seatbelt(
command: Vec<String>,
sandbox_policy: &SandboxPolicy,
cwd: PathBuf,
stdio_policy: StdioPolicy,
mut env: HashMap<String, String>,
) -> std::io::Result<Child> {

pub async fn spawn_command_under_linux_sandbox<P>(
codex_linux_sandbox_exe: P,
command: Vec<String>,
sandbox_policy: &SandboxPolicy,
cwd: PathBuf,
stdio_policy: StdioPolicy,
env: HashMap<String, String>,
) -> std::io::Result<Child>

whereas cwd and sandbox_cwd should be set independently (fixed in this PR).

Added sandbox_distinguishes_command_and_policy_cwds() to codex-rs/exec/tests/suite/sandbox.rs to verify this.

@bolinfest bolinfest force-pushed the pr3873 branch 3 times, most recently from d2ccee3 to 2d43208 Compare September 18, 2025 20:48
Copy link
Collaborator

@fouad-openai fouad-openai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would recommend sandbox_cwdworkspace_root but non-blocking

@bolinfest bolinfest merged commit 8595237 into main Sep 18, 2025
38 checks passed
@bolinfest bolinfest deleted the pr3873 branch September 18, 2025 21:37
@github-actions github-actions bot locked and limited conversation to collaborators Sep 18, 2025
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