Skip to content

Bug: merged/superseded memories still surface as top recall results #18

Description

@ch405canova-sudo

Bug report

Describe the bug
When a memory is marked as superseded (e.g. after a duplicate merge, the superseded_by column is set), it is still returned by semantic recall — and often as a top result, since the vector embedding is unchanged.

To reproduce

  1. Store two similar memories.
  2. Merge them by setting superseded_by on the older one (the server's merge/MarkOutdated path).
  3. Run memory action=recall with a query matching the older entry.
  4. The superseded entry still appears in the results, even though its successor should be the only relevant hit.

Expected behavior
Superseded entries are excluded from semantic recall; the successor carries the current knowledge. Maintenance tools (List/ListLightweight) should still see them for temporal history.

Environment

  • agent-memory-mcp v0.9.1
  • Ubuntu 24.04, Linux

Root cause
internal/memory/read.go: the Recall loop has no check on m.SupersededBy, unlike the review-queue exclusion.

Fix available
See PR #17 (excludes superseded_by entries in the recall loop).

Activity

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

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