From 1e1f5d7628ffe1c99fb169fc03489e52007d15d4 Mon Sep 17 00:00:00 2001 From: nchendri Date: Fri, 23 Oct 2026 12:15:49 +0000 Subject: [PATCH] Run sandboxed Linux terminals non-interactively (#64439) Fixes #62449 and #64486 ## Summary - Run Linux sandboxed agent terminal commands with a non-interactive shell. - Preserve existing interactive shell behavior for unsandboxed and non-Linux terminal commands. ## Validation - cargo fmt --all -- --check - cargo check -p acp_thread - git diff --check Release Notes: - Fixed Linux agent sandbox terminal commands incorrectly reporting failure under dash. --- crates/acp_thread/src/acp_thread.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/acp_thread/src/acp_thread.rs b/crates/acp_thread/src/acp_thread.rs index be05e4ef011..69c1d590a30 100644 --- a/crates/acp_thread/src/acp_thread.rs +++ b/crates/acp_thread/src/acp_thread.rs @@ -7843,7 +7843,7 @@ impl AcpThread { #[cfg(not(target_os = "windows"))] let (task_command, task_args, task_env, sandbox, spawn_cwd) = { let mut builder = ShellBuilder::new(&Shell::Program(shell), is_windows); - if headless { + if headless || (cfg!(target_os = "linux") && sandbox_wrap.is_some()) { builder = builder.non_interactive(); } let (task_command, task_args) = builder