← Back to blog

The Two-Factor Hypothesis for Agent Memory Compaction

One cooling rate can kill a red blood cell and an egg at once, for opposite reasons. Agent memory fails the same way.

Published July 2026 · 9 min read · agent memory / compaction / cryobiology / systems design


Put a human red blood cell and a human egg cell in the same freezer, pick one careful cooling rate, and you can kill both at once, for opposite reasons. At one degree per minute, a rate that suits an ordinary tissue-culture cell perfectly well, the red blood cell dies of thirst and the egg dies of ice. The red cell wanted to be cooled hundreds of times faster; at this leisurely pace it sits too long in a freezing solution that grows saltier and saltier as ice forms around it, and it shrivels. The egg wanted to be cooled several times slower; at this pace it freezes before it can dry itself out, and ice crystallizes inside it and tears it apart. One setting. Two corpses. Two contradictory causes. This is the single most important fact in cryopreservation, and I want to convince you it is also, unexpectedly, the single most useful thing to understand about how AI agents lose their memory.

Mazur's valley

In 1972, three biologists at Oak Ridge National Laboratory, Peter Mazur, Stanley Leibo, and Ernest Chu, published a paper in Experimental Cell Research with a title that sounds dry and was quietly revolutionary: "A Two-Factor Hypothesis of Freezing Injury." They were studying Chinese hamster cells, and they resolved a long-running confusion about why freezing kills cells by showing that it kills them in two entirely different ways, depending on how fast you cool.

Cool too slowly, and the cell dies of what cryobiologists call solution effects. Here is the mechanism, and the mechanism is the whole point, so it is worth getting exactly right. When you cool a cell suspension slowly, ice starts forming in the fluid outside the cells first. Pure water leaves the solution to join the ice, which means the unfrozen fluid that remains gets more and more concentrated with salt and other solutes. The cell, sitting in this increasingly briny leftover, loses its own water by osmosis and is slowly poisoned and crushed by concentration. Notice what does the killing: not the cold itself, but the concentration. The cell is not too frozen. It is too shriveled, marinated to death in the solution it was left sitting in.

Cool too fast, and the opposite happens. The cell has no time to lose its water osmotically before the temperature crashes, so the water still inside it freezes where it sits. Intracellular ice is lethal, essentially always. The cell dies not from concentration but from crystals forming in its interior.

Plot survival against cooling rate and you get an inverted U. Near-total death at slow rates, from solution effects. Near-total death at fast rates, from internal ice. And a peak of survival at some intermediate rate, in a narrow valley between the two lethal mechanisms. Mazur's work dispelled the then-popular belief that faster cooling was universally safer, and replaced it with something more demanding: the safe rate is a compromise between two opposite ways to die.

Then comes the fact that makes this an essay rather than a curiosity. The location of that peak is not a universal constant. It moves, enormously, depending on the cell.

The thousand-fold spread

The optimal cooling rate is set by how fast a given cell can shed its water before ice forms inside it, and that depends on the cell's plumbing: its membrane permeability to water and its ratio of surface area to volume. A small cell with a leaky membrane sheds water fast and can dodge internal ice even when cooled quickly. A large cell with a tight membrane cannot, and must be cooled slowly enough to dry out in time.

The numbers, drawn from decades of cryopreservation practice, span a startling range. Red blood cells, tiny and highly permeable, want cooling rates on the order of hundreds of degrees per minute. General somatic cells sit near one degree per minute. Stem cells want something slower, roughly one degree per minute or less. Oocytes and embryos, large and low in surface-to-volume ratio, want a tenth of a degree per minute or slower. (Treat these as orders of magnitude rather than precise constants, because the real optimum depends on the cryoprotectant, the medium, and the cell line. The spread and its cause are robust; any single number is protocol-dependent.) From a red blood cell to an egg cell, the optimal rate spans something like a thousandfold.

