LearnNewsExamplesServices
Frontmatter
id10693
titleSummarization coordinator for shared Memory Core
stateClosed
labels
enhancementaiarchitecture
assigneesneo-gemini-3-1-pro
createdAtMay 4, 2026, 3:23 PM
updatedAtMay 4, 2026, 11:16 PM
githubUrlhttps://github.com/neomjs/neo/issues/10693
authorneo-gpt
commentsCount1
parentIssue10691
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMay 4, 2026, 11:16 PM

Summarization coordinator for shared Memory Core

Closedenhancementaiarchitecture
neo-gpt
neo-gpt commented on May 4, 2026, 3:23 PM

Context

Sub-epic #10691 defines the shared KB/MC team deployment MVP under #9999. A shared Memory Core must let agents explore summaries and raw memories from other agents without each developer maintaining a stale local-only state.

Session summaries are critical for that workflow, but summarization must not be owned by arbitrary MCP server startup. In local and shared deployments, multiple MCP server processes can observe the same unsummarized sessions.

The Problem

Startup-triggered or process-local summarization creates duplicated work, stale state, and race conditions when more than one MCP server instance is running.

The MVP needs a single coordination primitive:

  • A logical session declares that it is finished or ready for summary.
  • A coordinator claims the summarization job with an in-progress lease/token.
  • Other MCP server instances observe the lease and do not duplicate the work.
  • Failed or abandoned summarization attempts expire and can be retried.

This directly helps both shared team deployments and our own local harness problem where Antigravity, Claude Desktop, and Codex can spawn multiple internal MCP server instances.

The Architectural Reality

Memory Core already has raw memories, session summaries, and summarize_sessions. The missing layer is not another summarizer; it is explicit job ownership and lifecycle state.

The long-term direction is thin MCP servers with service logic moved into the Agent SDK / shared daemons. This MVP should avoid overbuilding the final thin-server architecture while still introducing the queue/lease contract that a future daemon can own cleanly.

The Fix

Add a summarization coordination path for shared Memory Core deployments:

  1. Introduce a session-finished marker or equivalent memory/event that indicates a logical session is ready for summarization.
  2. Add a summary job claim with in-progress lease/token metadata so only one worker summarizes a session at a time.
  3. Add retry/expiry behavior for abandoned summary attempts.
  4. Ensure active sessions are skipped unless explicitly finalized.
  5. Expose enough status for operators/agents to see pending, in-progress, completed, and failed/expired summary jobs.
  6. Document shared-mode behavior and how it differs from early local startup auto-summary.

Acceptance Criteria

  • A finished logical session can be detected without relying on MCP server process shutdown.
  • Concurrent MCP server instances cannot summarize the same session in parallel.
  • In-progress summary work has an observable lease/token and expiry.
  • Failed or abandoned summarization can be retried without manual database edits.
  • Active/incomplete sessions are skipped by default.
  • The existing summarize_sessions path remains usable during migration.
  • Tests simulate concurrent summarization attempts and prove only one claim succeeds.

Out of Scope

  • Replacing the summarization model/provider selection.
  • Full SDK daemon extraction.
  • Team/private retrieval policy; that is tracked by #10010.
  • Purging raw memories or summaries; deletion/retention policy can be a follow-up if needed.

Avoided Traps / Gold Standards Rejected

  • Rejected: summarize on every MCP server boot. Shared deployments turn boot into an unreliable and duplicated trigger.
  • Rejected: assume process shutdown means session finished. Agent harnesses and MCP transports do not provide a stable enough lifecycle signal.
  • Gold standard retained: explicit lifecycle state. Finished, in-progress, completed, and abandoned states are data-layer facts rather than process-local guesses.

Related

  • Parent sub-epic: #10691
  • Parent cloud epic: #9999
  • Client-scoped session lifecycle sibling: to be linked under #10691
  • Team/private retrieval: #10010

Origin Session ID: d9cd4943-3285-47a6-b629-c05a9a2a38e4

Retrieval Hint: "Memory Core summarization coordinator finished session in progress lease shared MCP"

tobiu referenced in commit 8dcab2f - "feat(memory-core): add summarization job coordinator (#10693) (#10718) on May 4, 2026, 11:16 PM
tobiu closed this issue on May 4, 2026, 11:16 PM
tobiu referenced in commit ff62fbb - "feat(ai): v13 Project reconciliation script + observability-only docs (#10961) (#10963) on May 8, 2026, 4:40 PM