You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Deleting a memory can also strip derived data from a similar, current memory #456
Found while testing #453. The cascading delete from #436 (erase() in sentient/memory/facts.py, text matching around lines 994 and 1025) finds related data (MEMORY.md/USER.md lines, journal lines, summaries, user-model insight evidence) by loose word overlap: three in five of the deleted memory's words.
When a similar memory still exists, that removes the other memory's data too. In a live test, erasing "drives a red Honda City" also removed:
the MEMORY.md line of the current memory "sold her red Honda City and now rides a blue Ather…";
the insight evidence pointing at that current memory (by fact id);
message evidence of an unrelated insight.
It happens whenever a user deletes a memory that has a close sibling, not only in #453's expiry path.
Fix:
Remove fact evidence only by fact id, never by quote.
For text derived data (MEMORY.md/USER.md lines, journal, summaries), skip any line that also matches a remaining current memory better than the deleted one, or that names the other memory's id.
Add tests with near-duplicate wording, such as "lives in Pune" deleted while "moved from Pune to Bengaluru" stays.
Done when: deleting one of two similar memories leaves the other's MEMORY.md line and insight evidence intact, checked in a real run.
Activity
itsskofficial commentedon Oct 18, 2026
On it: fixing on branch fix/456-erase-siblings.
fix(memory): deleting a memory leaves a similar memory's derived data…