[FEATURE] Dispatch-time stable label for Agent/Task-tool-spawned subagents in Agent View

Open 💬 1 comment Opened Jun 25, 2026 by joaostein

Preflight

  • Searched existing enhancement requests — closest are #69357 (PR-title as session name), #71165 (configurable PR label + summary), #25870 (--session-name flag), #67858 (model-set name). None covers dispatch-time labeling of Agent/Task-tool-spawned subagents.
  • This is a single feature request.

Problem Statement

When a parent session spawns subagents via the Agent/Task tool (multi-agent orchestration), each Agent View row is named only by the subagent type (dev, qa, general-purpose) plus the dynamic Haiku summary. The orchestrator has no way to attach a stable, caller-defined label (e.g. a task ID like [T-2249]) at dispatch time. When you run many parallel lanes, every row reads dev / qa and you can't tell which row is which unit of work without expanding each one.

Verified on v2.1.191:

  • The Agent/Task tool exposes no name/label parameter.
  • The spawned subagent's meta.json (~/.claude/projects/<proj>/<session>/subagents/agent-<id>.meta.json) stores only agentType, description, toolUseId, spawnDepth — no name field the view reads. Injecting name + nameSource:"user" into a live subagent's meta.json is ignored: the row still renders the agentType.
  • These subagents do not create a ~/.claude/jobs/<id> entry, so the --bg / Ctrl+R name/nameSource mechanism (which works for background sessions) cannot reach them.

So there is no orchestrator-side way to label these rows; only manual Ctrl+R or relaunching via claude --bg --name (a different launch path) can set a name.

Proposed Solution

Any one of these would solve it:

  1. A name/label parameter on the Agent/Task tool that sets the Agent View row name for the spawned subagent.
  2. Have Agent View honor name/nameSource in the subagent meta.json (the same fields --bg/Ctrl+R already use for sessions), so an orchestrator can write the label post-dispatch.
  3. Use the Agent tool's existing description (already stored in meta.json, currently unused for the label) as the row name when present.

Alternative Solutions

  • Ctrl+R per row — manual, doesn't scale to many parallel dispatches.
  • claude --bg --name "<label>" — works, but is a different launch path than the Agent tool used for in-session orchestration.
  • Maintaining an external task board as the real index — works, but the Agent View itself stays unreadable.

Priority

Medium — Would be very helpful.

Feature Category

Interactive mode (TUI)

Use Case Example

A coordinator session dispatches Dev + QA + research subagents across several tracked tasks. It wants each Agent View row labeled with its task ID ([T-2249] …) so a human can glance at the fleet and read lane status at once, instead of N rows all reading dev/qa. Today the orchestrator can pass a description, but it never reaches the row name.

Additional Context

Reproduced and verified on Claude Code v2.1.191 (2026-06-25). The description passed to the Agent tool is already persisted in the subagent meta.json — option 3 above would be a minimal change that reuses data that already exists.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