mirror of
https://github.com/nesquena/hermes-webui.git
synced 2026-05-25 11:10:18 +00:00
5bbf18324c
The previous implementation renamed old_sid.json → new_sid.json during context compression, destroying the only persistent copy of the full conversation history. If the summarisation LLM call also failed, the user was left with zero recoverable messages. Fix: - Remove the destructive old_path.rename(new_path) call - Preserve old_sid.json as an immutable pre-compression archive - Create new_sid.json as a fresh file via s.save() - Set parent_session_id on the continuation session for lineage - Save in-memory messages to old_sid.json if they're newer than disk Test: test_issue2223_compression_no_rename.py (6 tests, all passing)