Let Old Context Fade

Explain this chapter with AI

Copy this prompt into ChatGPT, Claude, Gemini, a local model, or another AI.

Apply this chapter with AI

Copy this prompt into ChatGPT, Claude, Gemini, a local model, or another AI.

A long session crosses its compaction threshold mid-investigation. The agent is halfway through a dependency migration: three candidate approaches tried, one rejected for a subtle version conflict, the current attempt half-applied, the exact error that killed the second attempt still visible three turns back. The compactor fires, because tokens crossed a number, and replaces 40,000 tokens of working history with a 2,000-token summary. The summary is fluent and mostly accurate. It records that an approach was rejected without recording which version conflict killed it. Six turns later the agent, unable to see the conflict, retries the rejected approach. The threshold did its job. The session did not survive it.

Chapter 11 built the machinery that produced this failure and measured why summaries fail this way. This chapter asks whether the underlying shape is necessary. Must information jump in one step from full fidelity to a single compressed representation, or can the same episode exist at several explicit levels of detail, with rules governing which level is active? The question matters because the cliff confounds two decisions that deserve separation: what may be lost, and how much of what remains is shown right now.

Fidelity is not retention

Chapter 7 classified what transformations each item permits. Chapter 12 introduces a second variable that the classification alone does not determine:

RETENTION CLASS
What transformations are allowed?

FIDELITY LEVEL
Which allowed representation is shown now?

A decision may be COMPRESSIBLE, which permits semantic transformation, while currently rendered at full detail because pressure is low. The same decision under severe pressure may render as outcome plus rationale, then as outcome alone, without any change to its retention class. Conversely, a PIN item never descends at all: its retention contract fixes its minimum fidelity at exact, and no schedule overrides that. The relationship is one-directional and worth stating as law:

A fidelity policy may select among representations the retention contract permits. It may never select one the contract forbids.

Pressure demotes. Floors detain. Confusing the two, treating a demoted item as a reclassified one, destroys the audit trail Chapter 10 built: the record must show that an item rendered compactly is still COMPRESSIBLE, not that it became DISCARDABLE.

That relationship suggests a primitive the chapter keeps only if it earns its keep through the experiments below. A fidelity floor is the lowest representation an item is permitted to reach: exact and verbatim for a constraint, decision plus rationale for a choice, outcome plus reason for a resolved investigation, possibly very small for transient operational detail. Floors derive from retention semantics and probe results, never from intuition, and the chapter will abandon the term if the tier model works without it. As drafted, the floor does real work: it is what pressure pushes against, and what stops the push.

Age is not permission

Chapter 10 established that old does not mean discardable. The parallel statement holds here with equal force: old does not mean low fidelity. A six-month-old architecture constraint may require exact representation while a five-minute-old compiler log tolerates aggressive reduction. Any policy shaped like older-automatically-shorter repeats the age fallacy at a new level of sophistication, demoting the governing past to subsidise the chattering present. Therefore:

Age may influence demotion only after retention semantics establish that demotion is legal.

Age enters the machinery below as a priority input among others, never as a licence. What age cannot do, pressure and relevance sometimes can, which the next sections separate carefully.

Three questions, one pipeline

Progressive fidelity decomposes into three independent decisions that the chapter refuses to merge:

Eligibility. May this item lose detail at all? Chapter 7 answers most of it through retention class and floors.

Level. Which representation fits current conditions? A choice among legal tiers under pressure, relevance, and cost.

Timing. When is the representation change applied? Chapter 9’s economics govern here: a demotion eligible now may be cheapest applied later, at a cache-safe boundary, on prefix expiry, or at a milestone transition.

In pipeline form:

item
 โ†“
legal fidelity range
 โ†“
desired tier
 โ†“
safe application boundary
 โ†“
rendered representation

No compiler is built from this pipeline. It is a requirements sketch showing where each earlier chapter plugs in: retention supplies legality, budget and relevance supply desire, cache state supplies timing. A design that fuses the three into one score repeats Chapter 7’s importance-score error with more variables.

Generate once, render many times

