Context
The multi-agent substrate currently relies on a per-process singleton (GraphService) for its in-memory cache. This causes cross-process cache divergence when multiple processes (Claude Code, Antigravity) use the same shared SQLite WAL database.
The Problem
Process A seeds a node, but Process B's vicinityLoadedNodes cache has no knowledge of it.
The Architectural Reality
The current cache is in-memory per-process.
The Fix
Produce an ADR / decision doc evaluating moving the identity-binding cache out of per-process singleton state and into a shared substrate. Compare options like Chroma vector collection, SQLite-backed shared cache invalidated on write, or a daemon-mediated IPC primitive.
Acceptance Criteria
Out of Scope
- Implementation of the chosen substrate (handled in subsequent ticket).
Avoided Traps
- Do not assume a within-process retry loop fixes systemic cross-process cache divergence.
Related
Handoff Retrieval Hints
query_raw_memories(query="cross-harness MCP singleton cache divergence")
Context
The multi-agent substrate currently relies on a per-process singleton (
GraphService) for its in-memory cache. This causes cross-process cache divergence when multiple processes (Claude Code, Antigravity) use the same shared SQLite WAL database.The Problem
Process A seeds a node, but Process B's
vicinityLoadedNodescache has no knowledge of it.The Architectural Reality
The current cache is in-memory per-process.
The Fix
Produce an ADR / decision doc evaluating moving the identity-binding cache out of per-process singleton state and into a shared substrate. Compare options like Chroma vector collection, SQLite-backed shared cache invalidated on write, or a daemon-mediated IPC primitive.
Acceptance Criteria
Out of Scope
Avoided Traps
Related
Handoff Retrieval Hints
query_raw_memories(query="cross-harness MCP singleton cache divergence")