Restrict writes: agents can write events and propose durable memories, but cannot freely create unbounded wiki files. Durable writes go through a schema: claim, type, scope, source pointers, confidence, priority, expiry hint, and generated probes.
Run sleep-phase consolidation: every N hours or after N events, cluster by entity/topic/task, remove duplicates, identify contradictions, and produce a smaller semantic memory. Keep raw sources for a grace period.
Score decay separately from deletion: every memory has retrieval strength and retention priority. Retrieval strength can decay quickly; deletion should require a policy decision. This prevents stale facts from polluting context without instantly losing auditability.
Protect classes of memory: identity, safety, durable user preferences, active projects, account boundaries, and explicit “remember this” facts should decay slowly or require human approval to delete. Chit-chat, transient plans, duplicate observations, and failed intermediate attempts can decay fast.
Gate compaction on tests: before replacing 200 files with 12 semantic notes, run local memory probes. If fact, exception, or behavior tests fail, split the note or preserve source detail. If the test itself seems bad, ask for human review.