The most consequential architectural pattern in this chapter separates two events that naive systems fuse: creating reduced representations, and choosing which one to show. Magic Context’s current architecture, verified against its primary source, implements exactly this split. Its historian emits each history compartment with four fixed paraphrase tiers at generation time, verbose down to anchor-only, plus importance, episode type, facts, and events. Later, a deterministic decay renderer selects one tier per compartment per pass with no model call, demoting oldest-first under age, importance, and budget pressure, past an archive boundary toward anchor-only or removal. Raw messages persist separately for exact expansion. Every mutation replays byte-identically across passes for cache stability, and re-tiering happens only on defined fold boundaries rather than continuously.

Three properties of that design deserve isolation from its product specifics. First, demotion is not itself a generative event: choosing anchor-only for a compartment calls no model and invents nothing, which removes an entire class of variance that per-turn re-summarisation would introduce. Second, the tiers are generated once from source rather than cascaded from each other, so lower tiers do not inherit the errors of higher ones; whether source-grounded generation measurably beats cascaded generation is one of the experiment’s axes, not an assumed result. Third, the raw range survives for expansion, which makes every demotion reversible in a way Chapter 11’s summaries, standing alone, are not. The book adopts none of Magic Context’s four tiers as canonical, its importance score stays one implementation’s control variable per Chapter 7’s refusal, and its memory subsystem stays out of this chapter entirely. What transfers is the split: generative loss events at creation time, deterministic render events afterwards.

That split is also what separates this chapter from repeated compaction. Chapter 11 studied chains where each summary compresses its predecessor and loss compounds by construction. A tier system that regenerates every tier every turn has simply hidden that chain inside a scheduler. The firewall reads:

regenerate-then-select-every-turn
        =
repeated compaction wearing tiers as costume

Genuine progressive fidelity creates representations on a slower cadence than it selects among them, and the experiment below is designed to catch systems that fake the distinction.

What tiers contain

Tiers defined by token count alone repeat the ratio fallacy of Chapter 11 at finer granularity. A shorter tier can preserve constraints, decisions, identifiers, status, and provenance while dropping narrative; a longer tier can still omit the decisive fact. Token budget constrains a level. Information survival defines it. The chapter therefore specifies tiers by survival contract rather than size, derived from Chapter 7’s dimensions. Narrative detail may decay early. Exact identifiers, decision rationale, failure history, locational anchors, provenance, and uncertainty status each carry floors set by retention semantics and probe results: a file line number may vanish before the subsystem name, but the reason the chosen approach won outlives the incidental failed command that tested it. These orderings are hypotheses for fixtures, not laws; the experiment section makes them falsifiable per class.

Two structural consequences follow. First, not every item uses every tier. Some items admit only exact representation. Some admit full and compact but nothing between. Forcing all items through an identical four-rung ladder manufactures transitions nobody needs; retention semantics precede decay, and the tier set per item is whatever its legal range supports. Second, tiers need not be prose at decreasing lengths. A structured canonical record rendered deterministically into detailed, compact, and anchor views can protect exact fields and provenance by construction, at the price of an intermediate representation that may itself be wrong and of narrative relationships that fields capture poorly. Independent prose tiers preserve narrative at the price of cross-tier contradiction risk. The experiment compares both without assuming a winner.

The decay dimensions deserve one level more concreteness, because floors are set per dimension rather than per tier. Narrative detail, the blow-by-blow of how an investigation unfolded, decays first almost everywhere: once an outcome and its reason survive, the intermediate steps are usually safe to shed. Exact identifiers, file paths, revision markers, configuration values, decay last or never, keyed to exactness rather than age. Decision rationale outlives the search trace that produced it; failure history outlives the passing curiosity that read it, because rejected alternatives constrain future choices. Locational anchors, subsystem names and stable references, persist after line numbers fade: a line number locates text that edits invalidate, while the subsystem name locates responsibility that persists. Provenance and uncertainty status ride at whatever tier carries their fact, never below it. None of these orderings is law. Each is a probe hypothesis: the fixtures test per-dimension floors by demoting dimensions independently and watching which demotions break hidden tasks. Where a floor holds across traces, it graduates into policy. Where it varies, the variance itself is the finding, and the tier contract stays conservative.

