diff --git a/crates/tui/src/tui/sidebar.rs b/crates/tui/src/tui/sidebar.rs index bff5c51a0..821ed8b6c 100644 --- a/crates/tui/src/tui/sidebar.rs +++ b/crates/tui/src/tui/sidebar.rs @@ -1595,6 +1595,7 @@ pub fn subagent_panel_lines( if lines.len() >= max_rows { break; } + let is_completed = !matches!(row.status.as_str(), "running"); let (marker, color) = agent_status_marker(row.status.as_str()); let label = format!("{marker} {} {}", row.role, row.name); lines.push(Line::from(Span::styled( @@ -1602,6 +1603,10 @@ pub fn subagent_panel_lines( Style::default().fg(color), ))); + if is_completed { + continue; + } + if lines.len() >= max_rows { break; }