LearnNewsExamplesServices
Frontmatter
id7866
titleBug: Prevent SessionService from summarizing the active session
stateClosed
labels
bugai
assigneestobiu
createdAtNov 22, 2025, 9:54 PM
updatedAtNov 22, 2025, 10:04 PM
githubUrlhttps://github.com/neomjs/neo/issues/7866
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtNov 22, 2025, 10:04 PM

Bug: Prevent SessionService from summarizing the active session

Closed v11.9.0 bugai
tobiu
tobiu commented on Nov 22, 2025, 9:54 PM

The summarizeSessions method in ai/mcp/server/memory-core/services/SessionService.mjs can inadvertently summarize the currently active session. This can happen in two scenarios:

  1. Drift Detection: The findSessionsToSummarize method detects the current session as having a mismatch between DB memories and the summary (since the summary doesn't exist or is outdated), flagging it for summarization.
  2. Manual Trigger: An agent manually calls the summarize_sessions tool with the current session ID or without arguments (triggering case 1).

Summarizing the active session is premature as the session is still ongoing. This leads to incomplete summaries and potentially multiple summary entries for the same session.

Goal: Add a guard clause in SessionService to explicitly exclude this.currentSessionId from being summarized, both when finding sessions automatically and when a specific sessionId is requested.

Task:

  • Modify SessionService.mjs (around line 291 in summarizeSessions) to filter out this.currentSessionId.
tobiu added the bug label on Nov 22, 2025, 9:55 PM
tobiu added the ai label on Nov 22, 2025, 9:55 PM
tobiu assigned to @tobiu on Nov 22, 2025, 9:55 PM
tobiu referenced in commit 86ba7d5 - "Bug: Prevent SessionService from summarizing the active session #7866" on Nov 22, 2025, 10:04 PM
tobiu closed this issue on Nov 22, 2025, 10:04 PM