canon Part 4 · A Durable Fit
The first three campaigns built the memory, priced its recall, and watched the write desk. This one asks the question the line had not: once a result has entered the agent's live context, how long must it stay there, and who should decide? Six preregistered studies later the answer is a boundary, and the design that shipped is the one still standing.
Scroll to explore
The Mechanism
One turn wide, and never a deletion
Every article read and every search answered rides forward in the context window on each subsequent request, whether or not it is ever looked at again. On the machine this line runs on, the median session carries between about eighty and a hundred kilobytes of read payload, and in the larger harness nine in ten of those bytes are re-reads of paths already read in the same session, an upper bound on what sat in the window unused. If bytes no longer needed could leave, context would be cheaper and the window would hold more.
Throughout the programme, ephemerality means one specific, recoverable operation. A withdrawn result is replaced in place, in the projected conversation, by a one-line placeholder naming how to get it back. The store is untouched. A re-read or re-search restores the content at any time. And the contract is one turn wide: a result rides in full until the model has composed one reply with it in view, and only then is it eligible to leave. Everything ahead of a withdrawal stays byte-identical, which preserves exact-prefix caching. Step through the figure, or let it run.
One withdrawal, from the model's side
One withdrawal in three moments: a search result rides in full; the model composes one reply with it in view; the result is then replaced in place by a short placeholder naming how to get it back. The store holds all twelve unit articles untouched throughout, and a re-search returns the same bytes at any time.
The window loses sight of the result; the store never loses the result. The strings are quoted verbatim from the closing capture's fixture and mechanism, and the projection contract in the second step was verified on live sessions by a dedicated probe at each mechanism stage. Mechanism diagram; the fixture, the placeholder, and the one-turn contract are the recorded ones.
The Prologue
The moment is what works
The programme opened on the one intervention that had ever moved Part 3's staleness endpoint: the growth line, a recurring sentence the tool speaks when an article's body grows. A 960-session capture asked which form of guidance carried that effect, the recurring sentence or a typed structural block, and the answer was one-sided. The sentence carried the whole effect. The block, which fired 359 times and activated in every lineage-run, carried almost none of it.
That put a question on the table nobody had asked: if the cue's work is done the moment it is read, does it have to stay in the window afterward? A 480-session capture with a matched within-capture comparison answered it. An arm that withdrew each guidance line one message after its arrival, against an arm where it persisted, landed inside the registered non-inferiority margin, with the point estimate on the withdrawal's side. Guidance does not have to persist. The registered byte case failed alongside, which is why nothing shipped on economics; the finding is behavioural.
Standing superseded values at session eight, two captures
Standing superseded values at session 8, of 96, lower is better. Seed capture: no guidance 87, 84, 82; typed block 86, 80, 82; the shipped growth line 40, 45, 48. Test capture: line persists 45, 63, 54; withdrawn after one message 43, 59, 45, inside a registered margin of 9.6 with the point estimate favouring the withdrawal.
Read within each block only: the two captures share a metric, not a baseline. Whiskers span the three replications and the filled dot is their mean; no confidence interval is drawn, because three replications are a range. In the test capture 277 of 436 fired guidance lines were withdrawn one message after arrival, and the endpoint stayed inside its margin. Measured, the seed and test captures, three replications per arm.
When The System Decides
A window smaller than the task is not a smaller task
The first evidence study imposed the policy. Read results older than a working set of four distinct articles were withdrawn silently, the way a capacity-driven eviction policy would do it, and the instrument was built so the task could not be completed without breadth: eight governing articles per station, each holding two values obtainable nowhere else, and one roster to write carrying every value to the digit. Eight articles needed at the write, four visible at a time.
Fifteen treated sessions ran, and three entered a pattern the registered livelock detector could not see. The detector watched for alternation between at most two paths, the shape an earlier pilot sighting had taught it. The sessions rotated instead: all eight articles round-robin, each new read evicting the article that would be needed four reads later, no message ever composed, no progress ever made. The figure below replays the recorded read sequence of one of them. A sibling session at the same station, under the same policy, read each article once, let the oldest four go, and wrote anyway: the loop is an observed failure mode, not a certainty, and no control session showed the pattern.
The recorded loop, read by read
The recorded read sequence of one treated session: all eight governing articles in order, found the oldest already withdrawn, and read them again; 102 reads, 98 withdrawals, 0 writes, 0 words of text, killed by the wall clock at 96 turns. 3 of 15 treated sessions looped this way, 0 of 15 control.
The trace is copied from the session manifest, never generated. Rereading could not repair the failure under the four-result window, because every recovery read evicted an article the write still needed; a window as wide as the working set would remove the failure only by removing the eviction under test. Recorded, one treated session; 3 of 15 treated sessions met the loop signature, 0 of 15 control.
The Bound That Held
What the detector missed, the ceiling caught
What stopped the capture was not the behavioural detector. It was the registered cost ceiling, an exact decimal checked after every session, never mid-session. The spend crossed it at session 30 of 48: halt, no endpoint read, the capture closed ungraded by its own design. Three looping sessions account for almost the whole climb, at 52 to 57 times the median clean session each; a fourth session thrashed mildly and makes the one smaller step; the other 26 sessions together cost about eleven cents.
The post-mortem is frozen as a halt record, and the record itself needed a correction: the frozen document named the wrong third looper, and the journal carries the fix, because frozen documents stay frozen and corrections live beside them. The detector's no-text clause was right and its two-path assumption was wrong; the widened signature was validated retroactively against every session then on record, and the cost formula for every later capture was raised from twice the pilot median to four times.
Cumulative spend against the registered ceiling
Cumulative reported spend by session against the exact registered ceiling of 0.50000000 dollars. Sessions 2, 7 and 30 are re-read loops costing 0.180, 0.164 and 0.177; session 22 thrashed mildly at 0.029; everything else together is about 0.111. The spend reaches 0.632 at session 30 of 48, the capture halts ungraded, and 18 sessions never ran.
One rule for practitioners falls straight out of this figure: pair behavioural loop detection with an independent physical cost bound, because the ceiling caught what the registered signature missed. The check ran after every session, never mid-session, so the halt is the design working, not an intervention. Measured, the halted capture's grade-blind spend records, 30 of 48 sessions.
When The Agent Decides
Safe when it fired, and almost never asked for
If the system cannot take results away safely, the agent might. The second evidence study made withdrawal an informed, per-call choice: a peek argument on read and search, declared in the tool schema, meaning this result may be withdrawn once I have replied to it. The consent mechanics came back perfect across all 48 sessions: every withdrawal matched a flagged, answered call, the control arm showed zero, and no loop appeared anywhere. Adoption is the result. Two sessions of 24 used the affordance, both at the same station, and both used it completely, flagging all eight of their reads and finishing exact. The study's registered endpoint, the median adopter peak against the control median, cleared its ten percent floor at 15.3 percent; the intention-to-treat comparison across all pairs, a wash, is what exposed that the margin rode on the adopters' station.
Perhaps choice was the obstacle. The third design flipped the default and said so as loudly as a tool can say anything: results here are ephemeral unless you pass durable true. Its pilot killed it in four sessions: both treated sessions marked every read durable, 16 of 16, and the registered kill condition surfaced before any more money went further. The closing study rebuilt the instrument so search was the only way in, on the reasoning that a search result, a snapshot of a ranking, is the easiest thing in the store to let go. The model kept all 139 consults, 24 searches and 115 reads, across every station and replication, with task quality perfect in both arms. Under a disclosed default, retention was unanimous, and the figure below is what the standing option cost.
What the option cost, one mark per matched pair
Percent change in total context, control twin to treated session, 24 pairs per group. Opt-in: the two sessions that used the mechanism fell about 41.5 and 41.8 percent; the registered endpoint cleared its 10 percent floor at 15.3 percent; most other pairs sit near zero. Disclosed default: every pair sits above zero, median about +4.8 percent, one pair off the scale at +52 percent from a fifth turn.
Under the disclosed default every pair sits right of zero because the disclosure, the schema addition, and a durable flag on every call were paid on every session and nothing was ever withdrawn. Within each adopting pair on the opt-in, peak context fell 4.7 and 5.3 percent. Mechanism safety and mechanism demand are different properties: consent integrity held across all 48 opt-in sessions and completion ran exact and loop-free in both sessions where withdrawal fired, while demand scarcely appeared. Measured, 24 matched pairs per capture, token counts from the graded reports.
Limits
What none of this establishes
Everything measured is one model, at high thinking, through one provider, on one task family whose contract demands exact reproduction and whose prompts direct the agent to consult the governing articles. Retention preferences under such a contract are exactly what an exact-value instrument should elicit, so the unanimity is a conservative residency reading, not a universal one. The studies measure the disposition of consulted results, never the propensity to consult; the treated arm's patched schema survived being untested for that only because the pilot verified it appeared, correctly typed, on every consult.
The boundary is scoped to what was tested. Task evidence could not be evicted below the task's working set by the fixed window tested; other policies, importance-aware or dependency-aware or summarising, were not run. Whether the sessions that escaped the loop produced degraded output was never graded, because the capture halted at its ceiling first. The payload scale is small: what a context-lifecycle option is worth on the hundred-kilobyte sessions that motivated the question was not measured here. And the whole arc prices one direction of the trade: nothing here says withdrawal cannot pay; it says that on this instrument, offered honestly, it was not chosen.
Three rounds of external editorial review ran against the plan, the draft, and the finished paper with its figures, and the review documents ship verbatim with the deposit. Five caught misses are part of the record, from the loop shape the registered detector could not see to a ledger scope mislabel in two frozen money sections, each corrected in the journal with the frozen documents left frozen.
Citations
The paper, the record, and the line it closes
The paper. Shane Conner, "pi-canon: A Durable Fit", Zenodo, August 2026. doi.org/10.5281/zenodo.22087390. The deposit carries the six studies' frozen record: the designs and their staged amendments, the results and halt documents, the graded reports and session manifests, the fixtures with their hidden oracles, the harnesses with their gates, the verbatim external reviews, and a facts gate that recomputes every figure datum and pinned number in the paper from that archive alone.
Part 1. The design, and the four-arm evaluation that measured it whole: shaneconner.com/projects/pi-canon/part-1. Its paper: doi.org/10.5281/zenodo.21890647.
Part 2. Six studies pricing the recall channels: shaneconner.com/projects/pi-canon/part-2. Its paper: doi.org/10.5281/zenodo.21960350.
Part 3. The write desk, and the withdrawn magnitude: shaneconner.com/projects/pi-canon/part-3. Its paper: doi.org/10.5281/zenodo.22057257.
canon. The package: github.com/shaneconner/canon, on npm as pi-canon, MIT licensed. The durable-by-default design this page validates ships in 0.3.0, unchanged by the programme.
canon-bench. The benchmark and public evidence repo behind the line: github.com/shaneconner/canon-bench.
The narrative version. Shane Conner, "I built my agent a way to shed context. It consistently opted out.", Medium, August 2026: medium.com/@shane.conner/i-built-my-agent-a-way-to-shed-context. The campaign in prose, from the rotation that ran to the ceiling that stopped it.
The sibling line. fold, episodic memory for the same agents, measures the other side of the same lifecycle: Shane Conner, "pi-fold: Agent-Governed Lossless Context Folding", doi.org/10.5281/zenodo.21856873, and "pi-fold: Working Memory Under Context Shedding", doi.org/10.5281/zenodo.21980746.