The Relocatable Context Window: Training-Free KV Surgery with an Accountable External Store
Long-running agent sessions end in compaction: the context window is summarized and replaced. Across ten compaction boundaries in a month of our own working transcripts (one team, one workload), a median 98.4% of context was discarded, 18.8% of worked file paths and 1.4% of measured numbers survived into the successor, and no boundary was chosen by an operator; the successor's inheritance *reads complete*, so it cannot ask for what it does not know it lost. We present a training-free alternative in which context is *relocated, not destroyed*: spans are deleted mid-sequence from the live KV cache with geometric phase repair — rotary-embedded key rows re-rotated by the relative rotation R(p'-p), position-free rows deleted without repair — while the removed material moves to an attributed external store and a pointer-scar stays in the window, so every removal is accountable and reversible. Three results carry the report. (1) The repair is characterized against a measured deterministic floor: at anchor geometry on Qwen3-1.7B, unrepaired deletion errs at 15× floor and repaired at 4.2×; the residual is diffuse, and an oracle selective repair at a 15% budget does not reliably beat repair alone. (2) The residual is not recovered by any of five pre-registered probes — teacher-forced value log-probability (a mean +0.98 nats, sd 2.1, n = 18, not separable from zero, above a cache that never held the span), bare completion (0/18), a copy task (0/18; a weak extractor, full-cache ceiling 8/18), suffix NLL, and a forced-choice probe under which the repaired cache picks the true value 2/18 times — below chance and fact-for-fact identical to the never-held cache (2/18). (3) A pre-registered prompt-level relocation arm with no cache mutation matches the in-cache arm within one fact (16/18 vs 17/18) at pilot scale; at live-session scale on the base 30B model it recovers the same 12/12 relocated facts and, unlike the in-cache arm, keeps 4/4 of the kept-prose facts against the in-cache arm's replicated 1/4 (16/16 vs 13/16; the kept-fact loss is window eviction before the boundary — measured: with boundaries every four turns the in-cache arm also keeps 4/4) — the recall of the relocate–scar–retrieve loop belongs to the loop, and the live-session results (12/12 relocated on the base model; 48/48 against 48/48 on an instruct model at 39% of the control's peak cache) are reported as system results, not surgery results. What the in-cache operation buys is compute on the cache-mutation step alone — the end-to-end cost of a boundary, which includes the scar prefill both arms share, is not measured —: on one GPU, without kernel fusion on either side and with the shared scar prefill excluded, deleting and re-rotating in place is 3.2–3.7× faster than re-prefilling the kept text as measured (the benchmark copies the cache before each rep, and that copy is inside the measured time), and 4.1–9.0× after subtracting the copy (a production path that mutates in place does not pay it; the correction method is stated in §4.1); the ratio grows with the kept length (26.4× measured, 45.8× corrected, at a geometry that keeps 4,608 of 5,120 tokens). A position × treatment sweep finds the splice-placement advantage is not the mechanism (matched-depth and adjacent splices agree within one fact at every depth) and records, descriptively at three cells per depth, that a span kept in the cache through surgery around it scores 5 fewer facts than the full context at early depth (2 at middle, 0 at late); the mechanism is registered, not claimed. What this report is entitled to, and claims: a training-free mid-sequence delete with geometric repair characterized against its floor; a residual that is numerically real and not recovered by the five probes tested; and a scar-and-store loop whose relocated-fact recall a prompt-level implementation such as ARC drives within one fact at pilot scale and equally at live scale (12/12 both), where the in-cache arm additionally lost kept facts (13/16 vs 16/16); the in-cache operation's advantage is compute on the mutation step (3.2–3.7× measured, 4.1–9.0× after the stated cache-copy correction, at the anchor and pilot geometries, scaling with kept length; end-to-end boundary cost unmeasured), not recall. Preprint v4.0 (2026-09-07). Not peer-reviewed. Accompanied by the clean-room specification v1.12 (fourteen forks closed, conformance tests T1–T8), the plotted-number file FIGURE-DATA.json, and the week-2 results ledger (every experimental number read from its result artifact). Mechanism described at the level of U.S. Provisional 64/139,425 (filed 2026-08-24); reference implementation withheld.
Authors
- Tad MacPherson (ORCID: https://orcid.org/0009-0002-8659-7479)
Institutions
- Metav (Romania) (RO)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-09-07
- DOI
- https://doi.org/10.5281/zenodo.22558250
- Primary Topic
- Ferroelectric and Negative Capacitance Devices
- Type
- preprint