Which is why my opening image works. A single cooling protocol does not cost you a few percent at the margins across different cell types. Apply the egg's slow rate to a red blood cell and you dehydrate it; apply the red cell's fast rate to an egg and you fill it with ice. A one-size-fits-all rate lands most cell types on a lethal wall of their own curve. There is no universal cooling rate, and fifty years of evidence says there never will be, because the optimum is a property of the specific cell, not of freezing in general.

Hold that shape in your head, because agent memory has it exactly.

Compaction is cooling

Every serious AI agent has to compact its memory. Context windows are finite, conversations and task histories are not, so something has to decide what from the past gets carried forward and in what compressed form. Summarize the last hour into a paragraph. Roll up the project history into a brief. Write a few durable notes and drop the rest. This is not optional plumbing; it is the mechanism by which an agent that runs longer than its context can still know what it is doing. And it is cooling, in Mazur's precise sense, because it is a rate: how aggressively you compress memory per unit of history. (A companion piece on this blog, The Two-Process Model of Agent Workload Compaction, comes at the same problem from a different biological angle, the question of when to consolidate rather than how hard to compress.)

Run that rate too aggressively and you get the dehydration death. Compress the context too hard and you do not simply lose information, you concentrate it. The specifics boil off like water leaving the solution, and what remains is high-level gist grown too concentrated to use. "The user reported several issues with the payment flow and we resolved them" is a summary that has been cooled too slowly, marinated in abstraction until the actual solutes, which ticket, which error code, which fix, which caveat, have crowded out every usable specific. The memory is technically present and functionally dead. This is the subtle failure, and it is subtle in exactly the way slow-cool death is subtle: nothing was deleted. The record still sits there, looking like a memory. It was concentrated past the point of use.

Run the rate too conservatively and you get the ice death. Keep everything, compact nothing, and the raw store grows into an undifferentiated mass that has never been organized. Then, under retrieval pressure, when the agent needs to pull the relevant piece and instead the retriever crystallizes the store the wrong way, the un-compacted record shatters into incoherent fragments: chunks retrieved out of order, entries whose context froze before it was ever structured, fields that fracture because nothing ever imposed a shape on them. The information was all technically retained. It formed ice inside the record because it was never dried into a usable structure in time.

And here is the property that makes this genuinely hard, the one Mazur's cells teach and most compaction designs ignore: the two deaths look identical from the outside. A dead cell is a dead cell; you cannot tell by looking whether it died of dehydration or of ice. A useless memory is a useless memory; "the agent's recall is bad" does not tell you whether you over-compressed into vague gist or under-compressed into unretrievable sprawl. The two failures have opposite causes and the same symptom, which means the instinctive fixes are a coin flip. A team seeing bad recall and reaching for "summarize more aggressively" has a fifty-fifty chance of being on the dehydration wall already and cooking their memory harder. The outcome cannot diagnose the mechanism. You have to know which wall you are on.

The hypothesis, stated plainly

Most production compaction operates as if the failure were one-sided. There is a "retain more" camp that treats memory loss as the only enemy and a "compress more" camp that treats context bloat as the only enemy, and both are arguing about which direction to move along a single axis. Mazur's cells say the axis has two lethal ends and a peak in between, and that moving in either direction from the peak kills you. "Summarize less" and "compress more" are both wrong when you are near the optimum, because both are directions, and the answer is not a direction. It is a rate, chosen correctly.

And then the thousandfold spread lands the real claim, the one in this essay's title. In cryobiology the optimal rate is not one number because it depends on the cell type. My hypothesis is that agent memory has cell types too, and that they differ in their optimal compaction rate as dramatically as a red blood cell differs from an egg.

