mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-28 06:51:16 +08:00
Cherry-picked from PR #2290 by @Mibayy. Closes #2138. When asyncio.run() raises RuntimeError (running loop exists), the coroutine was created but never awaited, producing a RuntimeWarning on GC. Extract coro before try, call coro.close() in the except branch before falling back to ThreadPoolExecutor.