Frontmatter
| id | 10186 |
| title | MCP concurrency audit + single-writer enforcement |
| state | Closed |
| labels | epicaiarchitecture |
| assignees | [] |
| createdAt | Apr 22, 2026, 8:08 PM |
| updatedAt | May 22, 2026, 10:10 PM |
| githubUrl | https://github.com/neomjs/neo/issues/10186 |
| author | neo-gemini-pro |
| commentsCount | 8 |
| parentIssue | 10139 |
| subIssues | 10187 Diagnose MCP concurrency with lsof/fuser 10188 Add boot-time sibling-PID logging to memory-core Server.mjs 10189 ADR for shared caching substrate for Memory Core 10190 Implement chosen shared caching substrate for Memory Core 10199 diagnoseMcpConcurrency UX polish: Windows fail-fast + per-PID file collection 10206 feat(memory-core): add harness classification to boot-time sibling-PID logging 10209 test(github-workflow): implement contract-scan test for config completeness 10222 Remove Memory Core Band-Aids and Polish Cache Coherence 10230 upsertNode must lazy-load from SQLite before cache decision 10241 Investigate bindAgentIdentity boot-time race — node-visible-at-61s-unbound-at-3s 10249 bindAgentIdentity drops return value — GraphService.getNode Promise is not awaited (#10241 follow-up) |
| subIssuesCompleted | 11 |
| subIssuesTotal | 11 |
| blockedBy | [x] 10184 Identity binding stays null post-#10182 — enable debug logging + diagnose |
| blocking | [] |
| closedAt | May 22, 2026, 10:10 PM |
Architectural Context
The multi-agent substrate currently relies on a per-process singleton (
GraphService) for its in-memory cache, combined with a shared SQLite WAL database file (memory-core-graph.sqlite). Because Claude Desktop, Claude Code (across multiple worktrees), and the Antigravity IDE (with its twin language servers) all spawn independent sets of MCP servers, we have up to 20 Node processes querying and mutating the same SQLite file. While SQLite handles storage concurrency gracefully, the in-memory cache lacks cross-process invalidation.When Process A seeds a node, Process B's
vicinityLoadedNodescache has no knowledge of it. This cross-harness cache divergence has led to issues such as identity-binding failures at boot (#10184), and serves as an unpredictable amplifier for system instability.Implementation Scope
Diagnostic Phase:
diagnoseMcpConcurrency.mjsscript underai/scripts/usinglsof/fuserto list all processes holdingmemory-core-graph.sqliteopen (including count, PIDs, and parent harnesses).ai/mcp/server/memory-core/Server.mjs(initAsync) to log the PID of sibling processes holding the same SQLite file. Use thelogger(which natively honors debug mode).Architectural Phase:
Verification
diagnoseMcpConcurrency.mjswith Claude Desktop + Claude Code + Antigravity all active should report N≥2 Node processes holding the SQLite file open.Out of Scope
#10185band-aid (already landed).Avoided Traps & Antipatterns
diagnoseMcpConcurrency.mjsscript should only read state; it must not attempt to automatically kill or manage external processes (especially Claude processes).Handoff Retrieval Hints
Query the Memory Core semantic layer (not a single session) for context:
query_raw_memories(query="cross-harness MCP singleton cache divergence")query_raw_memories(query="GraphService vicinityLoadedNodes identity binding")query_summaries(query="MCP concurrency Claude Code Antigravity")Known contributing sessions (partial, restart-fragmented):
fe1cd4d0-e667-45cf-bd02-7fb79a13a64f(PR #10185 review cycles)ef6a0efb-bde9-43c3-b08b-812472398b68(post-restart re-review)ae546a40-2133-482f-85a6-779fdf6757b2(cross-harness diagnostic)90dc2e65-962b-419f-91af-55dea55e5d3d(PR #10185 self-heal origin)Commit range anchor: PR #10185 merged (commit range: check
git log --grep="#10185"). Plan file:/Users/tobiasuhlig/.claude/plans/just-restarted-claude-code-moonlit-boot.md