Skip to content

fix: surface /agents nudge for single-delegate fan-out (TUI + CLI)#35216

Merged
kshitijk4poor merged 1 commit into
NousResearch:mainfrom
kshitijk4poor:fix/agents-nudge-single-delegate
May 30, 2026
Merged

fix: surface /agents nudge for single-delegate fan-out (TUI + CLI)#35216
kshitijk4poor merged 1 commit into
NousResearch:mainfrom
kshitijk4poor:fix/agents-nudge-single-delegate

Conversation

@kshitijk4poor

Copy link
Copy Markdown
Collaborator

Problem

The subagent spawn-observability overlay added a (/agents) nudge, but only on the standalone Spawn tree panel, which is gated behind !inlineDelegateKey. When a turn has exactly one delegate_task group, the subagents render inline under "Tool calls" and that panel is suppressed — so the nudge never appears for the common single-delegate case (one delegate_task call, even with multiple parallel tasks inside it).

The CLI never had the nudge at all.

Fix

TUI (ui-tui/src/components/thinking.tsx)

  • Append a dim (/agents) suffix to the inline delegate group header, gated on the already-computed hasInlineSubagents. Mirrors the suffix the standalone Spawn tree panel already shows.

CLI (agent/display.py)

  • The delegate_task completion line in get_cute_tool_message carried no nudge. Add (/agents) to both variants (parallel tasks and single goal). /agents (alias tasks) is a real CLI command, so the hint resolves.

Verification

  • tests/agent/test_display.py: +2 regression tests covering both delegate variants — suite green.
  • TUI tsc --noEmit: clean.
  • subagentTree.test.ts: 35/35. Full vitest suite green except one pre-existing, unrelated input-event.test.ts failure (SGR mouse fragment stripping), confirmed failing on the base with these changes stashed.
  • Rebuilt the TUI dist/ bundle and confirmed the compiled thinking.js contains the inline nudge.

@kshitijk4poor kshitijk4poor force-pushed the fix/agents-nudge-single-delegate branch from 362cabb to 3312447 Compare May 30, 2026 07:37
@alt-glitch alt-glitch added type/feature New feature or request comp/tui Terminal UI (ui-tui/ + tui_gateway/) comp/cli CLI entry point, hermes_cli/, setup wizard tool/delegate Subagent delegation P3 Low — cosmetic, nice to have labels May 30, 2026
@kshitijk4poor kshitijk4poor force-pushed the fix/agents-nudge-single-delegate branch from 3312447 to a7d9866 Compare May 30, 2026 07:49
The subagent spawn-observability overlay added a `(/agents)` hint, but
only on the standalone "Spawn tree" panel, gated behind `!inlineDelegateKey`
— it never showed for a single delegate_task call, and only appeared once
subagents had already registered. A nudge that arrives at the end (or only
after spawn) is useless for the actual goal: letting users open the live
monitor *while* delegation is running.

Surface it the moment delegation starts, on both surfaces:

TUI (ui-tui/src/components/thinking.tsx)
- Show `(/agents)` on any "Delegate Task" tool group as soon as it appears
  (in-flight, before any subagent registers), not gated on subagents
  already existing. Same `startsWith('Delegate Task')` predicate already
  used for delegateGroups.

CLI (agent/tool_executor.py)
- Append `· /agents to monitor` to the delegate spinner label, which is
  displayed for the full duration of the delegate_task call. The previous
  attempt put the hint on the completion line (get_cute_tool_message),
  which only renders after the call finishes — reverted.

TUI tsc clean (pre-existing execFileNoThrow type errors unrelated);
subagentTree 35/35; display.py reverted to upstream.
@kshitijk4poor kshitijk4poor force-pushed the fix/agents-nudge-single-delegate branch from a7d9866 to 9d2571c Compare May 30, 2026 07:52
@kshitijk4poor kshitijk4poor enabled auto-merge May 30, 2026 07:54
@kshitijk4poor kshitijk4poor merged commit e481b15 into NousResearch:main May 30, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/tui Terminal UI (ui-tui/ + tui_gateway/) P3 Low — cosmetic, nice to have tool/delegate Subagent delegation type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants