Skip to content

fix(tui): show progress indicators while subagent is initializing#8807

Open
Githubguy132010 wants to merge 3 commits intoKilo-Org:mainfrom
Githubguy132010:fix/subagent-initializing-indicator
Open

fix(tui): show progress indicators while subagent is initializing#8807
Githubguy132010 wants to merge 3 commits intoKilo-Org:mainfrom
Githubguy132010:fix/subagent-initializing-indicator

Conversation

@Githubguy132010
Copy link
Copy Markdown
Contributor

Context

Fixes #8422. Subagents can take over a minute to show any activity during startup, making the UI look frozen. There were two places where users got no feedback:

  1. Parent session view — the Task tool entry showed a spinner + task description, but nothing else while the LLM was generating its first response (before any tool calls arrived).
  2. Subagent session view — if a user clicked the task link to navigate into the subagent session, they saw a completely blank message area because no messages existed yet.

Implementation

Two minimal additions to packages/opencode/src/cli/cmd/tui/routes/session/index.tsx:

Task component content memo — added an else branch for the empty-tools running state. When isRunning() is true but tools().length === 0, the display now includes ↳ Starting... instead of nothing:

│ ⠋ General Task — Fix the bug
      ↳ Starting...

Once the first tool call arrives this transitions naturally to the existing ↳ Tool title display.

Subagent session view — added a <Show when={session()?.parentID && messages().length === 0}> block that renders ↳ Initializing... before the message list. This replaces the blank screen a user would see when navigating to a freshly-created subagent session. It disappears automatically as soon as the first message arrives (reactive update via messages()).

No backend changes needed — the gap is inherent to LLM response time. The web UI already shows a TextShimmer animation on the task title, which provides sufficient feedback there.

Screenshots

before after
Task entry shows only title + spinner; subagent session is blank Task entry shows ↳ Starting...; subagent session shows ↳ Initializing...

How to Test

  1. Start a Kilo Code TUI session.
  2. Send a prompt that triggers a subagent (e.g. @general-purpose summarize this repo).
  3. Parent session: observe the Task entry — it should immediately show ↳ Starting... once the task is running, before any tool calls appear.
  4. Click the task link to navigate to the subagent session — you should see ↳ Initializing... instead of a blank screen.
  5. Once the subagent begins making tool calls, both indicators transition to normal progress display.

Get in Touch

Show '↳ Starting...' in the parent session's Task entry when the
subagent is running but has not yet made any tool calls, and show
'↳ Initializing...' in the subagent session view when it has no
messages yet. Prevents the UI from appearing frozen during the
LLM thinking phase on startup.

Closes Kilo-Org#8422

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot bot commented Apr 12, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (4 files)
  • packages/kilo-vscode/webview-ui/src/components/chat/ChatView.tsx
  • packages/kilo-vscode/webview-ui/src/components/chat/MessageList.tsx
  • packages/kilo-vscode/webview-ui/src/components/chat/TaskToolExpanded.tsx
  • packages/opencode/src/cli/cmd/tui/routes/session/index.tsx

Reviewed by gpt-5.4-20260305 · 1,049,884 tokens

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2d0b5e63fc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Githubguy132010 and others added 2 commits April 12, 2026 17:37
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Mirror the TUI fix for the VS Code extension webview:

- TaskToolExpanded: show "Starting..." when the task tool is running
  but the child session has no tool calls yet (previously the expanded
  body was empty/blank).

- MessageList/ChatView: propagate the readonly flag so the subagent
  viewer shows "Initializing..." instead of the generic welcome screen
  when the session has no messages yet.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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 pauses with no updates for quite some time

1 participant