Anchors deserve precise definition since the placeholder introduced the term loosely. An anchor is not a summary of an episode. It is the minimum representation preserving enough identity to recognise what happened, why it may matter, and which larger episode it belongs to: a stable episode identifier, a short outcome, the critical invariant, canonical entity names, a source identifier. An anchor must never pretend to contain detail it lacks. Its honesty is what makes it safe as a lowest resident tier rather than a decorative stub.

The tier fan for one episode looks like this, with the caveat that most items use a subset, never the full fan, of these levels:

                 SOURCE EPISODE
                      โ”‚
          โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
          โ†“           โ†“           โ†“
        FULL        DENSE       COMPACT
                                  โ”‚
                                  โ†“
                                ANCHOR

retention policy defines legal floor
budget and relevance select active view

Pressure creates necessity; age merely prioritises

A quiet session at 20K of a 1M-token window has little reason to demote anything for age alone. A session at 190K of a 200K window may need strong reductions regardless of recency. Hence the chapter’s operating rule, stated as testable rather than settled:

Age can influence priority; budget pressure creates necessity.

Current relevance complicates both, modestly and under control. An old episode can become central again; a recent one can already be complete. The fixtures manipulate known relevance directly, old-but-needed versus old-and-done versus recent-complete versus recent-active, and watch whether age-only and retention-aware schedules diverge. No retrieval or ranking machinery is built from this; relevance here is a controlled experimental input, and discovering relevance in production belongs to later chapters. Promotion back up the tiers is allowed conceptually, an old anchor re-rendered densely when its episode reactivates, with the discovery mechanism explicitly deferred. Demotion must never be modelled as semantically permanent, which is one more reason lineage and source identity travel with every tier.

Policy first, schedule second

A final separation keeps the machinery honest. Fidelity policy declares which representations are legal; decay schedule decides when the active representation changes. Policy comes first and schedule cannot override it. A PIN item’s legal set is exact-only under every schedule and every pressure reading. A COMPRESSIBLE episode’s legal set might span full, dense, compact, and anchor, with age, relevance, and budget pressure selecting among them turn by turn. Confusing the two produces characteristic errors in both directions: a schedule that demotes a PIN item because pressure is high has mistaken urgency for permission, while a policy that refuses all demotion because importance is high has mistaken value for presence, Chapter 7’s error in new clothes.

The separation also clarifies what each part of the experiment tests. Tier-legality questions, does this item admit compact representation at all, are answered by Experiment 1’s static survival measurements. Schedule questions, when should the legal demotion actually render, are answered by Experiment 2’s trajectory runs under matched budgets. A policy can be correct while its schedule is wasteful, demoting too eagerly and paying cache churn for no behavioural gain, or too timidly, carrying full detail through pressure that justified compact views. Scoring the two separately is what lets a negative result land precisely: keep the tiers, fix the schedule, or the reverse, instead of discarding the whole mechanism over one half’s failure.

Deterministic rendering, hysteresis, and the cost of switching

Once tiers exist, choosing among them should be reproducible under identical state. Deterministic rendering buys repeatability, auditability, stable experiments, lower management cost, and freedom from per-turn generative drift. It does not buy correctness: a deterministic rule can reliably select the wrong tier, and the chapter measures decision reproducibility separately from decision quality throughout. Both need numbers, because a policy debate conducted only in quality terms cannot distinguish a bad rule from a noisy one.

Switching itself has a price, and the chapter prices it twice. First in cache economics, inherited whole from Chapter 9: every tier change is a potential prefix mutation with a divergence position and a radius, so desired demotion and applied demotion stay separate, with deferral to cache-safe boundaries, prefix expiry, or milestones. A renderer that re-renders history differently each turn because age ticked one minute creates continual mutation for no behavioural gain; discrete tiers switched at boundaries dominate continuous micro-rewriting on cost alone, before fidelity is even considered. Second in stability: pressure fluctuating around a threshold can thrash tiers downward and upward alternately, so a minimal hysteresis rule, separate demotion and promotion thresholds so small fluctuations do not rewrite the bundle, earns its place as runtime plumbing rather than framework. Small, plainly defined, measured for thrash reduction rather than admired.

