mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-21 03:39:54 +00:00
8cd4a96686
Two concurrent threads (e.g. parallel subagents) could both pass the 'task_id in _active_sessions' check, both create cloud sessions via network calls, and then one would overwrite the other — leaking the first cloud session. Add double-check after the lock is re-acquired: if another thread already created a session while we were doing the network call, use the existing one instead of orphaning it.