[FEATURE] Allow changing a running subagent's description/label after spawn (e.g. on SendMessage)
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 subagent's description (the 3-5 word label passed to the Agent tool) is fixed when the agent is spawned. That label is what the agent panel row under "main" shows, and what task notifications show.
Long-lived subagents are often re-tasked with SendMessage for a new phase of work, because resuming keeps their context. After that, the label still describes the first phase. With several such agents running, the panel and notifications become misleading, and the only way to get an accurate label is to spawn a fresh agent. That throws away the context that was the reason to resume.
I checked the current surfaces and found no way to change it. SendMessage takes to, summary (a per-message preview), message and notify_when_idle. /rename and the agents-view rename (agents:rename) act on sessions, not on subagents inside a session. The docs (sub-agents, agent view, keybindings, hooks, SDK) don't describe a way to relabel a running subagent either.
Proposed Solution
Any of these would work:
- An optional
description(orlabel) parameter onSendMessage. When the recipient is a subagent of this session, it replaces that agent's label in the agent panel and in later task notifications. - A way for a parent to relabel a child it owns, such as a small tool or a
/tasksaction, e.g. "rename agent". - Optionally, let an agent set its own label so it can say which phase it is in.
Option 1 seems smallest, since re-tasking already goes through SendMessage.
Alternative Solutions
- Respawning with a new description loses the agent's context.
- Keeping phase names out of descriptions (e.g. "Feature X owner") helps, but you can't always predict at spawn time that an agent will be re-tasked, and the panel then says nothing about what the agent is doing now.
Priority
Medium - Would be very helpful
Feature Category
Agents / subagents
Use Case Example
- Spawn a subagent with description "Write design doc" to draft a design.
- When the design is approved, send it
SendMessagewith "Now implement the design" so it keeps everything it learned. - The agent panel and notifications still say "Write design doc" while it is implementing.
- With this feature, step 2 could also pass
description: "Implement feature", and the panel would show what the agent is actually doing.
Additional Context
Seen on Claude Code 2.1.x CLI, with an orchestrator session that keeps several long-lived subagents and re-tasks them through phases (design, build, review).