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.
This commit is contained in:
nchendri authored and GitHub committed 2026-10-23 12:15:49 +00:00
1 parent b36b283021
commit 1e1f5d7628
1 file changed
+1 -1
+1 -1
View File
@@ -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