[FEATURE] subagentStatusLine: separate agent name from launch provenance in the tasks[] payload

Status Open
Reported on v2.1.237
Maintainer reply None cached
Activity 0 comments · opened Aug 20, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

A custom subagentStatusLine command cannot reliably show which agent a task row is, because the tasks[] payload never carries the agent definition name, and launch provenance leaks in only sometimes through the label:

  • type is always a runtime kind — local_agent (or remote_agent) — for every subagent, regardless of whether it runs as general-purpose, Explore, or a plugin agent like epic-worker:bug-fixer.
  • name is listed in the docs (https://code.claude.com/docs/en/statusline#subagent-status-lines) but is absent from real payloads.
  • label is the spawn description (Agent tool description), except for skill forks, where it is the skill invocation string (/epic-worker:epic-implement PIPR-64 ...).

So today a status line gets either skill provenance (fork rows, via the label) or nothing (Agent-tool rows show only a free-text description) — never the agent name itself.

Sample payload (2.1.237) for a task running the Explore agent — nothing identifies it:

{"tasks":[{"id":"a34...273","type":"local_agent","status":"running",
  "description":"Trigger statusline render","label":"Trigger statusline render",
  "startTime":1787228199915,"model":"claude-haiku-4-5-20251001",
  "contextWindowSize":200000,"tokenCount":0,"tokenSamples":[0],"cwd":"D:\\CCC"}]}

Related docs issues

  • name is documented for tasks[] but not emitted.
  • type reads as "agent type" in the docs but only ever carries local_agent/remote_agent.

Proposed Solution

Separate what the agent is from how it was launched:

  1. agentType (or fix type/name): always present and true — the resolved agent definition name (general-purpose, Explore, epic-worker:bug-fixer, a .claude/agents name). Also for nested subagents spawned by other agents.
  2. Launch provenance as a separate, optional field, present only when it applies — e.g. launchedBy: {"kind":"skill","skill":"epic-worker:epic-implement"} for skill forks.

That way the agent name is never displaced by provenance, and provenance is available in a structured form instead of being inferred from the label text.

Alternative Solutions

We scan the session transcript (transcript_path is in the payload) for the launch record — the Agent tool_use's subagent_type, or the <forked-skill-launch> record's skillName — and for nested agents additionally the session's sidecar transcripts under %TEMP%\claude\<project>\<session>\tasks\*.output, with a per-id cache. It works, but it is fragile: launch records can disappear from the main transcript after compaction, and the sidecar file layout is undocumented.

Priority

Medium - Would be very helpful

Feature Category

Interactive mode (TUI)

Use Case Example

A status line that shows both

With agentType and launchedBy a custom subagentStatusLine can render every row as
<label> (<status>) | <agent> [<launched via>] | <model> | <tokens>:

o Implement PIPR-64 wave W5   (running) | implementation-orchestrator [/epic-worker:epic-implement] | fable-5  | 212k/1000k tok
| o Running Jira suite tests  (running) | epic-worker:bug-fixer                                     | opus-4-8 | 365k/1000k tok
| o Verifying ticket status   (running) | infra-ops:jira-operator [/infra-ops:jira-ops]             | sonnet-5 | 180k/1000k tok
o Find usages of JiraClient   (running) | Explore                                                   | haiku-4-5|  15k/200k tok

Every row names its agent — including the nested workers an orchestrator spawned — and the
bracketed provenance appears only where a skill did the launching. Today none of these agent
names can be rendered from the payload, and only row 1 would hint at its skill (via the label).

Additional Context

_No response_

View original on GitHub ↗