Skip to content

feat(cli): show running spinner in subagent footer#10310

Merged
catrielmuller merged 2 commits into
Kilo-Org:mainfrom
IamCoder18:feat/subagent-running-status
Jun 2, 2026
Merged

feat(cli): show running spinner in subagent footer#10310
catrielmuller merged 2 commits into
Kilo-Org:mainfrom
IamCoder18:feat/subagent-running-status

Conversation

@IamCoder18

@IamCoder18 IamCoder18 commented May 16, 2026

Copy link
Copy Markdown
Contributor

Context

Subagent sessions in the TUI have no visual indicator showing whether the subagent is currently running or idle. The main session displays an animated spinner in the prompt component when the agent is working, but the subagent footer only shows the label, sibling count, usage stats, and navigation buttons, making it impossible to tell at a glance if a subagent is still processing or has finished.

Closes #10309

Implementation

Added a running status indicator to the SubagentFooter component (packages/opencode/src/cli/cmd/tui/routes/session/subagent-footer.tsx):

  • isRunning memo: Checks session_status store (real-time SSE events) for "busy" state, with a fallback to checking if the last assistant message lacks time.completed.
  • agentColor memo: Derives the spinner color from the last assistant message's agent field via local.agent.color().
  • Spinner rendering: Inserts <Spinner color={agentColor()} /> between the subagent label/count and usage stats when running.

No "esc interrupt" text is included since subagent sessions don't have an input prompt to interrupt, the spinner alone communicates "working" status.

Screenshots

Before

before.mp4

After

after.mp4

How to Test

  1. Start a Kilo CLI session in the TUI (kilo)
  2. Send a prompt that spawns a subagent via the task tool (e.g., "explore the codebase and find all API endpoints")
  3. Navigate into the child subagent session
  4. Observe the subagent footer at the bottom. A colored spinner should appear next to the subagent label while the agent is working
  5. Wait for the subagent to complete. The spinner should disappear
  6. Navigate between sibling subagent sessions. Each should independently show/hide its spinner based on its own running status

Get in Touch

Discord: @IamCoder18

@kilo-code-bot

kilo-code-bot Bot commented May 16, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • packages/opencode/src/cli/cmd/tui/routes/session/subagent-footer.tsx — no issues
  • .changeset/subagent-footer-spinner.md — correct package, bump level, and description

Notes:

  • The lastAssistant shared memo correctly prevents duplicate messages() traversal; both isRunning and agentColor derive from it.
  • kilocode_change markers are correctly placed on all Kilo-specific lines in the shared upstream file.
  • No memory leaks: all createMemo calls are component-owned and disposed automatically by SolidJS on unmount.
  • Logic is correct: isRunning handles busy status and the !last.time.completed fallback for retry states.
  • The new changeset file correctly targets @kilocode/cli with a minor bump and a concise user-facing description.

Reviewed by claude-sonnet-4.6 · 123,219 tokens

Comment thread packages/opencode/src/cli/cmd/tui/routes/session/subagent-footer.tsx Outdated
Add an animated spinner to the subagent session footer to indicate
when a subagent is actively working, matching the running status
indicator shown in the main session prompt.
@IamCoder18 IamCoder18 force-pushed the feat/subagent-running-status branch from 2274316 to 8ba95b1 Compare May 16, 2026 03:38
@johnnyeric johnnyeric requested a review from catrielmuller May 21, 2026 12:04
@catrielmuller catrielmuller merged commit bca27d6 into Kilo-Org:main Jun 2, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Subagent sessions show no running/working indicator in TUI footer

2 participants