fix(cli): persist manual compress handoff

This commit is contained in:
revaraver 2026-04-29 05:02:25 +08:00 committed by Teknium
parent fe8dc26bc9
commit aacf36e943
2 changed files with 55 additions and 0 deletions

4
cli.py
View file

@ -7659,6 +7659,10 @@ class HermesCLI:
):
self.session_id = self.agent.session_id
self._pending_title = None
# Manual /compress replaces conversation_history with a new
# compressed handoff for the child session. Persist it from
# offset 0 so resume can recover the continuation after exit.
self.agent._flush_messages_to_session_db(self.conversation_history, None)
new_tokens = estimate_request_tokens_rough(
self.conversation_history,
system_prompt=_sys_prompt,