refactor: inline sandbox type lookup in process_exec_tool_call (#7122)

`process_exec_tool_call()` was taking `SandboxType` as a param, but in
practice, the only place it was constructed was in
`codex_message_processor.rs` where it was derived from the other
`sandbox_policy` param, so this PR inlines the logic that decides the
`SandboxType` into `process_exec_tool_call()`.



---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/7122).
* #7112
* __->__ #7122
This commit is contained in:
Michael Bolin
2025-11-21 14:53:05 -08:00
committed by GitHub
parent 7561a6aaf0
commit 67975ed33a
5 changed files with 8 additions and 18 deletions

View File

@@ -8,9 +8,7 @@ use std::time::Duration;
use anyhow::Context as _;
use path_absolutize::Absolutize as _;
use codex_core::exec::SandboxType;
use codex_core::exec::process_exec_tool_call;
use codex_core::get_platform_sandbox;
use codex_core::protocol::SandboxPolicy;
use tokio::process::Command;
use tokio_util::sync::CancellationToken;
@@ -96,7 +94,6 @@ impl EscalateServer {
justification: None,
arg0: None,
},
get_platform_sandbox().unwrap_or(SandboxType::None),
&sandbox_policy,
&sandbox_cwd,
&None,