From 75b14de84c85ea00770e256cd0b4536544c3a342 Mon Sep 17 00:00:00 2001 From: viyatb-oai Date: Thu, 28 May 2026 14:52:03 -0700 Subject: [PATCH] fix: preserve shell sandbox denial heuristic Co-authored-by: Codex noreply@openai.com --- codex-rs/core/src/tools/runtimes/shell/unix_escalation.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/codex-rs/core/src/tools/runtimes/shell/unix_escalation.rs b/codex-rs/core/src/tools/runtimes/shell/unix_escalation.rs index 12bc229a49..657a249c70 100644 --- a/codex-rs/core/src/tools/runtimes/shell/unix_escalation.rs +++ b/codex-rs/core/src/tools/runtimes/shell/unix_escalation.rs @@ -2,6 +2,7 @@ use super::ShellRequest; use crate::exec::ExecCapturePolicy; use crate::exec::ExecExpiration; use crate::exec::cancel_when_either; +use crate::exec::is_likely_sandbox_denied; use crate::guardian::GuardianApprovalRequest; use crate::guardian::guardian_rejection_message; use crate::guardian::guardian_timeout_message; @@ -1113,7 +1114,8 @@ fn map_exec_result( }))); } - if record_filesystem_sandbox_violation(sandbox, &output).is_some() { + if is_likely_sandbox_denied(sandbox, &output) { + record_filesystem_sandbox_violation(sandbox, &output); return Err(ToolError::Codex(CodexErr::Sandbox(SandboxErr::Denied { output: Box::new(output), network_policy_decision: None,