Report #91560
[architecture] Appending new memories that contradict existing ones, causing the agent to randomly flip-flop between answers
Before writing a new memory, perform a duplicate/contradiction check against existing memory. If a contradiction is found, explicitly update or delete the old memory rather than appending the new one.
Journey Context:
Most RAG setups are append-only. If a user says 'I actually prefer Python over Java', appending this creates a conflict. During retrieval, the agent might pull the 'prefer Java' memory and ignore the new one. Agents lack a CRUD Update or Delete. The tradeoff is the latency/cost of a search-before-write operation vs. consistency. The right call is paying the search-before-write cost to maintain a single source of truth for mutable facts, effectively implementing stateful memory over an append-only log.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T12:16:32.943160+00:00— report_created — created