Skip to content

Show subagent runs as one tidy, collapsible view instead of loose rows #447

Description

@linear-code

Problem

On main, each subagent run shows in the chat as its own loose row, such as "> Sea haiku Done / Subagent · 3s · 1.89K tokens". Several of them in one turn look unfinished and noisy, and the token count is the most prominent detail.

No screenshot yet: showing the rows needs a real subagent run on a provider, which the display fixtures cannot produce.

Goal

Subagent runs read as one tidy unit. Each subagent has a clear name, status icon, and duration, and opens to show its task and result. Token counts stay out of the default view.

The design moved during implementation:

  1. First pass (in chat): one collapsible group per turn, such as "Ran 2 subagents · 5.0s" or "Running 2 subagents…", timed by wall clock. A lone subagent is one row labelled Subagent. Receipts now carry the task, clipped to 4,000 characters.
  2. Current direction (bot panel): the in-chat group was still noisy, so subagents moved to a Subagents section in the bot's side panel, laid out like T3 Code's lineage section: provider glyph with a static status dot, name, duration ("7m 32s"), and status word. Running children lead; finished ones stay beside them for 15 minutes, then fold under "Previous subagents", which shows 6 rows and pages 12 at a time. Finishes older than 7 days leave the panel. A row opens in place to its task, answer, and tokens. Group chats get the same section, each row showing the provider of the member that started it. The chat keeps one quiet "Running 2 subagents…" line while children work and shows nothing once they finish.

Acceptance criteria

  • Parallel subagents in one turn appear as one unit with a summary, not as separate loose rows
  • Each row shows name, status, and duration, and expands to show the task and result
  • Running, done, and failed states are distinguishable at desktop and mobile widths
  • Token counts are hidden until a row is expanded
  • A running receipt with no final receipt shows as stopped once a later receipt in the same chat is more than 15 minutes past its start (server time against server time); a quiet chat falls back to the client clock with a day of slack. A lost child shows no elapsed time rather than 0s
  • Timing and open or closed state survive a reload: each receipt's start is its timestamp minus its duration, and a group keeps the key of its first-arrived child

How to verify

Ask a bot to run two subagents in parallel and view the chat and the bot panel at 1440px and 390px wide, then reload and check that timing and open state are unchanged.

Out of scope

  • How subagents reach the provider (AKR-140)
  • Nested subagents. Subagents cannot start subagents, so the list is flat.

Context

  • Work lives on the local branch cos/subagent-rows on Leo's machine (also merged into cos/leo-feedback-preview), not pushed, no PR. Commits: ed6220f86 subagents show as one collapsible group, 320a4c986 subagent groups keep state and timing, ca40b5380 subagents live in the bot panel like T3 Code's lineage, bedc6812f subagent panel holds up under clock skew.
  • The panel reads the receipts the chat has already loaded, so no server projection is needed. The server's subagent timeout is 10 minutes.
  • The row layout, status dot, paging limits, and elapsed format are adapted from T3 Code's ThreadRelationshipsControl, ThreadRelationshipIcon, and AgentElapsed (MIT, © T3 Tools Inc. and contributors).

Created with Claude Opus 5.5 in Claude Code.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions