MemorySync
Debugging / Scope check

Missing Memories

Almost every missing memory is a scope mismatch: a different project, a different end user, or a write that was never stored.

Checklist

Check the scope first

Work down this list before suspecting retrieval. Four of the five causes are a mismatch between the write and the read.

5 still to verify.

Proof

Prove the record exists

Fetch it directly by id. This separates “not stored” from “stored but not retrieved”, which are different problems with different fixes.

# 1. write, and keep the id
created = ms.add("The user prefers metric units.", tags=["preference"])

# 2. read it back directly — no ranking involved
record = ms.get(created.id)
print(record.id, record.tags, record.text)

# 3. only now try a query in the same scope
print(ms.query("Which units does the user prefer?", k=5).memories)

If step 2 works and step 3 returns nothing, it is a relevance problem. If step 2 fails, the record is not in the scope you are reading.

Was this page helpful?