mirror of
https://github.com/openai/codex.git
synced 2026-11-07 20:30:33 +00:00
Use turn environment settings for sandbox execution (#40771)
## Why Tool execution can use an environment whose sandbox configuration differs from the turn-wide configuration. Sandbox selection and process setup need to follow the environment that owns the tool request. ## What changed - Source Windows sandbox level, legacy Landlock mode, and Windows private desktop settings from the selected turn environment across tool orchestration, unified exec, patch application, and zsh fork escalation. - Preserve Windows sandbox level overrides in restorable thread settings and invalidate MCP configuration when that level changes. ## Testing - Add a resume test that verifies an elevated Windows sandbox override survives thread restoration. GitOrigin-RevId: 9d8fc46404919f5ae97c9ed712c0932a1f095e36
This commit is contained in:
@@ -1269,7 +1269,7 @@ impl UnifiedExecProcessManager {
|
||||
approval_policy: turn.approval_policy(),
|
||||
permission_profile: request.turn_environment.permission_profile().clone(),
|
||||
environment_policy: request.turn_environment.config().exec_policy.as_ref(),
|
||||
windows_sandbox_level: turn.windows_sandbox_level,
|
||||
windows_sandbox_level: request.turn_environment.config().windows_sandbox_level,
|
||||
sandbox_permissions: if request.additional_permissions_preapproved {
|
||||
crate::sandboxing::SandboxPermissions::UseDefault
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user