The consolidation process does not check newly created memories during a run, causing duplicate active memories and orphaned entries when titles collide.
In src/functions/consolidate.ts, the code reads a snapshot of existing memories into the existingMemories array and initializes a Set named existingTitles.
Although new memory titles are added to this Set, the deduplication check on line 169 only searches the stale existingMemories array, rendering existingTitles unused dead code.
If multiple concept groups in the same run generate the same memory title, the second group will not find the newly created memory.
Instead of updating the existing memory, it creates duplicate active memories with identical titles and breaks the parent relationship chain.
The consolidation process does not check newly created memories during a run, causing duplicate active memories and orphaned entries when titles collide.
In src/functions/consolidate.ts, the code reads a snapshot of existing memories into the
existingMemoriesarray and initializes a Set namedexistingTitles.Although new memory titles are added to this Set, the deduplication check on line 169 only searches the stale
existingMemoriesarray, rendering existingTitles unused dead code.If multiple concept groups in the same run generate the same memory title, the second group will not find the newly created memory.
Instead of updating the existing memory, it creates duplicate active memories with identical titles and breaks the parent relationship chain.