← Blog

Engineering · correctness memory

The correctness contract: what an agent memory layer should guarantee

By Rajamohan Jabbala · June 26, 2026

Every agent memory library publishes a recall number. Almost none publish what happens when the write path fails. But for an agent that actson its memory — edits code, books travel, answers a customer — the question that matters isn't "how often do you return the right memory?" It's "can I trust that what you stored is still true, and that you didn't quietly lose it?"

That's a different property than recall. It's a correctness contract — a short list of things the memory layer promises never to do. We reproduced four common failure modes where popular layers break that contract. Here is the contract CLS++ holds instead.

1. No silent loss

The guarantee

A write either lands durably or it surfaces as a failure. The fact is never discarded because an embedder timed out, returned an empty vector, or the extraction step came back blank. Degraded writes are flagged in metrics, not swallowed behind a 200.

2. No blind overwrite

The guarantee

When a new fact contradicts an old one ("I love X" → "I hate X"), the prior value is archived with lineage and timestamp — superseded, not destroyed. The agent answers with the current truth, and you can audit exactly what changed, when, and what it replaced.

3. Survives an infrastructure change

The guarantee

Switching embedding models or vector dimensions does not evaporate a window of memories. A fact is not lost because one index can't take its current vector — it stays retrievable while the index catches up.

4. Failures are observable

The guarantee

Anything that degrades — a dropped vector, a skipped extraction, a rejected dimension — is visible to you, not inferred from a confused user three days later. You can't fix what the library hides.

Why a contract beats a benchmark

A recall score is an average over the happy path. A contract is a promise about the worst case — and the worst case is where production agents actually get hurt. A silent loss isn't a slightly lower number; it's a wrong action taken with full confidence. That's the axis CLS++ is built and tested on, and it's the one almost no memory layer is measured against.

See the contract hold in 30 seconds — no signup.

Tell it something, contradict it, and watch the old value get archived with lineage instead of destroyed.

I'm onboarding a handful of design partners building agents on a memory layer. If you want to pressure-test yours against this contract — silent loss, blind overwrite, dimension switches — reach out and I'll wire up the reproductions with you.

Found this useful? Share it.