Skip to content

Superseded memories are kept forever: let them expire or be cleaned up #441

Closed

Description

@itsskofficial

Since #436 (#152), a memory replaced by a newer one (for example "lives in Pune" after "moved to Bengaluru") is kept as superseded history instead of being deleted. It's left out of prompts and only listed when asked for. Nothing ever removes it, though, so they pile up, and a user who wants something gone has to find the old version too.

Idea:

  • a config option such as memory.keep_superseded_days (default 180, 0 = forever), with a description so Settings shows it;
  • the nightly memory job deletes superseded memories older than that, through the same cascading delete feat(memory): source links, confidence and state, and deletes that cascade #436 added (vectors, links, summaries, insights' evidence);
  • deleting a current memory offers to delete its earlier versions too.

Where: sentient/memory/facts.py (states and cascading delete from #436), the nightly job in sentient/memory/dreaming.py, and config/schema.py.

Done when: a superseded memory older than the setting is gone after the nightly run, along with everything derived from it, and current memories are untouched. Add tests for both.

Activity

  1. wpyaoxueros commented on Oct 17, 2026

    @wpyaoxueros
    Contributor

    /assign

  2. github-actions commented on Oct 17, 2026

    @github-actions

    @wpyaoxueros Assigned to you. Open a PR within a week or comment if you need more time.

  3. wpyaoxueros commented on Oct 17, 2026

    @wpyaoxueros
    Contributor

    /assign

  4. github-actions commented on Oct 17, 2026

    @github-actions

    @wpyaoxueros This one is already assigned to you. Open a PR within a week or comment if you need more time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: memoryFacts, user model, nightly consolidationenhancementNew feature or requestgood first issueGood for newcomerspriority: P2Later: useful, lower urgencysize: SSmall: a few days

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions