mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-30 19:09:28 +00:00
The desktop message-stream hook wiped the per-session subagent store on every new turn (use-message-stream.ts:860), dropping still-running and queued rows along with the previous turn's terminal entries. Late subagent.tool / subagent.progress / subagent.complete events for surviving background tasks were then silently dropped by upsertSubagent's createIfMissing guard, so the rows never returned and their completion summaries never rendered. Replace the unconditional clearSessionSubagents() call at the message.start boundary with a new pruneFinishedSessionSubagents() that filters out only terminal-status rows. The Stop-action call at use-prompt-actions.ts:1546 still uses clearSessionSubagents because /stop genuinely cancels running subagents, so dropping their rows is correct. Tests: 3 new cases in subagents.test.ts (regression for the wipe, late completion acceptance after prune, cross-session isolation). Failing-first verified: all 3 fail on unfixed (pruneFinishedSessionSubagents not exported), all 3 pass on fix; 7 pre-existing subagents tests stay green; 3 gateway-events tests stay green; 6 background-delegation tests stay green. The Stop-action use-prompt-actions.test.tsx failures predate this branch (window-not-defined env issue, verified by stash-and-rerun). |
||
|---|---|---|
| .. | ||
| bootstrap-installer | ||
| desktop | ||
| shared | ||