Skip to content

feat: show a session's subagents, apart from its background tasks - #159

Merged
brtkwr merged 1 commit into
mainfrom
feat/subagents
Oct 28, 2026
Merged

brtkwr merged 1 commit into
mainfrom
feat/subagents

Conversation

@brtkwr

@brtkwr brtkwr commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

Subagents (Agent tool, async or teammates) didn't show anywhere in ccs. Teammates in particular were left out of the background-task count, because they never send an end notification.

Where they're read from: Claude Code writes a `meta.json` beside each subagent's transcript in `/subagents/`. It holds the name or description and a `finished` flag, which covers teammates too. ccs reads these at most every 2s per session.

Shown separately from background tasks:

  • List: a pink `◆N` for running subagents beside the light-blue `⧗N` for background commands and monitors.
  • Preview header: a Subagents block below Tasks. It has one line per running subagent with its name and age (up to 5), then a count of finished ones.
  • No double counting: background tasks are now only background commands and monitors. An async agent used to count as a task, and would now also count as a subagent, so it's no longer counted as a task.

Subagents don't appear as rows in the list; you chose the conversation pane only.

Checked on a real session (dependabot-sweep-workflow): 7 running subagents listed with their ages, and 15 finished.

Tests: `TestSubagentsInThePreviewAndTheList`, and `TestBackgroundTasks` now checks that an async agent isn't a task.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QUnP8jVL2NG9cWmohJTyun

The preview header gets a Subagents block: one line per running subagent
(Agent tool, async or teammates) with its age, then a count of finished
ones, read from the meta.json Claude Code writes beside each subagent's
transcript. The list shows a pink ◆N beside the ⧗N. Background tasks are
now only background commands and monitors, so an async agent no longer
shows twice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QUnP8jVL2NG9cWmohJTyun
@brtkwr
brtkwr enabled auto-merge October 28, 2026 09:48
@brtkwr
brtkwr merged commit e794e3d into main Oct 28, 2026
1 check 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.

1 participant