Delegated subagents appear as separate sidebar chats instead of inside the chat that spawned them
What happens
When the agent delegates work with delegate_task, the desktop shows the fan-out as new chats in the sidebar and shows nothing about it in the chat that started it.
Two things combine:
- Child sessions are listed as ordinary conversations.
listSessions()(src/main/sessions.ts) selects every row fromsessionsordered bystarted_at, with noparent_session_idand nosourcefilter. Each subagent writes its own session row (the spawning agent setsparent_session_id), so every worker shows up as its own sidebar chat that the user has to open, read and clean up. On my own state.db that is 1883 rows with a non-nullparent_session_id. - The chat that spawned the subagents renders nothing about them. The gateway already relays a child's activity to the parent session as
subagent.*events (subagent.start,subagent.progress,subagent.thinking,subagent.tool,subagent.complete) on the parent's runtime session id, and servessubagent.list/subagent.steer/subagent.interrupt/subagent.tailover the same/api/wstransport the app's chat already uses.applyDashboardStreamEventhas no case for those events, so they are dropped and the parent chat stays silent while its children work.
What it should be
A delegated child belongs to the turn that spawned it: the parent chat should show what it is running (goal, elapsed time, latest activity), let the user expand a child to see its output and steer or stop it, and the child should not be a separate top-level conversation.
Evidence from a live run
Driving a delegate_task fan-out through the same launch path the app uses (hermes dashboard --no-open + /api/ws) — the relayed frames arrive on the parent session id, with the fields a roster needs:
{"type":"subagent.start","session_id":"484ef7cb","payload":{"subagent_id":"sa-0-c6a08df3","goal":"Run ... `echo alpha` ...","task_index":0,"task_count":2,"child_session_id":"20260926_025109_9d7b56","delegation_id":"deleg_fe8cf13c","model":"...","depth":0,"tool_count":0,"text":"Run ..."}}
{"type":"subagent.tool","session_id":"484ef7cb","payload":{"subagent_id":"sa-0-c6a08df3","tool_name":"terminal","tool_preview":"echo alpha","tool_count":1,...}}and the RPCs answer on that transport:
subagent.list -> {"subagents":[{"subagent_id":"sa-0-c6a08df3","goal":"...","started_at":1790387469.7,"status":"running","tool_count":1,"last_tool":"terminal","accepting_steer":true}],...}
subagent.tail -> {"available":true,"text":"=== Hermes subagent live transcript ===",...}
subagent.steer -> {"status":"queued","subagent_id":"sa-0-c6a08df3","text":"probe"}Note subagent.text is intentionally not relayed to the parent, so a parent-side stream is built from tool/progress/thinking lines.
Proposed fix
Two focused changes:
- In-chat roster (PR: #) — intercept
subagent.*events before the message-stream adapter, project them into rows keyed by the conversation, render live children above the composer with an expandable stream and steer/stop controls, and hydrate fromsubagent.listfor windows opened mid-run. - Sidebar hygiene — keep child sessions (
parent_session_id IS NOT NULL) out of the session list, so a conversation list stays a list of conversations (follow-up PR).
Source: fathah/hermes-desktop