codex: address PR review feedback (#22200)

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
starr-openai
2026-05-12 16:05:00 -07:00
parent e0554f5167
commit 78cdba69c2

View File

@@ -280,7 +280,11 @@ impl<'a> ToolRuntime<UnifiedExecRequest, UnifiedExecProcess> for UnifiedExecRunt
if let UnifiedExecShellMode::ZshFork(zsh_fork_config) = &self.shell_mode {
let command =
build_sandbox_command(&command, &req.cwd, &env, req.additional_permissions.clone())
.map_err(|_| ToolError::Codex(CodexErr::InvalidRequest("missing command line for PTY".into())))?;
.map_err(|_| {
ToolError::Codex(CodexErr::InvalidRequest(
"missing command line for PTY".into(),
))
})?;
let options = unified_exec_options(attempt.network_denial_cancellation_token.clone());
let mut exec_env = attempt
.env_for(command, options, managed_network)
@@ -331,7 +335,11 @@ impl<'a> ToolRuntime<UnifiedExecRequest, UnifiedExecProcess> for UnifiedExecRunt
}
let command =
build_sandbox_command(&command, &req.cwd, &env, req.additional_permissions.clone())
.map_err(|_| ToolError::Codex(CodexErr::InvalidRequest("missing command line for PTY".into())))?;
.map_err(|_| {
ToolError::Codex(CodexErr::InvalidRequest(
"missing command line for PTY".into(),
))
})?;
let options = unified_exec_options(attempt.network_denial_cancellation_token.clone());
let mut exec_env = attempt
.env_for(command, options, managed_network)