Skip to content

Same title consolidation produces duplicate and orphaned memories #747

@abhinav-m22

Description

@abhinav-m22

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions