fix: Reset token counters on new session for accurate usage display (#2099)

This commit is contained in:
InB4DevOps
2026-03-19 23:53:51 +01:00
parent 4c0c7f4c6e
commit fe331ed9bd
2 changed files with 38 additions and 0 deletions

1
cli.py
View File

@@ -2733,6 +2733,7 @@ class HermesCLI:
if self.agent:
self.agent.session_id = self.session_id
self.agent.session_start = self.session_start
self.agent.reset_session_state()
if hasattr(self.agent, "_last_flushed_db_idx"):
self.agent._last_flushed_db_idx = 0
if hasattr(self.agent, "_todo_store"):