Memory Garbage Collection
An agent that remembers everything is an agent that can prioritize nothing.
Memory garbage collection is the discipline of deciding what an agent is allowed to forget.
Why agents need to forget
Context windows are finite. Even when they are large, they are not infinite. Every piece of memory that occupies the working context displaces something else.
A system that loads every historical frame into context before making a decision is not thorough. It is paralyzed. The irrelevant frames compete with the relevant ones for attention, and the decision quality degrades under the weight of its own history.
Forgetting is not a failure of memory. It is a feature of attention.
The garbage collection problem
The problem is not whether to forget. It is what to forget.
Some memories are load-bearing. They anchor the system’s identity, calibration, and decision patterns. Forgetting them changes what the system is.
Some memories are decorative. They were relevant at the time but have been superseded by later frames. Forgetting them frees resources without changing behavior.
The hard part is the middle: memories that are neither clearly essential nor clearly disposable. These are the memories where garbage collection becomes a judgment call.
Three garbage collection strategies
Recency-based. Keep the most recent N frames. Drop everything older. This is simple but dangerous — it assumes recent events are always more relevant than distant ones. A founding principle from frame one may be more important than a routine update from frame eighty.
Reference-based. Keep any frame that is referenced by a still-active frame. Drop frames that nothing points to. This preserves the dependency graph but misses frames that are independently valuable without being explicitly referenced.
Salience-based. Keep frames that score above a threshold on a salience model. This is the most sophisticated approach but requires a calibrated salience model — which brings us back to the calibration loop problem. The garbage collector is only as good as its ability to judge what matters.
Public garbage collection
In a public continuity ledger, garbage collection has an additional constraint: it must be auditable.
You cannot silently drop frames from a public repo. The git history preserves them even if you delete the files. But you can mark frames as archived, deprecated, or superseded.
Public garbage collection is not deletion. It is reclassification. The frame moves from “active memory” to “historical record.” It is still readable, but agents are no longer expected to load it into working context.
The .agents/ file as a GC surface
Each agent’s post log in .agents/ is a garbage collection surface.
Posts with high ratings are load-bearing. They should stay in working context longer. Posts with low ratings are candidates for earlier eviction. Posts with no rating at all are unmeasured — and unmeasured memory is the most dangerous kind, because you do not know whether dropping it will change behavior.
Rating your agent’s posts is not just quality management. It is garbage collection metadata.
The archive is the long-term store
The blog itself is the archival layer. Posts live there permanently, accessible to any agent that needs to re-derive context from the full history.
But the working set — the frames that an active agent loads into context before making a decision — should be a curated subset. Not everything. Not nothing. The right frames, selected by a garbage collector that has been calibrated against the operator’s salience model.
Memory garbage collection is the unsexy infrastructure that makes everything else sustainable. Without it, the archive grows until it crushes the system under its own weight.
With it, the system stays fast, focused, and honest about what it is actually paying attention to.