The SessionService.summarizeSession method currently uses Date.now() for the timestamp metadata whenever a session is summarized or re-summarized. This causes old sessions to jump to the top of the "recent sessions" list (which sorts by timestamp) whenever they are re-processed (e.g., due to drift detection).
Fix:
Update summarizeSession to calculate the session's timestamp based on the latest memory timestamp within that session. This ensures that the summary reflects the actual time of the activity, not the time of the summarization process.
The
SessionService.summarizeSessionmethod currently usesDate.now()for thetimestampmetadata whenever a session is summarized or re-summarized. This causes old sessions to jump to the top of the "recent sessions" list (which sorts by timestamp) whenever they are re-processed (e.g., due to drift detection).Fix: Update
summarizeSessionto calculate the session's timestamp based on the latest memory timestamp within that session. This ensures that the summary reflects the actual time of the activity, not the time of the summarization process.