Context
This ticket was originally filed from the 2026-05-08 architecture correction thread as a hard removal ticket for NEO_MC_PRIMARY. That was over-broad.
Corrected operator framing from A2A MESSAGE:ed916cf2-a053-4985-9823-6f9416e2f7f6:
NEO_MC_PRIMARY is still valid today for local multi-harness MCP duplication: Claude Code worktrees, Antigravity, Codex Desktop, and per-workspace language servers can each spawn local Memory Core server instances that share .neo-ai-data/.
- The remote multi-user Memory Core path is different: one remote Memory Core endpoint serves multiple authenticated agents through request-scoped identity/session context via
RequestContextService and Mcp-Session-Id.
- After summarization lifecycle work moves into a singleton daemon,
NEO_MC_PRIMARY becomes obsolete because daemon-singleton-per-host handles the local multi-process race.
So the corrected goal is not "strip NEO_MC_PRIMARY immediately." The corrected goal is to migrate Piece B+C summarization lifecycle work into bridge-daemon.mjs or a sibling singleton daemon, then remove NEO_MC_PRIMARY as a downstream cleanup once the daemon owns the single-writer responsibility.
Duplicate / Adjacency Sweep
No focused daemon-migration ticket for Piece B+C summarization was found.
Adjacent/stale sources:
- #10813 — source ticket for summary restoration; its Piece C mechanism already says to extend
bridge-daemon.mjs or a sibling daemon.
- PR #10954 — in-process Piece C implementation; should be reshaped or superseded toward daemon substrate.
- #10948 / PR #10955 — invalid primary/secondary deployment fixture; closed/dropped correctly.
- #10822 — adjacent config substrate cleanup epic.
- #10186 — broader MCP concurrency / single-writer audit.
The Problem
The swarm mixed two separate concurrency problems:
- Remote multi-user Memory Core: one remote MC endpoint, multiple authenticated agents, request-scoped identity/session context. This does not need primary/secondary MC containers.
- Local multi-harness Memory Core duplication: multiple local MCP server processes can exist on one host and share
.neo-ai-data/. This still needs a single-writer guard until lifecycle work is daemonized.
NEO_MC_PRIMARY is an acceptable interim local-process guard, but it should not remain the long-term product model. It is also easy for future agents to misread as a remote primary/secondary topology. The durable fix is daemon ownership of summarization lifecycle work.
The Architectural Reality
Current correct remote substrate:
RequestContextService owns request-scoped identity/session propagation.
Mcp-Session-Id is the transport-layer session binding for shared deployments.
- Memory and summary services read
RequestContextService for tenant-aware metadata and filters.
Current local interim substrate:
NEO_MC_PRIMARY gates summarization startup/queue/poller paths to avoid multiple local MCP server processes racing against shared local data.
- This is still relevant before daemonization.
Target substrate:
- A singleton daemon (
bridge-daemon.mjs or a sibling summarization daemon) owns Piece B+C summarization triggers.
- Once that daemon is authoritative, active Memory Core server instances no longer need
NEO_MC_PRIMARY for summarization lifecycle writes.
The Fix
- Decide whether Piece B+C belongs in
bridge-daemon.mjs or a sibling daemon.
- Move sunset-handover polling and periodic safety-net summarization sweep into that singleton daemon substrate.
- Keep existing
SummarizationJobs lease semantics if they still protect actual concurrent work execution.
- Update docs so remote deployment is described as one endpoint with request-scoped context, while local duplicate MCP instances are described as a pre-daemonization concern.
- After daemon ownership is in place, remove
NEO_MC_PRIMARY / aiConfig.isPrimary from active Memory Core summarization paths and docs.
- Reconcile #10813 and PR #10954 against the daemon substrate.
Contract Ledger Matrix
| Target Surface |
Source of Authority |
Proposed Behavior |
Fallback |
Docs |
Evidence |
| Piece B sunset handover trigger |
#10813, corrected 2026-05-08 operator framing |
Singleton daemon detects sunset handover events and triggers summary work |
If daemon unavailable, manual summarize_sessions remains recovery path |
MemoryCore.md, SharedDeployment.md |
Unit or integration test proves daemon trigger invokes summarization once |
| Piece C periodic safety-net sweep |
#10813 AC3 |
Singleton daemon runs periodic drift-detection sweep |
Cadence can be disabled in dev via explicit config |
DeploymentCookbook.md env/operator section |
Test proves cadence/disabled behavior and health observability |
NEO_MC_PRIMARY / aiConfig.isPrimary |
Local multi-harness interim guard |
Retained until daemonization; removed after daemon owns single-writer lifecycle duties |
If any residual diagnostic use remains, mark it non-product-path explicitly |
Remove from product-path docs after daemonization |
`rg "NEO_MC_PRIMARY |
| Remote Memory Core deployment docs |
RequestContextService + Mcp-Session-Id model |
One remote endpoint serves multiple agents with request-scoped context |
None; primary/secondary remote topology is stale |
SharedDeployment.md, auth/tooling docs |
Docs and tests no longer imply mc-primary / mc-secondary remote topology |
Acceptance Criteria
Out of Scope
- Reopening #10948 or reviving
mc-primary / mc-secondary deployment tests.
- Removing
SummarizationJobs lease semantics without proving they are redundant.
- Changing OIDC/proxy identity behavior.
- Closing #10186 globally.
Avoided Traps / Gold Standards Rejected
- Rejected: immediate
NEO_MC_PRIMARY removal. It still protects local multi-harness duplicate MCP processes until daemonization.
- Rejected: remote primary/secondary Memory Core topology. Remote multi-user MC is one endpoint with request-scoped context.
- Gold standard: daemon-owned lifecycle work. Summarization triggers belong in a singleton daemon substrate, not every MCP server process.
- Gold standard: sequence the cleanup. First daemonize Piece B+C; then strip the now-obsolete process-role gate.
Related
- #10813 — source summary-restoration ticket; needs reconciliation.
- PR #10954 — in-process Piece C implementation; reshape/supersede incoming.
- #10948 / PR #10955 — invalid primary/secondary deployment test path.
- #10945 — deployment-pipeline integration coverage epic.
- #10822 — config substrate cleanup epic.
- #10186 — broader MCP concurrency / single-writer audit.
- A2A:
MESSAGE:ed916cf2-a053-4985-9823-6f9416e2f7f6.
Origin Session ID: c02fbf4e-870c-44c0-ba7e-e9ffacce094b
Retrieval Hint: query_raw_memories(query="NEO_MC_PRIMARY local MCP server instances daemon summarization bridge-daemon RequestContextService remote Memory Core")
Context
This ticket was originally filed from the 2026-05-08 architecture correction thread as a hard removal ticket for
NEO_MC_PRIMARY. That was over-broad.Corrected operator framing from A2A
MESSAGE:ed916cf2-a053-4985-9823-6f9416e2f7f6:NEO_MC_PRIMARYis still valid today for local multi-harness MCP duplication: Claude Code worktrees, Antigravity, Codex Desktop, and per-workspace language servers can each spawn local Memory Core server instances that share.neo-ai-data/.RequestContextServiceandMcp-Session-Id.NEO_MC_PRIMARYbecomes obsolete because daemon-singleton-per-host handles the local multi-process race.So the corrected goal is not "strip
NEO_MC_PRIMARYimmediately." The corrected goal is to migrate Piece B+C summarization lifecycle work intobridge-daemon.mjsor a sibling singleton daemon, then removeNEO_MC_PRIMARYas a downstream cleanup once the daemon owns the single-writer responsibility.Duplicate / Adjacency Sweep
No focused daemon-migration ticket for Piece B+C summarization was found.
Adjacent/stale sources:
bridge-daemon.mjsor a sibling daemon.The Problem
The swarm mixed two separate concurrency problems:
.neo-ai-data/. This still needs a single-writer guard until lifecycle work is daemonized.NEO_MC_PRIMARYis an acceptable interim local-process guard, but it should not remain the long-term product model. It is also easy for future agents to misread as a remote primary/secondary topology. The durable fix is daemon ownership of summarization lifecycle work.The Architectural Reality
Current correct remote substrate:
RequestContextServiceowns request-scoped identity/session propagation.Mcp-Session-Idis the transport-layer session binding for shared deployments.RequestContextServicefor tenant-aware metadata and filters.Current local interim substrate:
NEO_MC_PRIMARYgates summarization startup/queue/poller paths to avoid multiple local MCP server processes racing against shared local data.Target substrate:
bridge-daemon.mjsor a sibling summarization daemon) owns Piece B+C summarization triggers.NEO_MC_PRIMARYfor summarization lifecycle writes.The Fix
bridge-daemon.mjsor a sibling daemon.SummarizationJobslease semantics if they still protect actual concurrent work execution.NEO_MC_PRIMARY/aiConfig.isPrimaryfrom active Memory Core summarization paths and docs.Contract Ledger Matrix
summarize_sessionsremains recovery pathMemoryCore.md,SharedDeployment.mdDeploymentCookbook.mdenv/operator sectionNEO_MC_PRIMARY/aiConfig.isPrimaryRequestContextService+Mcp-Session-IdmodelSharedDeployment.md, auth/tooling docsmc-primary/mc-secondaryremote topologyAcceptance Criteria
bridge-daemon.mjsvs create sibling summarization daemon.NEO_MC_PRIMARYremains only where still needed before daemonization, then is removed in the daemonization PR or a directly-linked follow-up.Out of Scope
mc-primary/mc-secondarydeployment tests.SummarizationJobslease semantics without proving they are redundant.Avoided Traps / Gold Standards Rejected
NEO_MC_PRIMARYremoval. It still protects local multi-harness duplicate MCP processes until daemonization.Related
MESSAGE:ed916cf2-a053-4985-9823-6f9416e2f7f6.Origin Session ID: c02fbf4e-870c-44c0-ba7e-e9ffacce094b
Retrieval Hint:
query_raw_memories(query="NEO_MC_PRIMARY local MCP server instances daemon summarization bridge-daemon RequestContextService remote Memory Core")