hermes - 💡(How to fix) Fix [a2a_fleet] CRITICAL: server never auto-starts — register() runs outside an event loop

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…

Error Message

Do not rely on a register-time event loop. Start uvicorn on a named daemon thread with its own loop (matches upstream rubric #10 for background work), or hook a documented startup lifecycle hook. At minimum, surface this as a hard, visible error rather than a debug-level warning.

Root Cause

The a2a_fleet server never auto-starts because register() runs outside an event loop.

Fix Action

Fix

Do not rely on a register-time event loop. Start uvicorn on a named daemon thread with its own loop (matches upstream rubric #10 for background work), or hook a documented startup lifecycle hook. At minimum, surface this as a hard, visible error rather than a debug-level warning.


Filed from opus-4.8 plugin audit (a2a_fleet) vs upstream NousResearch plugin conventions.

RAW_BUFFERClick to expand / collapse

Severity: CRITICAL (correctness — feature dead on normal launch)

The a2a_fleet server never auto-starts because register() runs outside an event loop.

Evidence

  • plugins/a2a_fleet/__init__.py:34-43_schedule_server_start() calls asyncio.get_running_loop(); on RuntimeError it logs a warning and returns (server not started).
  • hermes_cli/plugins.py:1143-1166_load_plugin calls register_fn(ctx) synchronously (line 1166); discover_and_load (line 766) is a plain sync method invoked from CLI bootstrap (cli.py:7958), not inside a running event loop.

Therefore get_running_loop() raises, the warning branch fires, and the inbound A2A surface (/jsonrpc, agent card) is never bound on a normal launch. Verified: discover_and_load is sync and not inside a loop.

Impact

The entire inbound A2A surface is dead in the real runtime. Tests pass only because pytest-asyncio provides a loop, masking the bug.

Fix

Do not rely on a register-time event loop. Start uvicorn on a named daemon thread with its own loop (matches upstream rubric #10 for background work), or hook a documented startup lifecycle hook. At minimum, surface this as a hard, visible error rather than a debug-level warning.


Filed from opus-4.8 plugin audit (a2a_fleet) vs upstream NousResearch plugin conventions.

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