feat(composer): running-subagent strip with per-agent filtering#59
Merged
Conversation
Adds a strip above the composer listing currently-running spawned subagents (Claude Task/Agent + Codex subagent_*), each with a deterministic pixel-art sprite and identity color. Clicking a chip filters the thread to that subagent's output, with a banner showing its type and activity stats (tool uses, files, steps, running/done).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a slim strip above the composer that lists a session's currently-running spawned subagents and lets you focus the conversation on one.
Task/Agentor Codexsubagent_*), the strip slides in flush on top of the composer with one chip per live subagent — each with a deterministic pixel-art sprite, identity color, and name — and slides out when they finish.result(mirroringAgentChildrenBlock'sisRunning), so chips persist for the subagent's whole lifetime instead of vanishing when input streaming ends.Implementation
src/features/composer/subagent-strip/—extract-subagents.ts(single source of truth:extractRunningSubagents,selectSubagentBlock,summarizeSubagent),use-running-subagents.ts,pixel-avatar.tsx,index.tsx.src/features/conversation/state/subagent-filter-store.ts— Zustand store keyed bysessionId.src/features/panel/subagent-filter-banner.tsx+ filtering wired intothread-viewport.tsx(transforms the sourcemessagesarray so virtualization stays correct).readAgentsStates/AgentStatefromsubagent-tool.tsxfor reuse.Notes
ToolCallPart, Task results, or CodexagentsStates), so the banner shows the activity it can count. Real token counts would need backend plumbing.Test plan
tsc --noEmitclean,biome checkcleanextract-subagents(running detection incl. thestreamingStatus: doneregression, Codex dedupe,selectSubagentBlock,summarizeSubagent) and a render test for the strip (collapse + chip toggle)Tasksubagents — confirm the strip slides in/out, chips persist while running, click-to-filter + banner stats, "Show all" restores the threadsubagent_spawnsession