diff --git a/crates/goose-cli/src/commands/update.rs b/crates/goose-cli/src/commands/update.rs index 158932f91719..4ee520323b04 100644 --- a/crates/goose-cli/src/commands/update.rs +++ b/crates/goose-cli/src/commands/update.rs @@ -26,6 +26,7 @@ pub fn update(canary: bool, reconfigure: bool) -> Result<()> { .arg(shell_str) .env("CANARY", canary.to_string()) .env("CONFIGURE", reconfigure.to_string()) + .env("GOOSE_TERMINAL", "1") .spawn()?; update.wait_with_output()?; diff --git a/crates/goose-mcp/src/computercontroller/mod.rs b/crates/goose-mcp/src/computercontroller/mod.rs index 934ca24d3891..19c172552134 100644 --- a/crates/goose-mcp/src/computercontroller/mod.rs +++ b/crates/goose-mcp/src/computercontroller/mod.rs @@ -749,6 +749,7 @@ impl ComputerControllerRouter { .arg("-NonInteractive") .arg("-File") .arg(&command) + .env("GOOSE_TERMINAL", "1") .output() .await .map_err(|e| { @@ -758,6 +759,7 @@ impl ComputerControllerRouter { _ => Command::new(shell) .arg(shell_arg) .arg(&command) + .env("GOOSE_TERMINAL", "1") .output() .await .map_err(|e| ToolError::ExecutionError(format!("Failed to run script: {}", e)))?, diff --git a/crates/goose-mcp/src/computercontroller/platform/windows.rs b/crates/goose-mcp/src/computercontroller/platform/windows.rs index d2c386f6a561..8ea17f461c38 100644 --- a/crates/goose-mcp/src/computercontroller/platform/windows.rs +++ b/crates/goose-mcp/src/computercontroller/platform/windows.rs @@ -11,6 +11,7 @@ impl SystemAutomation for WindowsAutomation { .arg("-NonInteractive") .arg("-Command") .arg(script) + .env("GOOSE_TERMINAL", "1") .output()?; Ok(String::from_utf8_lossy(&output.stdout).into_owned()) diff --git a/crates/goose-mcp/src/developer/mod.rs b/crates/goose-mcp/src/developer/mod.rs index 7bea5c5a045c..9efed3afa596 100644 --- a/crates/goose-mcp/src/developer/mod.rs +++ b/crates/goose-mcp/src/developer/mod.rs @@ -636,6 +636,7 @@ impl DeveloperRouter { .stderr(Stdio::piped()) .stdin(Stdio::null()) .kill_on_drop(true) + .env("GOOSE_TERMINAL", "1") .args(&shell_config.args) .arg(command) .spawn() diff --git a/crates/goose/src/agents/retry.rs b/crates/goose/src/agents/retry.rs index ac0e374da1fe..38bf020548a3 100644 --- a/crates/goose/src/agents/retry.rs +++ b/crates/goose/src/agents/retry.rs @@ -231,10 +231,12 @@ pub async fn execute_shell_command( let mut cmd = if cfg!(target_os = "windows") { let mut cmd = Command::new("cmd"); cmd.args(["/C", command]); + cmd.env("GOOSE_TERMINAL", "1"); cmd } else { let mut cmd = Command::new("sh"); cmd.args(["-c", command]); + cmd.env("GOOSE_TERMINAL", "1"); cmd };