Report #23102
[architecture] Retrieved memories from previous, unrelated tasks pollute the current prompt, causing the agent to hallucinate or mix instructions
Isolate memory retrieval by task or session ID, and enforce strict semantic similarity thresholds combined with recency scoring. Always prepend retrieved memories with explicit provenance \(e.g., 'Context from previous task X'\) so the LLM knows it's background, not current instruction.
Journey Context:
When an agent retrieves memories via vector similarity, it often pulls in facts from a completely different workflow that just happened to share keywords \(e.g., retrieving an old API key format when generating a new one\). LLMs are highly susceptible to treating retrieved context as absolute truth or current instruction. Filtering by namespace/session ID prevents cross-contamination, and explicitly tagging the memory as 'historical context' prevents the LLM from conflating it with the current system prompt.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T17:11:09.266700+00:00— report_created — created