fix: surface /agents nudge for single-delegate fan-out (TUI + CLI)#35216
Merged
kshitijk4poor merged 1 commit intoMay 30, 2026
Merged
Conversation
362cabb to
3312447
Compare
3312447 to
a7d9866
Compare
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.
a7d9866 to
9d2571c
Compare
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.
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 onedelegate_taskgroup, the subagents render inline under "Tool calls" and that panel is suppressed — so the nudge never appears for the common single-delegate case (onedelegate_taskcall, even with multiple parallel tasks inside it).The CLI never had the nudge at all.
Fix
TUI (
ui-tui/src/components/thinking.tsx)(/agents)suffix to the inline delegate group header, gated on the already-computedhasInlineSubagents. Mirrors the suffix the standalone Spawn tree panel already shows.CLI (
agent/display.py)delegate_taskcompletion line inget_cute_tool_messagecarried no nudge. Add(/agents)to both variants (parallel tasks and single goal)./agents(aliastasks) is a real CLI command, so the hint resolves.Verification
tests/agent/test_display.py: +2 regression tests covering both delegate variants — suite green.tsc --noEmit: clean.subagentTree.test.ts: 35/35. Full vitest suite green except one pre-existing, unrelatedinput-event.test.tsfailure (SGR mouse fragment stripping), confirmed failing on the base with these changes stashed.dist/bundle and confirmed the compiledthinking.jscontains the inline nudge.