diff --git a/crates/goose-cli/src/session/mod.rs b/crates/goose-cli/src/session/mod.rs index 0622550092..5a3bfc05d5 100644 --- a/crates/goose-cli/src/session/mod.rs +++ b/crates/goose-cli/src/session/mod.rs @@ -507,9 +507,10 @@ impl CliSession { async fn run_interactive(&mut self, prompt: Option) -> Result<()> { // Advertise mid-run steering in the thinking spinner when the steer - // reader will be active (interactive tty session). + // reader will be active (interactive tty session on a platform that + // supports mid-run stdin reading). output::set_steer_hint_enabled( - std::io::stdin().is_terminal() && std::io::stdout().is_terminal(), + cfg!(unix) && std::io::stdin().is_terminal() && std::io::stdout().is_terminal(), ); if let Some(prompt) = prompt { let msg = Message::user().with_text(&prompt); @@ -1210,7 +1211,9 @@ impl CliSession { && std::io::stdin().is_terminal() && std::io::stdout().is_terminal(); let (steer_control, mut steer_rx) = steer::spawn_steer_reader(steer_enabled); - if steer_enabled { + // Only advertise steering when a reader actually started (it does + // not on non-unix platforms even when `steer_enabled` is true). + if steer_control.is_active() { output::render_steer_hint(); } diff --git a/crates/goose-cli/src/session/steer.rs b/crates/goose-cli/src/session/steer.rs index 929a4857f1..ba94a2922a 100644 --- a/crates/goose-cli/src/session/steer.rs +++ b/crates/goose-cli/src/session/steer.rs @@ -67,6 +67,15 @@ pub fn spawn_steer_reader(enabled: bool) -> (SteerControl, mpsc::UnboundedReceiv ) } +impl SteerControl { + /// Whether a reader thread is actually running. False when steering was + /// disabled or the platform does not support mid-run stdin reading + /// (non-unix), in which case no steering UI should be shown. + pub fn is_active(&self) -> bool { + self.handle.is_some() + } +} + pub struct SteerControl { stop: Arc, paused: Arc,