hermes - 💡(How to fix) Fix Reduce recurring Hermes asynchronous-generator aclose log noise [3 comments, 2 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#19824Fetched 2026-05-05 06:04:52
View on GitHub
Comments
3
Participants
2
Timeline
8
Reactions
0
Timeline (top)
commented ×3labeled ×3closed ×1cross-referenced ×1

Recurring error/warning appeared 14 times recently: RuntimeError: aclose(): asynchronous generator is already running

Error Message

Recurring error/warning appeared 14 times recently: RuntimeError: aclose(): asynchronous generator is already running

Root Cause

Recurring error/warning appeared 14 times recently: RuntimeError: aclose(): asynchronous generator is already running

RAW_BUFFERClick to expand / collapse

Why

Hermes is repeatedly logging RuntimeError: aclose(): asynchronous generator is already running. This can indicate unsafe concurrent cleanup in streaming/gateway code and creates recurring log noise that hides real failures.

Signal Deck card

  • Card ID: ops-ops-runtimeerror-aclose-asynchronous-generator-is-already-running
  • Work item ID: ops-ops-runtimeerror-aclose-asynchronous-generator-is-already-running:approve:2026-05-04T16:03:29.867Z:work
  • Decision/action: approve at 2026-05-04T16:03:29.867Z
  • Project: Hermes / Ops Reliability
  • Source: Signal Deck action processor run 60fd4c81-0c29-434d-bff3-e54b65393c9b

User feedback / approval

No additional approval comment.

Context

Recurring error/warning appeared 14 times recently: RuntimeError: aclose(): asynchronous generator is already running

Scope

Investigate concurrent asynchronous-generator cleanup in Hermes gateway/stream handling, identify the source of duplicate aclose() calls, and implement or specify a bounded reliability fix.

Original Signal Deck prompt:

Approve a bounded investigation/fix only if this improves Hermes reliability or reduces future agent friction.

Acceptance criteria

  • Identify the generator or stream lifecycle path that can call aclose() concurrently.
  • Determine whether this is a cleanup race, cancellation ordering issue, or expected library behavior.
  • Implement a safe guard/serialization/cancellation fix if actionable.
  • Add/update a focused test if practical, or document verification using Hermes gateway logs.
  • Link implementation PR back to this issue and preserve the Signal Deck card ID in the PR body.

Evidence

  • No explicit file evidence attached in the card; card context is the provenance.
  • Related recurring Hermes gateway/log-noise issue: #18485.

Out of scope / risk gates

  • Do not deploy, publish publicly, spend money, touch credentials/tokens/secrets, contact clients, or send Slack/Telegram/Discord messages from this issue alone.
  • Keep implementation work on a branch and PR linked to this issue.

extent analysis

TL;DR

Implement a safe guard or serialization mechanism to prevent concurrent aclose() calls on asynchronous generators in Hermes gateway/stream handling.

Guidance

  • Investigate the generator or stream lifecycle path that can call aclose() concurrently to identify the source of duplicate calls.
  • Determine whether this is a cleanup race, cancellation ordering issue, or expected library behavior to inform the fix.
  • Consider adding a lock or semaphore to serialize aclose() calls and prevent concurrent execution.
  • Review related issue #18485 for potential insights into the recurring log noise and gateway reliability.

Example

No code snippet is provided due to lack of specific implementation details.

Notes

The fix may require a deep understanding of the Hermes gateway/stream handling code and the asynchronous generator lifecycle. It is essential to thoroughly investigate the issue and consider potential consequences of changes to the code.

Recommendation

Apply a workaround by implementing a safe guard or serialization mechanism to prevent concurrent aclose() calls, as this is likely to improve Hermes reliability and reduce future agent friction.

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