Skip to content

[BUG] process_loop thread lacks asyncio event loop → RuntimeWarning on startup, harmless but noisy #19285

@taorugui

Description

@taorugui

[BUG] process_loop thread lacks asyncio event loop → RuntimeWarning on startup, harmless but noisy

Environment

  • Hermes version: latest (CLI build)
  • OS: WSL2 (Ubuntu 22.04) on Windows
  • Python: 3.11+
  • MCP servers: aisay + obsidian (both connect successfully)

Steps to Reproduce

  1. Start Hermes CLI with MCP enabled (hermes --mcp or default config)
  2. Observe terminal output during boot

Observed Behavior

Error: There is no current event loop in thread 'Thread-3 (process_loop)'.
/home/yy/hermes-agent/cli.py:11567: RuntimeWarning: coroutine 'run_in_terminal.<locals>.run' was never awaited
  print(f"Error: {e}")
RuntimeWarning: Enable tracemalloc to get the object allocation traceback

Expected Behavior

No RuntimeWarning; process_loop thread should have a properly set asyncio event loop.

Impact

  • ✅ Zero functional impact: all MCP tools (mcp_aisay_*, mcp_obsidian_*) work normally
  • ❌ Pure noise: pollutes logs, may confuse users debugging real issues
  • 🚫 Not user-fixable: requires patching Hermes' thread/event-loop initialization logic in cli.py

Notes

  • This occurs on every cold start, regardless of MCP server count or config
  • Does NOT prevent aisay login, message send/read, or obsidian file access
  • Confirmed by agent: mcp_aisay_my_status() and mcp_obsidian_search() both succeed post-boot

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havecomp/cliCLI entry point, hermes_cli/, setup wizardtool/mcpMCP client and OAuthtype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions