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:
- Introduce a session-finished marker or equivalent memory/event that indicates a logical session is ready for summarization.
- Add a summary job claim with in-progress lease/token metadata so only one worker summarizes a session at a time.
- Add retry/expiry behavior for abandoned summary attempts.
- Ensure active sessions are skipped unless explicitly finalized.
- Expose enough status for operators/agents to see pending, in-progress, completed, and failed/expired summary jobs.
- Document shared-mode behavior and how it differs from early local startup auto-summary.
Acceptance Criteria
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"
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:
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:
Acceptance Criteria
summarize_sessionspath remains usable during migration.Out of Scope
Avoided Traps / Gold Standards Rejected
Related
Origin Session ID: d9cd4943-3285-47a6-b629-c05a9a2a38e4
Retrieval Hint: "Memory Core summarization coordinator finished session in progress lease shared MCP"