agent pane: a subagent named only by its raw id shows as "Subagent"
Leo, 2026-10-22, on a transcript row reading "Subagent finished: 01a15779-206b-72b0-96af-bdbe4868e19c/toolu_01H9Jk66ek2xu2m2SaOS09M1 · 1…": "this needs to be rendered better... it is now right"
Leo-ask: ask-e6e2477545
Cause. subagentFold.ts names a subagent change.name ?? change.task ?? change.id. A subagent first seen without a name (history paged in after its spawn) keeps its raw <session>/toolu_… id as its name, and every line that shows the name showed the id. #24280 fixed this but was closed unmerged as superseded by a commit that predates the ask; #24095 and #28696 cover only the subagent's own view and sub-sessions.
Fix (web only, display).
subagentDisplayName(t, agent)insubsessions.ts, next to #28696'ssubsessionDisplayName: a name that is the agent's id, or ends in atoolu_id, shows as the localized "Subagent". The id stays the fold's key for routing.- The done line ("Subagent finished: …"), the group line, the running tray and the agents list use it.
- The fold lets a later record's task name a subagent still named by its id.
Test. subsessions.test.ts: a raw <session>/toolu_… name shows as "Subagent"; a real name, including one with "toolu" as a word, is unchanged.
Small change (display only, one surface); no screenshots.
Agent session: agent session
🤖 Generated with Claude Code
![View with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3-3x.png)
![Autofix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark-3x.png)
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Fixes the agent pane showing a subagent's raw session/tool-call id when the subagent was first seen without a name, e.g. after history was paged in. Those lines now show the localized "Subagent" instead, and a later record's task names a subagent still identified only by its id.
- Applies to the done line, group line, running tray, and agents list.
- A name containing "toolu" as a word is unchanged; the id stays the routing key.