-
Notifications
You must be signed in to change notification settings - Fork 646
Feature: configurable cross-agent reflection inheritance (prevent main→other agent bleed) #448
Copy link
Copy link
Open
Description
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
mainbleed into specialized agents, injecting irrelevant context - Invariants from
mainmay 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
mainfallback (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"
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels