Conversation
…ousResearch#49808) Two UI indicators read from $subagentsBySession but used different filters: the status bar's 'Agents N running' aggregated across every session, while the Spawn tree overlay kept only the active session. Users saw 'Agents 2 running' in the status bar while the Spawn tree rendered 'No live subagents' because the running agents belonged to a non-active session (e.g. background work, cron polling). Root cause: apps/desktop/src/app/agents/index.tsx filtered the store down to activeSessionId before calling buildSubagentTree. The status bar (apps/desktop/src/app/shell/hooks/use-statusbar-items.tsx) already aggregated the same store via Object.values(...).reduce(..., activeSubagentCount). Fix: aggregate the same way in AgentsView: const activeSubagents = useMemo( () => Object.values(subagentsBySession).flat(), [subagentsBySession] ) This removes the now-unused $activeSessionId import and the activeSessionId useStore call. Both indicators now read from the same aggregate scope, restoring the contract that the user can trust: 'Agents N running' === the number of running subagents visible in the Spawn tree. Tests pin the post-fix contract at the store layer: - test 1: two sessions × two running subagents each → both indicators report 4 (activeSessionId-only filter would report 2) - test 2: only terminal subagents → both indicators report 0 All 8 store tests pass.
4 tasks
JZKK720
pushed a commit
to JZKK720/hermes-agent
that referenced
this pull request
Jun 25, 2026
The status-bar "Agents" item conflated three unrelated signals — running subagents (aggregated across all sessions), in-flight session turns, and failed background *system* actions (gateway restarts, toolset installs, computer-use grants via $desktopActionTasks/preview restart) — yet clicking it opens AgentsView, which renders only subagents. A failed gateway restart therefore showed "Agents (1 Failed)" over an empty "No live subagents" tree. AgentsView also filtered to the active session, so a subagent running in a background session showed "Agents N running" with nothing in the tree (the desync reported in NousResearch#49808). Unify the scope both surfaces speak: - AgentsView aggregates subagents across every session (salvages NousResearch#49819). - The indicator's running/failed counts come from subagents only (aggregated), never background system actions — those keep their own surfaces in settings / command center. So "Agents (N …)" now always points at a populated Spawn tree. Supersedes NousResearch#49819. Fixes NousResearch#49808.
pai-scaffolde
pushed a commit
to Scaffolde/hermes-agent
that referenced
this pull request
Jun 28, 2026
The status-bar "Agents" item conflated three unrelated signals — running subagents (aggregated across all sessions), in-flight session turns, and failed background *system* actions (gateway restarts, toolset installs, computer-use grants via $desktopActionTasks/preview restart) — yet clicking it opens AgentsView, which renders only subagents. A failed gateway restart therefore showed "Agents (1 Failed)" over an empty "No live subagents" tree. AgentsView also filtered to the active session, so a subagent running in a background session showed "Agents N running" with nothing in the tree (the desync reported in NousResearch#49808). Unify the scope both surfaces speak: - AgentsView aggregates subagents across every session (salvages NousResearch#49819). - The indicator's running/failed counts come from subagents only (aggregated), never background system actions — those keep their own surfaces in settings / command center. So "Agents (N …)" now always points at a populated Spawn tree. Supersedes NousResearch#49819. Fixes NousResearch#49808.
waefrebeorn
pushed a commit
to waefrebeorn/slermes
that referenced
this pull request
Jul 2, 2026
The status-bar "Agents" item conflated three unrelated signals — running subagents (aggregated across all sessions), in-flight session turns, and failed background *system* actions (gateway restarts, toolset installs, computer-use grants via $desktopActionTasks/preview restart) — yet clicking it opens AgentsView, which renders only subagents. A failed gateway restart therefore showed "Agents (1 Failed)" over an empty "No live subagents" tree. AgentsView also filtered to the active session, so a subagent running in a background session showed "Agents N running" with nothing in the tree (the desync reported in NousResearch#49808). Unify the scope both surfaces speak: - AgentsView aggregates subagents across every session (salvages NousResearch#49819). - The indicator's running/failed counts come from subagents only (aggregated), never background system actions — those keep their own surfaces in settings / command center. So "Agents (N …)" now always points at a populated Spawn tree. Supersedes NousResearch#49819. Fixes NousResearch#49808.
habarmc1223-sudo
pushed a commit
to habarmc1223-sudo/hermes-agent-fluxmem
that referenced
this pull request
Jul 8, 2026
The status-bar "Agents" item conflated three unrelated signals — running subagents (aggregated across all sessions), in-flight session turns, and failed background *system* actions (gateway restarts, toolset installs, computer-use grants via $desktopActionTasks/preview restart) — yet clicking it opens AgentsView, which renders only subagents. A failed gateway restart therefore showed "Agents (1 Failed)" over an empty "No live subagents" tree. AgentsView also filtered to the active session, so a subagent running in a background session showed "Agents N running" with nothing in the tree (the desync reported in NousResearch#49808). Unify the scope both surfaces speak: - AgentsView aggregates subagents across every session (salvages NousResearch#49819). - The indicator's running/failed counts come from subagents only (aggregated), never background system actions — those keep their own surfaces in settings / command center. So "Agents (N …)" now always points at a populated Spawn tree. Supersedes NousResearch#49819. Fixes NousResearch#49808.
santhreal
pushed a commit
to santhreal/hermes-agent
that referenced
this pull request
Jul 13, 2026
The status-bar "Agents" item conflated three unrelated signals — running subagents (aggregated across all sessions), in-flight session turns, and failed background *system* actions (gateway restarts, toolset installs, computer-use grants via $desktopActionTasks/preview restart) — yet clicking it opens AgentsView, which renders only subagents. A failed gateway restart therefore showed "Agents (1 Failed)" over an empty "No live subagents" tree. AgentsView also filtered to the active session, so a subagent running in a background session showed "Agents N running" with nothing in the tree (the desync reported in NousResearch#49808). Unify the scope both surfaces speak: - AgentsView aggregates subagents across every session (salvages NousResearch#49819). - The indicator's running/failed counts come from subagents only (aggregated), never background system actions — those keep their own surfaces in settings / command center. So "Agents (N …)" now always points at a populated Spawn tree. Supersedes NousResearch#49819. Fixes NousResearch#49808.
Contributor
|
Closing as superseded by #52183 (merged), which keeps the Agents indicator and Spawn-tree panel on the same subagent-only, cross-session scope (and also drops the false-positive system-action counts). Your cross-session aggregation change was salvaged into that fix — thank you. |
Gravezzz
pushed a commit
to Gravezzz/hermes-agent
that referenced
this pull request
Jul 21, 2026
The status-bar "Agents" item conflated three unrelated signals — running subagents (aggregated across all sessions), in-flight session turns, and failed background *system* actions (gateway restarts, toolset installs, computer-use grants via $desktopActionTasks/preview restart) — yet clicking it opens AgentsView, which renders only subagents. A failed gateway restart therefore showed "Agents (1 Failed)" over an empty "No live subagents" tree. AgentsView also filtered to the active session, so a subagent running in a background session showed "Agents N running" with nothing in the tree (the desync reported in NousResearch#49808). Unify the scope both surfaces speak: - AgentsView aggregates subagents across every session (salvages NousResearch#49819). - The indicator's running/failed counts come from subagents only (aggregated), never background system actions — those keep their own surfaces in settings / command center. So "Agents (N …)" now always points at a populated Spawn tree. Supersedes NousResearch#49819. Fixes NousResearch#49808.
leewenjie
pushed a commit
to leewenjie/hermes-agent
that referenced
this pull request
Aug 7, 2026
The status-bar "Agents" item conflated three unrelated signals — running subagents (aggregated across all sessions), in-flight session turns, and failed background *system* actions (gateway restarts, toolset installs, computer-use grants via $desktopActionTasks/preview restart) — yet clicking it opens AgentsView, which renders only subagents. A failed gateway restart therefore showed "Agents (1 Failed)" over an empty "No live subagents" tree. AgentsView also filtered to the active session, so a subagent running in a background session showed "Agents N running" with nothing in the tree (the desync reported in NousResearch#49808). Unify the scope both surfaces speak: - AgentsView aggregates subagents across every session (salvages NousResearch#49819). - The indicator's running/failed counts come from subagents only (aggregated), never background system actions — those keep their own surfaces in settings / command center. So "Agents (N …)" now always points at a populated Spawn tree. Supersedes NousResearch#49819. Fixes NousResearch#49808.
melon-xf
added a commit
to melon-xf/hermes-agent
that referenced
this pull request
Sep 3, 2026
The status-bar "Agents" item conflated three unrelated signals — running subagents (aggregated across all sessions), in-flight session turns, and failed background *system* actions (gateway restarts, toolset installs, computer-use grants via $desktopActionTasks/preview restart) — yet clicking it opens AgentsView, which renders only subagents. A failed gateway restart therefore showed "Agents (1 Failed)" over an empty "No live subagents" tree. AgentsView also filtered to the active session, so a subagent running in a background session showed "Agents N running" with nothing in the tree (the desync reported in NousResearch#49808). Unify the scope both surfaces speak: - AgentsView aggregates subagents across every session (salvages NousResearch#49819). - The indicator's running/failed counts come from subagents only (aggregated), never background system actions — those keep their own surfaces in settings / command center. So "Agents (N …)" now always points at a populated Spawn tree. Supersedes NousResearch#49819. Fixes NousResearch#49808.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two UI indicators read from
$subagentsBySessionbut used different filters: the status bar's "Agents N running" aggregated across every session, while the Spawn tree overlay kept only the active session. Users saw "Agents 2 running" in the status bar while the Spawn tree rendered "No live subagents" because the running agents belonged to a non-active session (e.g. background work, cron polling).Root Cause
apps/desktop/src/app/agents/index.tsxfiltered the store down toactiveSessionIdbefore callingbuildSubagentTree. The status bar (apps/desktop/src/app/shell/hooks/use-statusbar-items.tsx) already aggregated the same store viaObject.values(...).reduce(..., activeSubagentCount).Fix
Aggregate the same way in
AgentsView:const activeSubagents = useMemo(
)
This removes the now-unused
$activeSessionIdimport and theactiveSessionIduseStorecall. Both indicators now read from the same aggregate scope, restoring the contract that the user can trust: "Agents N running" === the number of running subagents visible in the Spawn tree.Tests
apps/desktop/src/store/subagents.test.tsgains two regression tests under #49808 — Spawn tree / status bar aggregate scope:npx vitest run src/store/subagents.test.ts
✓ src/store/subagents.test.ts (8 tests) 11ms
Test Files 1 passed (1)
Tests 8 passed (8)
Files Changed
apps/desktop/src/app/agents/index.tsx | 14 +++++--
apps/desktop/src/store/subagents.test.ts | 66 ++++++++++++++++++++++
Fixes #49808