hermes - ✅(Solved) Fix Architecture pattern: Fire-and-forget dispatch via independent Hermes sessions (zero-code alternative to async delegate_task) [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#23060Fetched 2026-05-11 03:31:31
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Participants
Timeline (top)
labeled ×4cross-referenced ×1

Root Cause

The community is converging on adding background=true to delegate_task (#1599, #5586, #11508). This requires:

  • New tool API design
  • State management (check_task, collect_task, cancel_task)
  • Testing surface expansion (#5586 already has 68 tests)
  • Potential breaking changes

The alternative proposed here:

  • Leverages existing terminal(background=true) + notify_on_complete=true
  • Uses hermes chat -q as the sub-agent launcher
  • Zero new API, zero new tests, already working today
  • Process-level isolation is actually better than thread-level (survives parent crashes)

Fix Action

Fix / Workaround

# Dispatch a sub-agent as an independent hermes chat session
# Main turn returns instantly, results arrive via system injection
terminal(
    background=true,
    notify_on_complete=true,
    command="hermes chat -q 'search restaurants in Yangpu' -m LongCat-2.0-Preview --provider longcat -t web --quiet 2>&1",
    timeout=120
)
  1. Dispatchterminal(background=true) launches an independent hermes chat -q session
  2. Instant ack — main agent turn returns under 5 seconds with a confirmation message
  3. Async execution — the child session runs fully independently with its own model, provider, and toolset
  4. Result injectionnotify_on_complete=true injects process completion (including stdout output) into the next user-message turn as a system message

Should Hermes embrace and document this pattern as a first-class sub-agent dispatch mechanism, rather than building async into delegate_task?

PR fix notes

PR #23127: docs(delegation): document fire-and-forget dispatch

Description (problem / solution / changelog)

What does this PR do?

Documents a fire-and-forget dispatch pattern for spawning independent Hermes child sessions with terminal(background=true, notify_on_complete=true).

Related Issue

Fixes #23060

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • add a dedicated fire-and-forget pattern section to the autonomous agents guide
  • update the tools reference to call out background child Hermes sessions explicitly

How to Test

  1. Run UV_PYTHON=3.11 uv run --frozen pytest -q -o addopts='' tests/tools/test_notify_on_complete.py tests/tools/test_terminal_foreground_timeout_cap.py tests/tools/test_delegate_toolset_scope.py tests/run_agent/test_real_interrupt_subagent.py
  2. Run UV_PYTHON=3.11 uv run --frozen ruff check tests/tools/test_notify_on_complete.py tests/tools/test_terminal_foreground_timeout_cap.py tests/tools/test_delegate_toolset_scope.py tests/run_agent/test_real_interrupt_subagent.py
  3. Run env -i HOME="$HOME" PATH="/Library/Frameworks/Python.framework/Versions/3.10/bin:/usr/local/bin:/opt/homebrew/bin:/usr/bin:/bin:/usr/sbin:/sbin" UV_PYTHON=3.11 /Library/Frameworks/Python.framework/Versions/3.10/bin/uv run --frozen pytest --collect-only -q -o addopts='' tests/tools/test_notify_on_complete.py tests/tools/test_terminal_foreground_timeout_cap.py tests/tools/test_delegate_toolset_scope.py tests/run_agent/test_real_interrupt_subagent.py

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform: macOS 15.5

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

Screenshots / Logs

N/A

Changed files

  • website/docs/reference/tools-reference.md (modified, +1/-2)
  • website/docs/user-guide/skills/bundled/autonomous-ai-agents/autonomous-ai-agents-hermes-agent.md (modified, +26/-1)

Code Example

# Dispatch a sub-agent as an independent hermes chat session
# Main turn returns instantly, results arrive via system injection
terminal(
    background=true,
    notify_on_complete=true,
    command="hermes chat -q 'search restaurants in Yangpu' -m LongCat-2.0-Preview --provider longcat -t web --quiet 2>&1",
    timeout=120
)
RAW_BUFFERClick to expand / collapse

Problem

The current delegate_task tool blocks the main agent turn synchronously. Community issues #1599, #5586, and #11508 all seek async delegation — with #5586 proposing a full async_delegation toolset (68 unit tests, 3 PRs).

But there's a simpler path that already works today, with zero new code.

The Pattern: Independent Hermes Sessions as Fire-and-Forget Sub-Agents

# Dispatch a sub-agent as an independent hermes chat session
# Main turn returns instantly, results arrive via system injection
terminal(
    background=true,
    notify_on_complete=true,
    command="hermes chat -q 'search restaurants in Yangpu' -m LongCat-2.0-Preview --provider longcat -t web --quiet 2>&1",
    timeout=120
)

How it works

  1. Dispatchterminal(background=true) launches an independent hermes chat -q session
  2. Instant ack — main agent turn returns under 5 seconds with a confirmation message
  3. Async execution — the child session runs fully independently with its own model, provider, and toolset
  4. Result injectionnotify_on_complete=true injects process completion (including stdout output) into the next user-message turn as a system message

Key architectural insight

This is NOT "delegate_task with async support." It's a fundamentally different paradigm:

delegate_taskThis pattern
Process modelSubprocess within agent loopIndependent session
IsolationShared process, isolated contextFull process isolation
SurvivabilityDies if parent turn is interruptedSurvives parent turn end
Model controlSingle delegation model configPer-task model/provider
New code requiredYes (async toolset API)Zero
Already workingPartialYes, in production

From the product perspective, users experience it as "fire-and-forget sub-agents" — the mental model is simple: "I asked, assistant acknowledged, results came back." The technical reality (independent sessions) is transparent to the user.

Why this matters

The community is converging on adding background=true to delegate_task (#1599, #5586, #11508). This requires:

  • New tool API design
  • State management (check_task, collect_task, cancel_task)
  • Testing surface expansion (#5586 already has 68 tests)
  • Potential breaking changes

The alternative proposed here:

  • Leverages existing terminal(background=true) + notify_on_complete=true
  • Uses hermes chat -q as the sub-agent launcher
  • Zero new API, zero new tests, already working today
  • Process-level isolation is actually better than thread-level (survives parent crashes)

Related

  • #1599 — delegate_task(background=true) proposal
  • #5586 — Full async_delegation toolset (68 tests)
  • #11508 — Coordinator immediately returns to available state
  • Official docs already recommend terminal(background=True, notify_on_complete=True) for long-running work

Proposed action

This is filed as a discussion rather than a feature request. The question for maintainers:

Should Hermes embrace and document this pattern as a first-class sub-agent dispatch mechanism, rather than building async into delegate_task?

If the answer is yes, minimal work needed:

  1. Document the pattern in delegation-patterns.md
  2. Add a convenience wrapper (e.g. hermes dispatch "task" -m model --provider p -t web → shorthand for the terminal background command above)
  3. Potentially add a /dispatch slash command for interactive use

Even without any code changes, this is a fully functional alternative to async delegate_task today.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix Architecture pattern: Fire-and-forget dispatch via independent Hermes sessions (zero-code alternative to async delegate_task) [1 pull requests, 1 participants]