Tier changes also bill their creation. Generating several representations costs more upfront than generating one summary: historian input, tier output, storage, decision computation, rendering overhead, cache impact, all counted against downstream savings. A four-tier mechanism is not free because its live rendering is compact. The experiment’s overhead accounting from Chapter 11 carries over unchanged.

How many tiers earn their place

The chapter refuses to begin from any plugin’s tier count. Two, three, four, or more levels are hypotheses, and the experiment is allowed to collapse them. The survival criterion is Pareto-shaped: a tier survives only if it creates a useful fidelity-versus-cost operating point that neighbours do not. A tier costing 600 tokens that performs no better than a 350-token neighbour is dominated and should disappear. A tier saving 50 tokens while destroying survival has priced itself out. Every tier must answer two questions, what it preserves that the next-lower tier does not, and what cost it saves relative to the next-higher tier, or be merged away. This is also where excess fidelity gets measured: tokens spent above the minimum sufficient oracle tier, punishing timid never-demote policies symmetrically with aggressive ones. Under-fidelity selects below the sufficient tier; over-fidelity selects above the necessary one; the oracle defines both only where future probes make sufficiency checkable, never as production labels.

Functional layering enters here as a deliberate non-conflation. Recent hierarchical work separates planning from execution detail into isolated layers with their own summaries, which is organisation by function, not gradation by fidelity. A planning layer may itself need high or low fidelity; an execution layer likewise. The chapter records the distinction because both ideas will coexist in later systems, and a planning tier mistaken for a fidelity tier inherits the wrong contract. Similarly, learned external managers show that the preferred operating point can depend on the consuming model: stronger agents exploiting longer raw contexts, weaker ones needing aggressive distillation for reliability. That capability-indexed trade-off is reported as a preprint finding that informs the experiment, through a same-schedule-across-two-models extension kept strictly optional, rather than as architecture the book adopts. No importance score sneaks back in through either door.

Proposed experiments

Two experiments share Chapter 11’s fixture philosophy with tiers added. Deterministic episodes carry exact constraints, identifiers, decisions with rationales, rejected alternatives, unresolved work, uncertain hypotheses, provenance labels, locational detail, incidental execution detail, and trap facts needed later. Fidelity schedulers never see all future probes. Evaluators retain frozen source.

Experiment 1: static tier quality. Before schedules, test whether tiers themselves work. Conditions: raw source; flat Chapter-11-style summary; cascaded tiers with each level generated from the previous; source-grounded tiers generated independently from raw; structured canonical record with deterministic renderer where practical; oracle tiers built with probe knowledge as ceiling. Match approximate token budgets per tier. Measure per representation: actual tokens, exact, semantic, status, and provenance survival, unsupported additions, hidden-task success, plus generation cost and cross-repeat variance. Test cross-tier monotonicity explicitly: flag tiers that contradict each other or non-monotonically gain and lose the same fact, since generative tiers need not nest cleanly. A tier earns its place by survival per token, never by brevity alone.

Experiment 2: progressive trajectory rendering. Fixed long trajectories divided into episodes, compared under matched active-context budgets with per-turn size, tier distribution, and violation reporting. Conditions: full history; hard truncation; flat compaction; progressive tiers on age-only scheduling as a deliberate naive baseline; progressive tiers on retention-aware plus budget-aware scheduling; oracle tier schedule with probe knowledge. Hidden probes again ask for old constraints, decision reasons, rejected alternatives, bug status, and decayable locational detail. An oracle-promotion condition, scheduler told an episode reactivated, tests re-rendering upward without building discovery. The model-capability extension, same schedule across two capability levels, runs only if it stays subordinate to the primary comparison.

Falsification and negative results

