From 69ad58413788722f9d1ffd82590ec830df236f0e Mon Sep 17 00:00:00 2001 From: Alex Clarke Date: Wed, 18 Feb 2026 09:59:24 -0700 Subject: [PATCH] fix: When parallel agents run, only write to stdout from the parent and only display the parent's throbber --- src/client/common.rs | 4 +++- src/function/mod.rs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/client/common.rs b/src/client/common.rs index ad93f1e..dcc07d2 100644 --- a/src/client/common.rs +++ b/src/client/common.rs @@ -411,9 +411,11 @@ pub async fn call_chat_completions( client: &dyn Client, abort_signal: AbortSignal, ) -> Result<(String, Vec)> { + let is_child_agent = client.global_config().read().current_depth > 0; + let spinner_message = if is_child_agent { "" } else { "Generating" }; let ret = abortable_run_with_spinner( client.chat_completions(input.clone()), - "Generating", + spinner_message, abort_signal, ) .await; diff --git a/src/function/mod.rs b/src/function/mod.rs index 031430b..128ecf9 100644 --- a/src/function/mod.rs +++ b/src/function/mod.rs @@ -861,7 +861,7 @@ impl ToolCall { let prompt = format!("Call {cmd_name} {}", cmd_args.join(" ")); - if *IS_STDOUT_TERMINAL { + if *IS_STDOUT_TERMINAL && config.read().current_depth == 0 { println!("{}", dimmed_text(&prompt)); }