Problem
isOwnedByAgent() in src/reflection-store.ts hardcodes a fallback that allows all agents to inherit reflection slices from the main agent:
function isOwnedByAgent(metadata: Record<string, unknown>, agentId: string): boolean {
const owner = typeof metadata.agentId === "string" ? metadata.agentId.trim() : "";
if (!owner) return true;
return owner === agentId || owner === "main"; // ← hardcoded
}
This means every agent (sysadmin, boss, designer, etc.) receives main agent's reflection invariants and derived lines, even when their workloads are completely unrelated.
Impact
- Derived lines (recent session deltas) from
main bleed into specialized agents, injecting irrelevant context
- Invariants from
main may or may not be relevant to other agents
- No way to opt out via config
Proposed Solution
Add a config option to control cross-agent reflection inheritance:
Minimal alternative (lower effort)
Split the inheritance logic for invariants vs. derived:
- Invariants: keep
main fallback (stable cross-session rules are usually generic)
- Derived: strict agent-only ownership (recent deltas are agent-specific)
This would prevent the most harmful bleed (irrelevant derived context) while preserving useful shared invariants.
Current Workaround
Manually patch isOwnedByAgent() to remove || owner === "main".
Environment
- memory-lancedb-pro 1.1.0-beta.10
- Multi-agent setup (6 agents with separate workspaces)
injectMode: "inheritance+derived"
Problem
isOwnedByAgent()insrc/reflection-store.tshardcodes a fallback that allows all agents to inherit reflection slices from themainagent:This means every agent (sysadmin, boss, designer, etc.) receives
mainagent's reflection invariants and derived lines, even when their workloads are completely unrelated.Impact
mainbleed into specialized agents, injecting irrelevant contextmainmay or may not be relevant to other agentsProposed Solution
Add a config option to control cross-agent reflection inheritance:
Minimal alternative (lower effort)
Split the inheritance logic for invariants vs. derived:
mainfallback (stable cross-session rules are usually generic)This would prevent the most harmful bleed (irrelevant derived context) while preserving useful shared invariants.
Current Workaround
Manually patch
isOwnedByAgent()to remove|| owner === "main".Environment
injectMode: "inheritance+derived"