mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-28 06:51:16 +08:00
Ensures pending sessions are committed on process exit even if shutdown_memory_provider is never called (gateway crash, SIGKILL, or exception in _async_flush_memories preventing shutdown). Also reorders on_session_end to wait for the pending sync thread before checking turn_count, so the last turn's messages are flushed. Based on PR #4919 by dagbs.