diff --git a/src/app/subagent/engine.rs b/src/app/subagent/engine.rs index 3aa2ac3..e8f64cd 100644 --- a/src/app/subagent/engine.rs +++ b/src/app/subagent/engine.rs @@ -416,6 +416,15 @@ pub fn run_subagent(ctx: &SubagentContext, tx: &mpsc::Sender) -> let content = response.content.clone().unwrap_or_default(); + // Emit thinking/reasoning text as StepCompleted so the parent's + // drain thread can show it as progress instead of just the tool name. + if !content.is_empty() { + let _ = tx.blocking_send(SubagentEvent::StepCompleted { + step, + output: content.clone(), + }); + } + if has_tool_calls { let tool_calls = response.tool_calls.clone().unwrap_or_default(); // Push the assistant message with tool_calls into the conversation diff --git a/src/app/workflow/engine.rs b/src/app/workflow/engine.rs index 7c303fa..7a91fe9 100644 --- a/src/app/workflow/engine.rs +++ b/src/app/workflow/engine.rs @@ -211,8 +211,29 @@ fn spawn_single_agent( ); } } - SubagentEvent::StepCompleted { .. } => { - tracing::trace!("[subagent] step completed"); + SubagentEvent::StepCompleted { output, .. } => { + // Show the agent's thinking/reasoning text as progress + // instead of just the tool name — first line, truncated. + if let Some(ref f) = drain_live { + let summary = output + .lines() + .next() + .unwrap_or(output) + .chars() + .take(80) + .collect::(); + f( + drain_agent_id.clone(), + drain_agent_name.clone(), + AgentStatus { + state: AgentState::Running, + started_at: Some(drain_started_at), + completed_at: None, + error: None, + progress: Some(summary), + }, + ); + } } SubagentEvent::StepFailed { step, error } => { tracing::warn!("[subagent] step {} failed: {}", step, error);