mirror of
https://github.com/nesquena/hermes-webui.git
synced 2026-07-17 21:20:36 +00:00
2d249089fc
Mirror the worker's LRU-eviction ACTIVE_RUNS liveness check in _evict_session_agent so truncate/clear/model-switch can't close the SessionDB out from under an in-flight turn on the same session (#5096 Bug D follow-up). The cache handle still drops (harmless — worker holds a local ref); only the lifecycle commit + _session_db.close() are skipped while a run is active. Co-authored-by: claw-io <claw-io@users.noreply.github.com>