Skip to content

feat(delegation): calm "will resume" affordance for background delegate_task - #52756

Merged
OutThisLife merged 4 commits into
mainfrom
bb/delegate-bg-resume-ux
Jun 26, 2026
Merged

feat(delegation): calm "will resume" affordance for background delegate_task#52756
OutThisLife merged 4 commits into
mainfrom
bb/delegate-bg-resume-ux

Conversation

@OutThisLife

Copy link
Copy Markdown
Collaborator

Summary

A top-level delegate_task already dispatches in the background and re-enters the conversation as a fresh turn when it finishes (tools/delegate_tool.py _model_background_value → always background; result rides process_registry.completion_queue). But while the subagent runs, the agent is genuinely idle yet every surface only showed an animated subagent indicator — which reads as "stuck, can't talk."

This adds the Cursor-style "Will resume when the background task finishes" affordance: no spinner, nothing to poll, keep chatting. Same underlying signal — idle + background work in flight — on all three surfaces. Backend unchanged (already correct); this is purely presentation.

Changes

  • Desktop GUI — new $backgroundResumePendingCount (running/queued subagents for the active session, zero while $busy) drives a static BackgroundResumeNotice at the transcript tail (the same slot as the response loader, so they never double up). i18n across en/ja/zh/zh-hant + types.
  • TUI — width-budgeted ↩ resumes when subagent finishes status segment (drops first on a tight terminal where ⛓ N already carries the signal).
  • CLI — one calm dispatch-time line in _on_tool_complete: ↩ Background task running — I'll resume when it finishes. Keep chatting.

Kept the composer status stack live-subagent rows (#44630) untouched — that's the deliberate watch/click-in surface, distinct from the main spinner that read as stuck.

Verifying the premise

Confirmed delegate_task is non-blocking on main (so this is a UX gap, not a hang): existing test_dispatch_returns_immediately_without_blocking, test_delegate_task_background_routes_async_and_does_not_block, test_run_agent_dispatch_forces_background, plus the desktop loader being gated on busy.

Test plan

  • desktop: tsc typecheck, eslint, vitest (background-delegation.test.ts, i18n parity, thread-loading)
  • tui: tsc typecheck, vitest (appChromeStatusRule.test.tsx, +4 new)
  • python: test_async_delegation.py, test_cli_background_status_indicator.py, new test_cli_delegate_background_notice.py
  • manual: dispatch a delegate_task in the desktop app, confirm the idle "Will resume…" notice + usable composer, and that the result re-enters automatically

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

🔎 Lint report: bb/delegate-bg-resume-ux vs origin/main

ruff

Total: 0 on HEAD, 0 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 0 pre-existing issues carried over.

ty (type checker)

Total: 11349 on HEAD, 11349 on base (➖ 0)

🆕 New issues: none

✅ Fixed issues: none

Unchanged: 5985 pre-existing issues carried over.

Diagnostics are surfaced as warnings — this check never fails the build.

@alt-glitch alt-glitch added type/feature New feature or request comp/desktop Electron desktop app (apps/desktop/*) 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 Jun 26, 2026
Track top-level delegate_task work that dispatches in the background and
re-enters as a fresh turn. $backgroundResume returns {count, activity} for
the active session while idle — count of parked tasks plus the primary
child's latest stream line (tool/progress/thinking) when readable.
…te_task

When idle with a top-level delegate_task still in flight, render a static,
shimmering system-note at the transcript tail instead of a spinner (which
reads as "stuck"). Reuses the shared steer / slash-status chrome (centered,
0.6875rem, muted, Codicon) so it sits in the thread like every other meta
line, and mirrors the primary child's latest stream line, falling back to
generic copy. i18n across en/ja/zh/zh-hant; markdown prose/heading rhythm
tuned so a re-entered turn breathes.
… segment

When idle with a background subagent still in flight, append a tail status
segment spelling out that the agent resumes on its own. Width-budgeted like
every tail segment, so it drops first on a tight terminal where the ⛓ count
already carries the signal.
A top-level delegate_task dispatches in the background and re-enters as a
fresh turn when done. Print a one-line dispatch-time note — no spinner,
nothing to poll — so the idle prompt doesn't read as "nothing happened."
@OutThisLife
OutThisLife force-pushed the bb/delegate-bg-resume-ux branch from e9a72d0 to 985350d Compare June 26, 2026 01:00
@OutThisLife
OutThisLife enabled auto-merge June 26, 2026 01:02
@OutThisLife
OutThisLife merged commit 41f4dce into main Jun 26, 2026
32 checks passed
@OutThisLife
OutThisLife deleted the bb/delegate-bg-resume-ux branch June 26, 2026 01:08
waefrebeorn pushed a commit to waefrebeorn/slermes that referenced this pull request Jul 2, 2026
…g-resume-ux

feat(delegation): calm "will resume" affordance for background delegate_task
habarmc1223-sudo pushed a commit to habarmc1223-sudo/hermes-agent-fluxmem that referenced this pull request Jul 8, 2026
…g-resume-ux

feat(delegation): calm "will resume" affordance for background delegate_task
santhreal pushed a commit to santhreal/hermes-agent that referenced this pull request Jul 13, 2026
…g-resume-ux

feat(delegation): calm "will resume" affordance for background delegate_task
Gravezzz pushed a commit to Gravezzz/hermes-agent that referenced this pull request Jul 21, 2026
…g-resume-ux

feat(delegation): calm "will resume" affordance for background delegate_task
leewenjie pushed a commit to leewenjie/hermes-agent that referenced this pull request Aug 7, 2026
…g-resume-ux

feat(delegation): calm "will resume" affordance for background delegate_task
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/desktop Electron desktop app (apps/desktop/*) 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