The chapter states in advance what would weaken it, because a mechanism that cannot lose an experiment is decoration. Flat compaction matching or beating tiered rendering at equal budgets would remove the motive. Additional tiers with no useful operating points, tier creation costing more than it saves, deterministic switching failing to reduce variance or drift, age-and-budget schedules performing no better than a flat summary, all would shrink the chapter toward a footnote. Frequent cross-tier contradictions would make parallel variants unsafe to maintain. Strong model-dependence would make one reusable policy impractical, pushing the answer toward per-model calibration rather than a shared tier system.

Negative outcomes redirect rather than refute. If raw plus one good typed summary matches every tiered policy, Chapter 12 shortens to that finding and the tier machinery is deleted from the architecture, exactly the complexity removal this stage welcomes. If only full and compact earn their place, the book keeps two levels and the anchor concept retires. If four tiers show clean operating points, they stay, but stayed by measurement rather than by imitation of any plugin. The architecture continues to earn its complexity one tier at a time or not at all.

Context Lab implications

Nothing here is implemented, but the experiment dictates records. Generation and selection separate, so the records separate too: a representation object carrying source episode identity, level, generation strategy among cascaded, source-grounded, or canonical-record, token count, survival contract, source references, and generation model and prompt version; and a selection decision carrying selected level, reason, budget pressure, application time, first divergence, mutation radius, and policy version. Lineage from Chapter 11 carries over unchanged: every variant knows its source, its policy, and whether it was grounded in raw material or derived from another tier. Fields enter by experiment consumption only, and the generation/selection split is itself a falsifiable claim the fixtures test.

Corpus constructors gain episode boundaries, multiple fidelity variants per episode, hidden probes distinguishing exact from detail needs, time and budget-pressure progressions, controlled relevance shifts including promotion cases, and cross-tier contradiction scoring. Session count stays flat; variant richness grows instead. After fixtures, real OpenCode traces answer the ecological questions fixtures cannot: how much old context exists, which classes dominate aged history, how often each tier would be selected, what each policy would actually save, how often it would switch. Fixtures prove fidelity behaviour. Traces prove the workload exists.

Residency is the boundary

Two firewalls close the chapter. First, an anchor with semantic content resident in the window is Chapter 12; a pointer whose useful content lives elsewhere is Chapter 13. Low-fidelity resident does not equal externalised, and tier-to-zero is pruning owned by Chapter 10, never a fidelity level. Second, fading live history is not memory: representation inside current computations stays here while durable cross-session influence stays in the Memory book, with Magic Context’s memory subsystem cited only as a boundary. Freshness stays in Chapter 20, authority in Chapter 19: an old tier is not a false tier, and a compact rule outranks a verbose log regardless of size.

What remains in the window after tiers have done their honest work is the irreducible remainder: pinned exact spans, active dense episodes, compact views of the recent past, anchors of the deep past. Still resident, still costing capacity and cache stability. The next move is not another representation. It is departure:

Progressive fidelity still consumes window space. The next move is to take information out of the window entirely.

References

  • cortexkit. “Magic Context.” Context plugin, MIT at review, verified September 2026. Fixed P1-P4 generation tiers; deterministic decay rendering; raw retention for expansion. https://github.com/cortexkit/magic-context
  • cortexkit. “Magic Context ARCHITECTURE.md.” Primary source, verified September 2026. Generation/render split; replay determinism; fold boundaries. https://github.com/cortexkit/magic-context/blob/master/ARCHITECTURE.md
  • Wang, X., Xiao, J., Cui, S., et al. “HyMem: Hierarchical Context Management for Long-Horizon Agents via Information Isolation.” Preprint, arXiv:2608.15703, August 2026. Functional layers vs fidelity gradation. https://arxiv.org/abs/2608.15703
  • Yi, L., Lei, R., Yao, L., et al. “Learning Agent-Compatible Context Management for Long-Horizon Tasks.” Preprint, arXiv:2605.30785, May 2026. Fidelity-reliability trade-off; capability-indexed operating points. https://arxiv.org/abs/2605.30785