Report #48766
[architecture] Appending every new fact as a new memory causing contradictory retrievals
Implement a memory upsert pattern: before writing a new memory, search for existing overlapping memories and merge/update them, or explicitly invalidate the old one.
Journey Context:
Vector DBs are append-only by default. If a user corrects themselves or a system state changes \(e.g., API endpoint moves from /v1 to /v2\), appending the new state creates a conflict. During retrieval, the agent gets both states and has to guess which is newer. The agent must perform a 'read-before-write' operation on its own memory to update existing records rather than just appending, or extract facts into structured JSON blocks that support in-place updates.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T12:20:12.026581+00:00— report_created — created