fix(sessions): stabilize legacy reset lineage on resume

This commit is contained in:
embwl0x
2026-08-11 19:06:10 -05:00
committed by kshitij
parent ce89afa59c
commit 5a10537b24
4 changed files with 77 additions and 19 deletions

View File

@@ -463,11 +463,7 @@ class CLIAgentSetupMixin:
)
# Re-open the session (clear ended_at so it's active again)
try:
self._session_db._conn.execute(
"UPDATE sessions SET ended_at = NULL, end_reason = NULL WHERE id = ?",
(self.session_id,),
)
self._session_db._conn.commit()
self._session_db.reopen_session(self.session_id)
except Exception:
pass
@@ -731,12 +727,7 @@ class CLIAgentSetupMixin:
# Re-open the session (clear ended_at so it's active again)
try:
self._session_db._conn.execute(
"UPDATE sessions SET ended_at = NULL, end_reason = NULL "
"WHERE id = ?",
(self.session_id,),
)
self._session_db._conn.commit()
self._session_db.reopen_session(self.session_id)
except Exception:
pass