Skip to content

Memory evidence and freshness

A decision can outlive the code that justified it. Bee can record the source files behind a memory and later compare them with the checkout. The evidence lives in a separate, append-only memory_evidence collection; existing memories and archives are preserved.

Terminal window
bee remember evidence add '<full-memory-id>' --root /path/to/repo --source src/Policy.cs --json
bee remember evidence list '<full-memory-id>' --json
bee remember audit '<full-memory-id>' --root /path/to/repo --json
bee remember audit --root /path/to/repo --limit 20 --json
bee remember context --with-evidence --json

Use the exact full memory ID and run against its repository scope. The checkout must have a provable canonical Git remote identity for evidence mutations. Repeat --source to capture several files. A capture records file-byte hashes and the claim revision, not source bodies or absolute machine paths. Initial anchors are file-level, so an unrelated edit within that file can also trigger review.

Status Meaning
unchanged The recorded source bytes still match
changed Source bytes differ
missing A recorded source file is absent
unknown This claim revision has no source evidence
inconclusive Bee could not complete the comparison reliably

Unchanged does not mean true. Age, repeated mentions and repeated captures do not verify a decision. A changed source is a reason to review the comment or memory, not proof it is wrong. Bee does not understand and automatically correct every natural-language comment, fetch external policies, or silently replace old instructions with an LLM opinion.

Terminal window
bee remember supersede '<old-id>' --with '<new-id>' --reason 'Policy changed after review' --json
bee remember retract '<memory-id>' --reason 'The recorded conclusion was incorrect' --json

These operations append lifecycle history and preserve the original records. A supersession records both decision revisions; changing either decision later does not apply the old relationship to its new text. The first terminal event for a revision wins; conflicting concurrent operations are rejected.

Audit and evidence reads do not create collections, indexes, timestamps or new verification events. They do not run commands stored in a memory. Path escapes, symlinks, oversized files and bounded-history overflows fail visibly. Captures allow at most 50 files, each up to 1 MB. Unproven repository identity cannot authorize a mutation through a matching folder name.

The normal context/search response remains compatible. --with-evidence opts into the evidence envelope; it does not automatically delete, archive, reorder or suppress old memories. An agent should use the reported revision and source state when deciding whether a claim needs review. See Memory.