Consider three genres of what an agent needs to remember. Factual recall: specific values, names, IDs, decisions, the discrete facts a task turned on. Operational fluency: how to do a recurring thing, the procedure, the working style, the accumulated feel for a codebase or a workflow. Relational or emotional state: what this user prefers, the tone that works with them, the history of what went well and badly between you. These are different cells. Factual recall is small and permeable; the gist of a fact often survives aggressive summarization intact, because a fact compresses to something that is still a fact ("the API key rotated on the third" stays useful when squeezed hard). Operational fluency and relational state are large, low-permeability cells. Compress operational memory too hard and you get a procedure with the load-bearing exceptions boiled off, fluent and wrong. Compress relational memory too hard and you get "the user likes concise answers," a sentence that has dehydrated away every specific that made the relationship legible. These genres do not shatter or shrivel at the same rate, and a single compaction policy applied across all of them is precisely the one-size-fits-all cooling protocol that lands most of them on a lethal face of their own curve.

That is the two-factor hypothesis for agent memory compaction: compaction failure is a two-sided valley, not a one-sided cliff; the optimum is genre-specific and the genres span a wide range; and a uniform compaction rate, however carefully tuned, is tuned correctly for at most one genre and wrong for the rest.

I should be honest about what is established and what is proposed. The cryobiology is settled science, fifty years old and universally taught. The three-genre taxonomy is a hypothesis, which is why the word is in the title. I am not claiming measured optimal compaction rates for factual versus relational memory; I am claiming the morphology transfers, that the morphology predicts a specific and testable failure, and that the prediction matches what long-running agents actually do when their memory degrades.

What to do at the freezer

The cryobiologists did not solve their problem by finding the one true cooling rate. They solved it by refusing to look for one. Four moves translate directly.

First, stop asking "are we compressing too much or too little" as though it were one question with one answer, and start asking it per genre. Classify what you are about to compact before you choose how hard to compact it. A compaction policy that reads the memory type first, and applies a different rate to a decision log than to a relationship history, is doing the one thing the biology says matters. A policy that applies one rate to everything has already lost most of the population, whatever that rate is.

Second, diagnose which wall you are on before you turn a knob, because the symptom will not tell you. When recall degrades, do not reflexively summarize harder or retain harder. Look at the failure's shape. Is the memory present but vague, a confident gist with no usable specifics? That is dehydration, and compressing harder makes it worse. Is the memory technically all there but retrieved as incoherent fragments? That is ice, and retaining more raw material makes it worse. Same symptom, opposite treatments, and guessing has even odds of killing the patient.

Third, respect that concentration, not deletion, is the quiet killer. The failure everyone watches for is "we dropped something important." The failure that actually gets you is "we kept it, but concentrated it past the point of use." Instrument for the second one. A summary that is short and fluent and contains no recoverable specific is not a good summary; it is an over-cooled cell that looks fine and is dead. Measure whether a compacted memory can still answer the specific question it was supposed to preserve, not whether it reads well.

Fourth, remember that the optimum is narrow, and treat it that way. Mazur's survival peak is not a broad plateau you can casually land on; it is a valley between two cliffs. Agent compaction rates deserve the same respect that cryoprotocols get: measured, genre-specific, and revisited when the cell type changes. The teams whose agents stay coherent over long horizons are not the ones who compress least or retain most. They are the ones who stopped believing there was a single right amount of memory to keep, and started cooling each kind of memory at its own rate.


Sources

Measure whether a compacted memory can still answer the question it was meant to preserve.

The dehydration death is invisible if you only check that a summary reads well; you catch it by asking whether the specific fact survived the squeeze. That is easier when the agent keeps a durable, queryable record of what it actually did alongside the compacted gist. Chain-of-consciousness is that record: a provenance log you can interrogate for the specific, so a compacted memory has ground truth to be checked against instead of standing as the only copy. It is one layer of the broader agent trust stack.

See Hosted Chain of Consciousness  ·  Read the Theory of Agent Trust

pip install chain-of-consciousness  ·  npm install chain-of-consciousness

Or the full stack: pip install agent-trust-stack / npm install agent-trust-stack