mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-03 09:17:09 +08:00
_get_peer() and _get_or_create_honcho_session() accessed _peers_cache and _sessions_cache without holding _cache_lock, while other paths in the same class use the lock consistently. Under concurrent tool calls or prefetch threads, this can produce stale reads or lost cache updates. Wrap both unguarded cache read sites in _cache_lock. Network calls (honcho.peer() and honcho.session()) remain outside the lock to avoid holding it during I/O.