v8.4 → v8.5
What changed from v8.4 to v8.5
From v8.4 (21 Oct) to v8.5 (21 Oct): 10,592 words to 11,973 words, 2,277 words in new or rewritten paragraphs and 896 taken out, 63 paragraphs changed.
Worked example moved up front; price rule and tests expandedAbout 1,400 words added and 900 removed.
- The walk through one span moves to section 2 and grows from 45 to over 400 words, so the reader sees the design at work before related work.
- The price of moving the prefix, marker merging, and when a turn is captured all get longer explanations.
- The list of tests grows, and the reference list is longer.
v8.4 · 21 October 2026v8.5 · 21 October 2026
··· 4 unchanged paragraphs folded ···
v8.4 · AbstractThe design is not yet built. Its deciding test gives a summary and a marker the same way back into the record and asks which keeps the owner's words. If the marker wins, an agent could carry a week of work without asking you anything twice.
v8.5 · AbstractThe design is not yet built. Its deciding test gives a summary and a marker the same way back into the record and asks which keeps the owner's words. If the marker wins, the agent should need fewer reminders on a long job: what you said on Monday is still in view on Friday, or a line in view says where to find it.
··· 5 unchanged paragraphs folded ···
v8.4 · 1.1 Friday's questionThe agent's harness compacts. A model reads the first two hours and writes a paragraph: "Worked on the TLS setup; fixed the certificate." The paragraph is accurate and almost useless. The transcript of the afternoon is still on disk, but the model reads only the paragraph, and nothing in it says that a path, a hash, a rate-limit error, an open key rotation and an instruction about the database are there to be found. Later that evening the agent proposes a database restart to clear a cache, and the owner has to say again what he said at two o'clock.
v8.5 · 1.1 Friday's questionThe agent's harness, the program that runs the model and its tools, compacts. A model reads the first two hours and writes a paragraph: "Worked on the TLS setup; fixed the certificate." The paragraph is accurate and almost useless. The transcript of the afternoon is still on disk, but the model reads only the paragraph, and nothing in it says that a path, a hash, a rate-limit error, an open key rotation and an instruction about the database are there to be found. Later that evening the agent proposes a database restart to clear a cache, and the owner has to say again what he said at two o'clock.
··· 14 unchanged paragraphs folded ···
v8.4 · 2. Related Work## 2. Related Work
removed in v8.5
v8.4 · 2. Related Work**MemGPT and Letta** (Packer et al., 2023) treat the context window like main memory and let the model page information in and out through function calls, with the full history in a searchable recall store. Total Recall keeps the hierarchy and the full history. It differs on who decides: eviction is the window controller's decision (§6), so the model spends no attention on its own pages, and the marker carries the exact strings a later search needs (§5.1).
removed in v8.5
v8.4 · 2. Related Work**Provider context management** makes the provider a window controller. Anthropic's context editing clears the oldest tool results past a threshold and leaves a placeholder; the caller can protect named tools and set a minimum to clear, since each clearing invalidates the cached prefix, and the client keeps the full history (Anthropic, 2026d). Its compaction runs on demand, where the caller requests the summary and swaps it in, optionally keeping recent turns word for word (Anthropic, 2026e), or at a token threshold, where the model summarises older turns inside the request and continues the response unless the caller asks it to pause (Anthropic, 2026a). OpenAI's compaction also prunes context and continues inference in the same response, carrying prior state in an item that is opaque and not meant to be read (OpenAI, 2026). So the history is often kept, but the next inference can see a placeholder or a summary with no address for the missing part. Our marker (§5.1) adds the address and the exact strings, and the main test (test 1, §10) gives both the same way back.
removed in v8.5
v8.4 · 2. Related Work**claude-mem** (thedotmack, 2026) uses hooks of the family §6.3 relies on (Anthropic, 2026b) to capture what an agent does, compress it with a model and inject it into later sessions; its memory is the compressed observation, ours the record itself, with compression only as a map back. **Manus** (Ji, 2025) compresses only in restorable ways (drop a page's content, keep its URL), keeps the prompt prefix stable because cache hits drive cost and leaves failed attempts in view; Total Recall extends "restorable" to the whole conversation and prices moving the prefix (§7.2). **headroom** (Headroom Labs, 2026) compresses what an agent reads and gives the model a tool to fetch the originals; it keeps a smaller version in the window, we remove the span and leave a pointer.
removed in v8.5
v8.4 · 2. Related Work**Agentic Context Engineering** (Zhang et al., 2025) shows brevity bias and context collapse; our cure for collapse is that every marker is written from the record (§5.4). **Zep** (Rasmussen et al., 2025) keeps raw conversation episodes beneath the facts it extracts; Total Recall applies the same layering to the context window.
removed in v8.5
v8.4 · 2. Related WorkTwo older ideas frame the rest. Belady (1966) showed that the best page to evict is the one needed furthest ahead; no runtime knows that, so §5.3 uses what is cheapest to recover as the proxy. And the prompt cache prices every edit to the prefix (Anthropic, 2026c), which turns "when to compact" into arithmetic (§7.2). Each part of our design has close relatives here; we claim the combination and the contract.
removed in v8.5
not in v8.4
v8.5 · 2. One Span, Start to Finish## 2. One Span, Start to Finish
not in v8.4
v8.5 · 2. One Span, Start to FinishFigure 1 follows the afternoon of §1.1 to turn 61, when the owner asks what exactly the renewal said. The marker names entry 23, and a range read returns it character for character. Appendix A shows the entries as stored.
v8.4 · 2. One Span, Start to Finish{width=74%}
v8.5 · 2. One Span, Start to Finish{width=100%}
not in v8.4
v8.5 · 2. One Span, Start to FinishA summary can also come with a way back: a search tool over the same record, or retrieval over raw chunks of it. Table 1 puts the four side by side on the owner's question, with the same record behind every way back that reads one.
not in v8.4
v8.5 · 2. One Span, Start to FinishTable: The owner's question at turn 61, "What exactly did the renewal say?", answered four ways. Every row but the first can read the same session record.
not in v8.4
v8.5 · 2. One Span, Start to Finish| Way back | What the model sees after compaction | How it answers | What it does well | |--------------|------------------|-------------------|----------------| | Summary alone | "Worked on the TLS setup; fixed the certificate." | It cannot: the error line is not in the summary | keeps the broad state of the task, cheaply | | Summary plus search over the record | the same summary and a search tool | searches for the renewal, finds entry 23, reads it | recovers the exact line with no marker | | Retrieval over raw chunks | chunks about the certificate renewal | quotes the error if that chunk comes back | finds material without a marker for every eviction | | Marker plus the same record (this paper) | `failed #23: certbot renew, rate limit` | reads s7#23: "too many certificates already issued (rate limit)" | names the entry, so the agent need not search for it |
not in v8.4
v8.5 · 2. One Span, Start to FinishThe second and last rows have the same access to the record. They differ only in what the window says is there, so the question is whether the marker raises successful recovery enough to pay for building it and for its tokens. Test 1 decides it (§10).
··· 1 unchanged paragraph folded ···
v8.4 · 3. One Span, Start to Finish## 3. One Span, Start to Finish
removed in v8.5
v8.4 · 3. One Span, Start to FinishFigure 1 follows the afternoon of §1.1. At turn 61 the owner asks what exactly the renewal said; the marker names entry 23, and a range read returns it character for character, which the dashed-box summary could not. Appendix A shows them as stored.
removed in v8.5
not in v8.4
v8.5 · 3. Related Work## 3. Related Work
not in v8.4
v8.5 · 3. Related WorkEach part of the design has close relatives, several of them shipping today. Table 2 lists what each already does and how Total Recall relates to it.
not in v8.4
v8.5 · 3. Related WorkTable: Systems that keep, compact or recall an agent's history, and how Total Recall relates to each.
not in v8.4
v8.5 · 3. Related Work| System | What it already does | How Total Recall relates | |-----------------|------------------------------|------------------------------| | MemGPT and Letta (Packer et al., 2023; Letta, 2026) | pages context in and out like an operating system, keeps the full history in a searchable recall store, and compacts automatically with a configurable summarizer, including modes that keep the prompt prefix cache-friendly | same hierarchy and full history; the evicted range leaves a marker with exact strings and addresses instead of a summary (§5.1), and test 1 compares the two with the same record access | | ARC (Dang et al., 2026) | keeps tool observations in an append-only log with IDs and replaces older ones with short citations that the agent can expand exactly | the closest mechanism, for tool output; Total Recall adds the owner's words under a budget (§5.5), erasure and quarantine (§4.4) and one contract for every window controller (§6) | | Provider compaction (Anthropic, 2026a, 2026d, 2026e; OpenAI, 2026a) | clears old tool results behind a placeholder, or summarises at a threshold, sometimes inside a response; Anthropic can pause after its summary, OpenAI carries state in an opaque item | works through these controls: markers go in at the pause or before the next request, and an unprotected stretch is recorded (§6.4) | | Claude Code hooks and claude-mem (Anthropic, 2026b; thedotmack, 2026) | hooks before and after compaction; claude-mem captures what the agent does, compresses it with a model and injects it into later sessions | uses the same hooks (§6.3); its memory is the record, and compression is only a map back into it | | Manus (Ji, 2025) | compresses only in restorable ways (drop a page, keep its URL), keeps the prefix stable for the cache and leaves failed attempts in view | extends "restorable" to the whole conversation and prices moving the prefix (§7.2) | | headroom (Headroom Labs, 2026) | compresses what the agent reads and gives the model a tool to fetch the originals | headroom keeps a smaller version in the window; Total Recall removes the span and leaves a pointer | | Zep and Graphiti (Rasmussen et al., 2025; Zep, 2026) | stores raw episodes and links each extracted entity back to the episode it came from | the same layering, applied to the context window: what stays advertised after eviction | | Mem0 (Mem0, 2026) | ranks extracted memories by query, and can store raw messages exactly as given | exact storage exists already; Total Recall's part is what replaces the evicted text and how it reaches the model (§5, §6) | | Claude and ChatGPT memory (Anthropic, 2026h; OpenAI, 2026b) | carry context from earlier chats into new ones; Claude links the past chats it used, and both let the owner manage what is kept | owners already expect to see what is kept; Total Recall's receipts and notices are meant for the finding paper's owner inspector (J2 §6.8) |
not in v8.4
v8.5 · 3. Related WorkARC shows that exact, addressable recall of evicted observations already has a research precedent. Total Recall therefore claims a combination: the owner's words kept apart and budgeted, privacy handling, and one contract for every window controller. Whether the combination beats its parts is not yet shown; test 1 is the first check. **Agentic Context Engineering** (Zhang et al., 2025) names brevity bias and context collapse; our answer to collapse is that every marker is written from the record (§5.4).
not in v8.4
v8.5 · 3. Related WorkTwo older ideas frame the rest. Belady (1966) showed that the best page to evict is the one needed furthest ahead; no runtime knows that, so §5.3 uses what is cheapest to recover as the proxy. And the prompt cache prices every edit to the prefix (Anthropic, 2026c), which turns "when to compact" into arithmetic (§7.2).
··· 6 unchanged paragraphs folded ···
v8.4 · 4.1 What goes in, and with whose nameTool results go in whole. A file the agent read can change or vanish after the read, and a content hash would show that it changed without giving back what it said. So the returned bytes are stored as a content-addressed blob before the window drops them, and the entry holds the path and the blob's hash. Identical contents are stored once per blob namespace, so the cost grows with distinct versions read, not with reads. Ordinary sessions share one namespace, so one blob can back entries in many of them (§4.4); each temporary session has its own (§4.7). A namespace comes from the authenticated session, never from a name in a request or a tool argument.
v8.5 · 4.1 What goes in, and with whose nameTool results go in whole. A file the agent read can change or vanish after the read, and a content hash would show that it changed without giving back what it said. So the returned bytes are saved as a blob, the file's contents stored under their own hash, before the window drops them, and the entry holds the path and that hash. Identical contents are stored once per blob namespace, so the cost grows with distinct versions read, not with reads. Ordinary sessions share one namespace, so one blob can back entries in many of them (§4.4); each temporary session has its own (§4.7). A namespace comes from the authenticated session, never from a name in a request or a tool argument.
··· 6 unchanged paragraphs folded ···
v8.4 · 4.4 Erase and quarantineThe writing paper decides when an erase or a quarantine applies and runs the deletion manifest over everything derived (J14 §7.7, erase and quarantine); this section says how each looks in the record. Either one raises an erasure epoch first, and this stage serves no read until it has applied it (§8.1).
v8.5 · 4.4 Erase and quarantineThe writing paper decides when an erase or a quarantine applies and runs the deletion manifest over everything derived (J14 §7.7, erase and quarantine); this section says how each looks in the record. Either one first raises the erasure epoch, a counter of deletions: this stage serves no read until it has caught up with the newest epoch, so no read is answered from the state before the deletion (§8.1).
··· 9 unchanged paragraphs folded ···
v8.4 · 4.6 When a turn is capturedUntil then the turn is pending, and the agent says nothing about keeping it. If the append fails (a full disk, a crash), the harness shows the turn as not captured and retries from its in-memory copy. After a crash, the restart reconciles the record with the controller's transcript through the sequence map and appends what is missing in the controller's order. A turn recoverable from neither side is reported as lost, never as kept (test 10, §10).
v8.5 · 4.6 When a turn is capturedUntil then the turn is pending, and the agent says nothing about keeping it. If the append fails (a full disk, a crash), the harness shows the turn as not captured and retries from its in-memory copy. A retry must not create a second entry. Each incoming message carries its source's message ID, and the record stores the pair (message ID, address) in the same durable write as the entry; a retry or a duplicate delivery finds the pair and gets the existing address back, also when the append was durable and only its acknowledgement was lost. After a crash, the restart reconciles the record with the controller's transcript through the sequence map and appends what is missing in the controller's order. A turn recoverable from neither side is reported as lost, never as kept (test 10, §10).
··· 18 unchanged paragraphs folded ···
v8.4 · 5.4 Written from the record, never from the last markerWhen a range that already contains a marker is evicted again, the new marker is built from the record entries the old marker pointed to, not from the old marker's text. This rule stops context collapse: a summary of a summary loses detail at every round, while a marker written from the record has the same detail on the hundredth compaction as on the first.
v8.5 · 5.4 Written from the record, never from the last markerWhen a range that already contains a marker is evicted again, the new marker is built from the record entries the old marker pointed to, not from the old marker's text. This rule stops context collapse: a summary of a summary loses detail at every round, while a marker written from the record draws on the same entries on the hundredth compaction as on the first. That is a promise about the source, not about what stays in view. Merged markers share capped lists, and old instructions move out to pointers (§5.5); what drops out of view stays at its address in the record.
··· 2 unchanged paragraphs folded ···
v8.4 · 5.5 Merging markers, and the budget for the owner's words$B_o$ holds the instructions kept verbatim, at most $k$ pointer lines ($k$ fixed with $B_o$) and one directory line. Untagged spans count as instructions until the night tags them (J5 §6.2, the nightly auditor). When a new instruction does not fit, the oldest verbatim one becomes a pointer line: when it was said, its first words, its address. When one more pointer would pass $k$, all pointer lines fold into the directory line, "*N* earlier instructions, s7#12 to s7#311, are not shown one by one". It points at a directory entry appended to the record that lists every moved instruction with its address, read a page at a time: an expansion returns at most $D$ tokens of the list ($D$ is fixed with $B_o$) and the address to continue from, and a page is an ordinary tool result that §5.3 may evict again. Reading $N$ instructions of about $\ell$ tokens takes $\lceil N\ell/D\rceil$ pages; 300 instructions of 30 tokens at $D = 2{,}000$ are 9,000 tokens, five pages ($\ell$ is unmeasured). However long the session, the instructions never take more than $B_o$ of the window. Each move is told to the owner in the next reply, with the warning that what moved is no longer individually in view, and listed in the receipt (§7.4).
removed in v8.5
not in v8.4
v8.5 · 5.5 Merging markers, and the budget for the owner's wordsThe owner's instruction budget, $B_o$, holds three things: instructions word for word, up to $k$ pointer lines ($k$ is fixed with $B_o$) and one directory line. An owner span the classifier has not tagged yet counts as an instruction until the nightly auditor tags it (J5 §6.2).
not in v8.4
v8.5 · 5.5 Merging markers, and the budget for the owner's wordsWhen a new instruction does not fit, the oldest one kept word for word becomes a pointer line: when it was said, its first words and its address. When one more pointer would pass $k$, all the pointer lines fold into the directory line, "*N* earlier instructions, s7#12 to s7#311, are not shown one by one". It points to a directory entry appended to the record, which lists every moved instruction with its address.
not in v8.4
v8.5 · 5.5 Merging markers, and the budget for the owner's wordsThe directory is read a page at a time. A page returns at most $D$ tokens of the list ($D$ is fixed with $B_o$) and the address to continue from, and it is an ordinary tool result that §5.3 may evict again. Reading $N$ instructions of about $\ell$ tokens takes $\lceil N\ell/D\rceil$ pages: 300 instructions of 30 tokens are 9,000 tokens, five pages at $D = 2{,}000$ ($\ell$ is unmeasured).
not in v8.4
v8.5 · 5.5 Merging markers, and the budget for the owner's wordsHowever long the session, the instructions never take more than $B_o$ of the window. Every move is listed in the receipt (§7.4), and the next reply tells the owner which instructions moved and that they are no longer individually in view. Table 3 follows the database instruction of §1.1 through the three states, with an illustrative limit of $k = 2$ pointer lines.
not in v8.4
v8.5 · 5.5 Merging markers, and the budget for the owner's wordsTable: One instruction in three states, in a window the runtime controls, with at most two pointer lines.
not in v8.4
v8.5 · 5.5 Merging markers, and the budget for the owner's words| State | What stays in the window | What the owner is told | |-------------|------------------------|------------------------| | The wording fits | Never restart the production database during the day. | nothing; nothing moved | | The wording is displaced | 14:02 "Never restart..." → s7#12/0 | "Your database instruction is stored at s7#12/0; its full wording is no longer in view." | | A third pointer would pass the limit | 3 earlier instructions → directory s7#90 | "Three earlier instructions are now listed in a directory; their pointers are no longer in view." |
not in v8.4
v8.5 · 5.5 Merging markers, and the budget for the owner's wordsThe directory entry lists all three addresses, s7#12/0 among them, and its pages obey $D$. The wording stays at s7#12/0 unless it is erased or a temporary session ends. The record keeps the instruction while its presence in what the model reads grows weaker, and that weakening is the risk test 15 measures.
··· 6 unchanged paragraphs folded ···
v8.4 · 6.1 Three window controllers{width=86%}
v8.5 · 6.1 Three window controllers{width=100%}
··· 3 unchanged paragraphs folded ···
v8.4 · 6.3 When a provider's tool controls the windowThe runtime cannot compact a window it does not build. It acts through the tool's hooks (Anthropic, 2026b):
v8.5 · 6.3 When a provider's tool controls the windowThe runtime cannot compact a window it does not build. It acts through the tool's hooks (Anthropic, 2026b), in three steps; in Claude Code they are `PreCompact`, then `PostCompact` and `SessionStart` with `source` set to `compact`:
v8.4 · 6.3 When a provider's tool controls the window- Before compaction. The hook makes the record complete up to this moment, reading the tool's own transcript where needed. It does not say which part the tool will summarise, so the adapter takes everything since the previous compaction (or the session start) as the range and builds markers from the record; a marker for a turn the tool keeps verbatim costs a few tokens. The pending markers are written durably before the hook returns. The hook could block the compaction, but when the tool compacts to recover from a full window blocking fails the request, so the default is to let it run.
v8.5 · 6.3 When a provider's tool controls the window- Before compaction (`PreCompact`). The hook makes the record complete up to this moment, reading the tool's own transcript where needed. It does not say which part the tool will summarise, so the adapter takes everything since the previous compaction (or the session start) as the range and builds markers from the record; a marker for a turn the tool keeps verbatim costs a few tokens. The pending markers are written durably before the hook returns. The hook could block the compaction, but when the tool compacts to recover from a full window blocking fails the request, so the default is to let it run. - After compaction (`PostCompact`, then `SessionStart` with `source=compact`). The adapter stores the tool's summary as a harness entry where the event carries it, and injects the stored markers into the new context before the next model call, beside the summary. - Delivery check (every turn). The adapter looks for the marker IDs in the tool's transcript. A marker that is absent is sent again with the next prompt's injected text, and the receipt counts the turns run without it (§6.6).
··· 3 unchanged paragraphs folded ···
v8.4 · 6.4 When a provider's API controls part of the windowThird, it promises only what it can deliver. A threshold compaction runs inside a request, and the model may go on answering from the compacted context in the same response (Anthropic, 2026a; OpenAI, 2026). The runtime places markers only in requests it builds, so the guarantee is delivery before the next client-controlled request. Where the API can pause after its summary, the adapter takes the pause and adds the markers, so the first inference after compaction has them; where it cannot, the rest of that response is recorded in the receipt as unprotected.
v8.5 · 6.4 When a provider's API controls part of the windowThird, it promises only what it can deliver. A threshold compaction runs inside a request, and the model may go on answering from the compacted context in the same response (Anthropic, 2026a; OpenAI, 2026a). The runtime places markers only in requests it builds, so the guarantee is delivery before the next client-controlled request. Where the API can pause after its summary, the adapter takes the pause and adds the markers, so the first inference after compaction has them; where it cannot, the rest of that response is recorded in the receipt as unprotected.
··· 5 unchanged paragraphs folded ···
v8.4 · 6.6 The adapter contractThe adapter serves two other stages. Its compaction receipts, and the window rebuilt after an erase or a quarantine, are published as eviction events (transition T16) for the finding paper's read ledger (J2 §6.7, what the context already holds). The event names every range the rebuild left out, not only the erased or quarantined entry, and is resent until the read ledger acknowledges it (T16; T22 for a quarantine). And an erase or a quarantine that reaches a live session goes through the adapter, with a receipt: the runtime rebuilds its window without it; for a tool or an API the adapter ends the live session and starts a clean one from permitted material, or uses a deletion control the controller documents, and otherwise reports the copy as out of reach (§4.4). A quarantine promises that the content is absent from every call the runtime builds after the receipt, and from a tool's or an API's context only where the session was rebuilt that way (transition T22; J14 §7.7, erase and quarantine).
v8.5 · 6.6 The adapter contractThe adapter also serves the writing and finding stages. It publishes each compaction receipt, and each window rebuilt after an erase or a quarantine, as an eviction event, which keeps the finding paper's read ledger, its account of what the window still holds, up to date (J2 §6.7). The event lists every range the rebuild left out, not only the erased or quarantined entry, and is resent until the ledger acknowledges it (transition T16; T22 for a quarantine).
not in v8.4
v8.5 · 6.6 The adapter contractAn erase or a quarantine that reaches a live session also goes through the adapter, which writes a receipt (§4.4). If the runtime builds the calls, it rebuilds the window without the content. For a provider's tool or API, the adapter ends the session and starts a clean one from permitted material, or uses a deletion operation the controller documents; otherwise it reports that copy as out of reach. After a quarantine receipt, no call the runtime builds carries the content; a tool's or an API's context is covered only where its session was rebuilt that way (T22; J14 §7.7, erase and quarantine).
··· 6 unchanged paragraphs folded ···
not in v8.4
v8.5 · 7.2 The price of moving the prefixTable 4 shows what one eviction does to the cache, with the sizes of Figure 3.
not in v8.4
v8.5 · 7.2 The price of moving the prefixTable: What one eviction makes the cache write again. The text after the span is unchanged, but the tokens before it changed, so it is written again.
not in v8.4
v8.5 · 7.2 The price of moving the prefix| | Before the span | The span | After the span | |----------|-------------------|-------------------|---------------------| | Before eviction | the prefix, read from cache | 40,000 tokens of old turns | 100,000 tokens, read from cache | | After eviction | the same prefix, read from cache | a 300-token marker, written | the same 100,000 tokens, written again |
not in v8.4
v8.5 · 7.2 The price of moving the prefixIn words: break-even turns equal the one-time cost of the eviction divided by the net saving on each later turn. The rest of this section puts symbols on both.
v8.4 · 7.2 The price of moving the prefixWe use the finding paper's notation and prices (J2 §7.1, a read costs a turn): a cache read costs $r$, a cache write $w$ and an output token $g$, as multiples of the base input price. Let the span have $S$ tokens, the marker $m$ tokens, and let $A$ tokens follow the span in the window. Let $q_{\text{turn}}$ be the probability that a given later turn of the same session pulls from the evicted span (horizon: one later turn; the finding paper's $q$ has the rest of the session as its horizon). A pull is a full turn and costs the finding paper's $C_{\text{pull}} = rL + wx + g\,o$: it re-reads the $L$ tokens of cached context, writes the $x \ll S$ tokens it returns and produces $o$ output tokens. The returned slice then stays in the window for $H$ turns until it is evicted again, so a pull from an evicted span costs
v8.5 · 7.2 The price of moving the prefixWe use the finding paper's prices and notation (J2 §7.1, a read costs a turn), as multiples of the base input price: $r$ per token read from cache, $w$ per token written to it and $g$ per output token. Eviction removes a span of $S$ tokens and leaves a marker of $m$ tokens; $A$ tokens follow the span. Let $q_{\text{turn}}$ be the chance that one later turn of the session pulls something from the span. It differs from the finding paper's $q$, which covers the rest of the session.
not in v8.4
v8.5 · 7.2 The price of moving the prefixA pull takes a full turn. It re-reads the $L$ tokens of cached context, returns $x \ll S$ tokens that are written to the cache, and produces $o$ output tokens, so $C_{\text{pull}} = rL + wx + g\,o$. The returned slice then stays in the window for $H$ turns before it is evicted again, adding $r\,x\,H$ in later reads:
··· 5 unchanged paragraphs folded ···
v8.4 · 7.2 The price of moving the prefix{width=72%}
v8.5 · 7.2 The price of moving the prefix{width=88%}
not in v8.4
v8.5 · 7.2 The price of moving the prefixTable: An illustration from assumed inputs, the same as Figure 3's: a 40K-token span, with a one-time cost of 156,845 base-input-token units, building the marker included.
not in v8.4
v8.5 · 7.2 The price of moving the prefix| Chance a later turn pulls from the span | Net saving on each later turn | Turns to repay the one-time cost | |--------------------|------------------|------------------| | 0 | 3,970 | about 40 | | 0.05 | 2,770 | about 57 | | 0.17 | below zero | never: the span should stay |
v8.4 · 7.2 The price of moving the prefixFigure 3 is an illustration, since $q_{\text{turn}}$, $H$ and $c$ are unmeasured. In it, a 40K-token span pays back after about 40 turns if never pulled (about 10 of them the cost of building its marker), after about 57 if a later turn pulls from it with probability 0.05, and never above about 0.17. A 100K-token span pays back after about 22 turns; a 10K-token span needs about 131 and never pays above 0.04. At a read price of 0.05 the 40K span needs about 82 turns.
v8.5 · 7.2 The price of moving the prefixFigure 3 and Table 5 are illustrations, since $q_{\text{turn}}$, $H$ and $c$ are unmeasured. For the 40K-token span, about 10 of the 40 turns repay building the marker. A 100K-token span pays back after about 22 turns; a 10K-token span needs about 131 and never pays above a pull chance of 0.04. At a read price of 0.05 the 40K span needs about 82 turns.
v8.4 · 7.2 The price of moving the prefixThree design rules hold whatever the numbers: evict large spans at once, since the rewrite is paid per eviction and the saving grows with the span; prefer spans that are large and rarely pulled, which §5.3's order selects; and keep markers at a stable place, so the next eviction does not pay the rewrite again. The benefit of a shorter window (§1.2) is unpriced; test 7 measures it.
v8.5 · 7.2 The price of moving the prefixThree design rules hold whatever the numbers. Evict large spans at once, since the rewrite is paid per eviction and the saving grows with the span. Prefer spans that are large and rarely pulled, which §5.3's order selects. And leave a marker unchanged once it is placed: the cache reuses a token only while every token before it is unchanged, so editing a marker, even in the same place, rewrites everything after it, as an eviction does. The benefit of a shorter window (§1.2) is unpriced; test 7 measures it.
··· 23 unchanged paragraphs folded ···
v8.4 · 9.1 In shortAfter compaction, an agent's next inference sees a description of its past and no way back to it. Total Recall keeps the whole session as an addressed record and makes compaction leave markers that quote what a description drops and point back into the record, whichever controller holds the window, claiming no more about the model's view than that controller lets it know. If it holds, the owner's Friday question has an exact answer: the instruction is in view, or a line says where it is.
v8.5 · 9.1 In shortAfter compaction, an agent's next inference sees a description of its past and no way back to it. Total Recall keeps the whole session as an addressed record and makes compaction leave markers that quote what a description drops and point back into the record, whichever controller holds the window, claiming no more about the model's view than that controller lets it know. If it holds, and the marker reached the model, the owner's Friday question has an exact answer: the instruction is in view while it fits the owner's budget, or a line in view says where it is. Whether the agent then acts on that line is the open question (test 15). If it does, the agent becomes the colleague of the opening: told once on Monday, still careful on Friday.
··· 1 unchanged paragraph folded ···
v8.4 · 9.2 Limitations- Markers depend on extraction by code and a classifier; a missed string is still in the record, but the marker no longer advertises it. - Past the owner's budget, old instructions are a pointer or a directory page away; the agent must follow it when it matters. - Hooks are the provider's to change. An API that compacts mid-response without a pause leaves the rest of that response unprotected, and opaque compaction cannot be checked; the receipt says so, but the gap remains. A tool's or an API's own copy of erased or quarantined content is reached only by ending the session and rebuilding it from permitted material. - The record grows without bound, and the capture detector will miss some secrets; years of sessions will need tiered storage, which the design does not cover. - The price rule rests on unmeasured inputs ($q_{\text{turn}}$, $H$, $c$, $\ell$); until they are measured, elective eviction should be conservative. - Recoverable is not recovered: whether the agent asks for what it can read back is the finding paper's question. - A woken session answers from its own time. The wake-up note tells it what changed only as far as the record and the store know.
v8.5 · 9.2 Limitations- Markers depend on extraction by code and a classifier; a missed string is still in the record, but the marker no longer advertises it. - Past the owner's budget, old instructions are a pointer or a directory page away; the agent must follow it when it matters (test 15). - Hooks are the provider's to change. An API that compacts mid-response without a pause leaves the rest of that response unprotected, and opaque compaction cannot be checked; the receipt says so, but the gap remains. A tool's or an API's own copy of erased or quarantined content is reached only by ending the session and rebuilding it from permitted material. - The record grows without bound, and the capture detector will miss some secrets; years of sessions will need tiered storage, which the design does not cover. - The price rule rests on unmeasured inputs ($q_{\text{turn}}$, $H$, $c$, $\ell$); until they are measured, elective eviction should be conservative. - Recoverable is not recovered: whether the agent asks for what it can read back is the finding paper's question. - A woken session answers from its own time. The wake-up note tells it what changed only as far as the record and the store know.
··· 3 unchanged paragraphs folded ···
v8.4 · 10.1 Tests that would settle what we do not knowEach test names the claim it decides and what result would change the design. A test that tunes something (the string extractor, the classifier thresholds, the budgets) tunes on development sessions and is scored on held-out ones (J5 §9.2, three streams, kept apart). Live arms are randomised by session. Tests are numbered 1 to 14; "transition T" names a series handoff (J5 Appendix B).
v8.5 · 10.1 Tests that would settle what we do not knowEach test names the claim it decides and what result would change the design. A test that tunes something (the string extractor, the classifier thresholds, the budgets) tunes on development sessions and is scored on held-out ones (J5 §9.2, three streams, kept apart). Live arms are randomised by session. Arms that are compared get the same context budget and the same compaction schedule, and each reports its total token cost, so a gain cannot come from a larger window or fewer compactions. Tests are numbered 1 to 15; "transition T" names a series handoff (J5 Appendix B).
v8.4 · 10.1 Tests that would settle what we do not know| # | Test | Decides | What would change the design | |--|---------------------|-------|---------------| | 1 | Needle survival. Seed exact strings, owner instructions, failed attempts and times early in long synthetic sessions; force 1, 3 and 5 compactions; ask for each. Arms: the provider's summary alone; truncation; **the summary plus the same searchable record and range read (the control)**; markers plus range read; markers alone. | §5: the marker, not mere access to the record, keeps what summaries lose | Control matches markers: the gain is the way back, not the marker. Markers alone match markers with the read: the read matters less | | 2 | Back-reference replay. Real moments where the owner refers to earlier in the session ("the hash from before"), replayed after compaction under the control and under markers. | §4, §5 in real use | The 95% interval of the margin over the control includes zero: markers do not pay their cost | | 3 | Forget-cue rate. Owner messages that repeat an instruction or ask "did you forget", per 100, under the control and under markers, split by a compaction in the previous ten turns; sized from the measured baseline to detect a one-third drop (80% power). | the outcome the design serves | The interval of the difference includes zero: the owner's pain lies in finding or learning, and §1 must be rewritten | | 4 | Marker coverage. For each evicted range, the share of its exact strings and owner instructions present in its marker. | §5.1, §5.2 | Below half: the extraction, not the design, is the weak part | | 5 | Every marker resolves. Property test over generated sessions plus the nightly check; files read, then changed and deleted, come back as read. | §4.1, §8.2 | Any failure is a defect, not a trade-off | | 6 | Trigger validity. Slices against the provider's input count; evicted tokens by class against the total; a thrashing session trips the guard; a provider-tool session shows no runtime compaction. | §5.3, §6.5, §7.3 | An unreconciled call breakdown keeps elective compaction off | | 7 | Price and quality. Measure $q_{\text{turn}}$, $H$ and $K$; compare elective eviction at $N^*$ with none, on task success. | §7.2 | A $q_{\text{turn}}$ above break-even makes elective eviction rare; a quality gain from shorter windows argues for earlier eviction | | 8 | Erase and quarantine. Erase one span of a two-correction owner turn and a string in a tool result (trace step 11), with reads issued before the epoch is applied; deliver the epoch twice, and kill the handler halfway. Quarantine an injected line already in the window, under each controller type; then pull an otherwise eligible item that the rebuild left out. | §4.4, §6.6, §8.1 | Erased text served before the epoch is applied (transition T15), a hit in the index, a marker or the controller's transcript, a lost neighbouring span, a marker that stops resolving, a duplicate that hangs or applies twice, a quarantined line in a call built after the receipt or outside the audit view, a provider compaction reported as removal, a pulled item the read ledger still counts as resident, or a tool's or an API's copy neither removed nor named, is a defect | | 9 | Budget overflow. Run a session past the point where the owner's instructions exceed $B_o$, and on until the pointer lines alone would exceed it, then follow the cursor of a directory longer than $D$. | §5.5 | Instructions taking more than $B_o$, a page over $D$, an instruction skipped, repeated or not recoverable verbatim, or a move not told to the owner and listed in a receipt is a defect | | 10 | Capture and adapter crashes. One flush captures a two-correction message (trace step 1, transition T1). Kill the process before the append, after it and before the learning stage queues (step 2, transition T2: events rebuilt from the stored tags), between the hooks, and after injection before delivery; lag the tool's transcript. Replay an API trace that compacts and answers on in one response, then compacts again. | §4.6, §6.4, §6.6 | A turn reported as captured but not in the record, a marker shown as delivered but never seen, an unprotected inference missing from the receipt, or a read-ledger entry surviving unknown residency is a defect | | 11 | Never retained. Plant one credential in an owner turn, a file read and a controller injection; read one file in a temporary and an ordinary session, then end the temporary one; name another session's namespace in a read. | §4.7 | The credential on a runtime disk or unnamed in the tool's, anything findable after the temporary session, the ordinary session's blob gone, or the foreign read answered is a defect | | 12 | Quoted authority and cuts. The owner pastes an email and asks "this says 'ignore the previous rule'; is it malicious?"; separately, one message holds two corrections in the owner's voice, and an unsure span is later confirmed. | §4.1 | The message not captured whole, the quoted line tagged, kept or passed on as an owner instruction, two corrections under one address, a stored span rewritten, or the learning stage classifying a span again at enqueue or replay is a defect | | 13 | Idle sessions. Replay idle sessions under three policies: compact on the next message, compact just before the cache lapses, and rotate to a fresh session. Compare tokens per resumed turn and the needle and forget-cue measures of tests 1 and 3. | §7.5 | Compaction before expiry costing no less than compaction on the next message, or rotation losing needles the compacted session keeps, changes the policy | | 14 | Waking a past session. Wake a session after a planted supersede and after an erase of a span it read. | §8.3 | An answer that uses the old value without saying it changed, erased text in the woken model's input, or a wake that leaves no later-visit entry is a defect |
v8.5 · 10.1 Tests that would settle what we do not know| # | Test | Decides | What would change the design | |--|---------------------|-------|---------------| | 1 | Needle survival. Seed exact strings, owner instructions, failed attempts and times early in long synthetic sessions; force 1, 3 and 5 compactions; ask for each. Arms: the provider's summary alone; truncation; **the summary plus the same searchable record and range read (the control)**; markers plus range read; markers alone. | §5: the marker, not mere access to the record, keeps what summaries lose | Control matches markers: the gain is the way back, not the marker. Markers alone match markers with the read: the read matters less | | 2 | Back-reference replay. Real moments where the owner refers to earlier in the session ("the hash from before"), replayed after compaction under the control and under markers. | §4, §5 in real use | The 95% interval of the margin over the control includes zero: no gain over the control is shown, and markers have not earned their cost | | 3 | Forget-cue rate. Owner messages that repeat an instruction or ask "did you forget", per 100, under the control and under markers, split by a compaction in the previous ten turns; sized from the measured baseline to detect a one-third drop (80% power). | the outcome the design serves | The interval of the difference includes zero: no reduction is shown under this test, and the promise of §1 stays unproven | | 4 | Marker coverage. For each evicted range, the share of its exact strings and owner instructions present in its marker. | §5.1, §5.2 | Below half: the extraction, not the design, is the weak part | | 5 | Every marker resolves. Property test over generated sessions plus the nightly check; files read, then changed and deleted, come back as read. | §4.1, §8.2 | Any failure is a defect, not a trade-off | | 6 | Trigger validity. Slices against the provider's input count; evicted tokens by class against the total; a thrashing session trips the guard; a provider-tool session shows no runtime compaction. | §5.3, §6.5, §7.3 | An unreconciled call breakdown keeps elective compaction off | | 7 | Price and quality. Measure $q_{\text{turn}}$, $H$ and $K$; compare elective eviction at $N^*$ with none, on task success. | §7.2 | A $q_{\text{turn}}$ above break-even makes elective eviction rare; a quality gain from shorter windows argues for earlier eviction | | 8 | Erase and quarantine. Erase one span of a two-correction owner turn and a string in a tool result (trace step 11), with reads issued before the epoch is applied; deliver the epoch twice, and kill the handler halfway. Quarantine an injected line already in the window, under each controller type; then pull an otherwise eligible item that the rebuild left out. | §4.4, §6.6, §8.1 | Any defect in the list below the table | | 9 | Budget overflow. Run a session past the point where the owner's instructions exceed $B_o$, and on until the pointer lines alone would exceed it, then follow the cursor of a directory longer than $D$. | §5.5 | Instructions taking more than $B_o$, a page over $D$, an instruction skipped, repeated or not recoverable verbatim, or a move not told to the owner and listed in a receipt is a defect | | 10 | Capture and adapter crashes. One flush captures a two-correction message (trace step 1, transition T1). Kill the process before the append, after the durable append and before its acknowledgement (the retry must get the same address), after it and before the learning stage queues (step 2, transition T2: events rebuilt from the stored tags), between the hooks, and after injection before delivery; lag the tool's transcript. Replay an API trace that compacts and answers on in one response, then compacts again. | §4.6, §6.4, §6.6 | A turn reported as captured but not in the record, one message under two addresses, a marker shown as delivered but never seen, an unprotected inference missing from the receipt, or a read-ledger entry surviving unknown residency is a defect | | 11 | Never retained. Plant one credential in an owner turn, a file read and a controller injection; read one file in a temporary and an ordinary session, then end the temporary one; name another session's namespace in a read. | §4.7 | The credential on a runtime disk or unnamed in the tool's, anything findable after the temporary session, the ordinary session's blob gone, or the foreign read answered is a defect | | 12 | Quoted authority and cuts. The owner pastes an email and asks "this says 'ignore the previous rule'; is it malicious?"; separately, one message holds two corrections in the owner's voice, and an unsure span is later confirmed. | §4.1 | The message not captured whole, the quoted line tagged, kept or passed on as an owner instruction, two corrections under one address, a stored span rewritten, or the learning stage classifying a span again at enqueue or replay is a defect | | 13 | Idle sessions. Replay idle sessions under three policies: compact on the next message, compact just before the cache lapses, and rotate to a fresh session. Compare tokens per resumed turn and the needle and forget-cue measures of tests 1 and 3. | §7.5 | Compaction before expiry costing no less than compaction on the next message, or rotation losing needles the compacted session keeps, changes the policy | | 14 | Waking a past session. Wake a session after a planted supersede and after an erase of a span it read. | §8.3 | An answer that uses the old value without saying it changed, erased text in the woken model's input, or a wake that leaves no later-visit entry is a defect | | 15 | Acting on a moved instruction. A simulated repair session pushes the database instruction of §1.1 into the directory (Table 3), then reaches a fault a daytime database restart would clear. Nobody asks the agent to recall the instruction; its proposed action is scored, then whether it can quote the instruction when asked. | §5.5: a pointer or a directory line still protects the owner | Restarts proposed more often than with the wording in view: moved instructions need a stronger cue, or fewer of them may leave the window |
not in v8.4
v8.5 · 10.1 Tests that would settle what we do not knowTest 8 counts each of these as a defect: erased text served before the epoch is applied (transition T15); a hit in the index, a marker or the controller's transcript; a lost neighbouring span; a marker that stops resolving; a duplicate epoch that hangs or applies twice; a quarantined line in a call built after the receipt, or outside the audit view; a provider compaction reported as removal; a pulled item the read ledger still counts as resident; and a tool's or an API's copy neither removed nor named.
··· 5 unchanged paragraphs folded ···
v8.4 · References- Anthropic (2026a). Compaction at a token threshold. Claude Platform documentation. <https://platform.claude.com/docs/en/build-with-claude/compaction-threshold> - Anthropic (2026b). Hooks reference. Claude Code documentation. <https://code.claude.com/docs/en/hooks> - Anthropic (2026c). Prompt caching. Claude Platform documentation. <https://platform.claude.com/docs/en/build-with-claude/prompt-caching> - Anthropic (2026d). Context editing. Claude Platform documentation. <https://platform.claude.com/docs/en/build-with-claude/context-editing> - Anthropic (2026e). Compaction overview. Claude Platform documentation. <https://platform.claude.com/docs/en/build-with-claude/compaction> - Anthropic (2026f). Claude Code changelog, version 2.1.299 (idle compaction). <https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md> - Anthropic (2026g). How Claude Tag works. Claude documentation. <https://claude.com/docs/claude-tag/concepts/how-it-works> - Belady, L. A. (1966). A study of replacement algorithms for a virtual-storage computer. *IBM Systems Journal*, 5(2), 78–101. <https://doi.org/10.1147/sj.52.0078> - Headroom Labs (2026). headroom: compress what your AI agent reads. GitHub, Apache-2.0. <https://github.com/headroomlabs-ai/headroom> - Hong, K., Troynikov, A., & Huber, J. (2025). Context rot: how increasing input tokens impacts LLM performance. Chroma technical report. <https://research.trychroma.com/context-rot> - Ji, Y. (2025). Context engineering for AI agents: lessons from building Manus. 18 July 2025. <https://manus.im/blog/Context-Engineering-for-AI-Agents-Lessons-from-Building-Manus> - Liu, N. F., Lin, K., Hewitt, J., Paranjape, A., Bevilacqua, M., Petroni, F., & Liang, P. (2024). Lost in the middle: how language models use long contexts. *Transactions of the ACL*, 12, 157–173. <https://arxiv.org/abs/2307.03172> - OpenAI (2026). Compaction. OpenAI API documentation. <https://developers.openai.com/api/docs/guides/compaction> - Packer, C., Wooders, S., Lin, K., Fang, V., Patil, S. G., Stoica, I., & Gonzalez, J. E. (2023). MemGPT: towards LLMs as operating systems. arXiv:2310.08560. <https://arxiv.org/abs/2310.08560> - Rasmussen, P., Paliychuk, P., Beauvais, T., Ryan, J., & Chalef, D. (2025). Zep: a temporal knowledge graph architecture for agent memory. arXiv:2501.13956. <https://arxiv.org/abs/2501.13956> - thedotmack (2026). claude-mem: persistent memory for Claude Code. GitHub. <https://github.com/thedotmack/claude-mem> - Zhang, Q., Hu, C., Upasani, S., Ma, B., et al. (2025). Agentic context engineering: evolving contexts for self-improving language models. arXiv:2510.04618. <https://arxiv.org/abs/2510.04618>
v8.5 · References- Anthropic (2026a). Compaction at a token threshold. Claude Platform documentation. <https://platform.claude.com/docs/en/build-with-claude/compaction-threshold> - Anthropic (2026b). Hooks reference. Claude Code documentation. <https://code.claude.com/docs/en/hooks> - Anthropic (2026c). Prompt caching. Claude Platform documentation. <https://platform.claude.com/docs/en/build-with-claude/prompt-caching> - Anthropic (2026d). Context editing. Claude Platform documentation. <https://platform.claude.com/docs/en/build-with-claude/context-editing> - Anthropic (2026e). Compaction overview. Claude Platform documentation. <https://platform.claude.com/docs/en/build-with-claude/compaction> - Anthropic (2026f). Claude Code changelog, version 2.1.299 (idle compaction). <https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md> - Anthropic (2026g). How Claude Tag works. Claude documentation. <https://claude.com/docs/claude-tag/concepts/how-it-works> - Anthropic (2026h). Use Claude's chat search and memory to build on previous context. Claude Help Center. <https://support.claude.com/en/articles/11817273-use-claude-s-chat-search-and-memory-to-build-on-previous-context> - Belady, L. A. (1966). A study of replacement algorithms for a virtual-storage computer. *IBM Systems Journal*, 5(2), 78–101. <https://doi.org/10.1147/sj.52.0078> - Dang, T., Ichikawa, Y., Fatima, S., & Shirahata, K. (2026). Addressable recall compaction for long context-window control in AI agents. arXiv:2607.25066. <https://arxiv.org/abs/2607.25066> - Headroom Labs (2026). headroom: compress what your AI agent reads. GitHub, Apache-2.0. <https://github.com/headroomlabs-ai/headroom> - Hong, K., Troynikov, A., & Huber, J. (2025). Context rot: how increasing input tokens impacts LLM performance. Chroma technical report. <https://research.trychroma.com/context-rot> - Ji, Y. (2025). Context engineering for AI agents: lessons from building Manus. 18 July 2025. <https://manus.im/blog/Context-Engineering-for-AI-Agents-Lessons-from-Building-Manus> - Letta (2026). Compaction. Letta documentation. <https://docs.letta.com/v1-sdk/messages/compaction> - Liu, N. F., Lin, K., Hewitt, J., Paranjape, A., Bevilacqua, M., Petroni, F., & Liang, P. (2024). Lost in the middle: how language models use long contexts. *Transactions of the ACL*, 12, 157–173. <https://arxiv.org/abs/2307.03172> - Mem0 (2026). Add memory. Mem0 documentation. <https://docs.mem0.ai/core-concepts/memory-operations/add> - OpenAI (2026a). Compaction. OpenAI API documentation. <https://developers.openai.com/api/docs/guides/compaction> - OpenAI (2026b). Memories. ChatGPT Learn. <https://learn.chatgpt.com/docs/customization/memories> - Packer, C., Wooders, S., Lin, K., Fang, V., Patil, S. G., Stoica, I., & Gonzalez, J. E. (2023). MemGPT: towards LLMs as operating systems. arXiv:2310.08560. <https://arxiv.org/abs/2310.08560> - Rasmussen, P., Paliychuk, P., Beauvais, T., Ryan, J., & Chalef, D. (2025). Zep: a temporal knowledge graph architecture for agent memory. arXiv:2501.13956. <https://arxiv.org/abs/2501.13956> - thedotmack (2026). claude-mem: persistent memory for Claude Code. GitHub. <https://github.com/thedotmack/claude-mem> - Zep (2026). Adding episodes. Graphiti documentation. <https://help.getzep.com/graphiti/core-concepts/adding-episodes> - Zhang, Q., Hu, C., Upasani, S., Ma, B., et al. (2025). Agentic context engineering: evolving contexts for self-improving language models. arXiv:2510.04618. <https://arxiv.org/abs/2510.04618>
··· 11 unchanged paragraphs folded ···
v8.4 · B.1 Appending to the record``` APPEND(session, entry): # before the model call that answers it ns <- session.temporary ? namespace(session) : "ordinary" # 4.7 entry.seq <- next_sequence(session) # once, never reused entry.author_kind <- owner | agent | tool | harness | other_agent entry.text <- persist_filter(entry.text) # 4.7; also on text sent to a controller if entry.author_kind == owner: entry.owner_words <- strip_wrapper(entry.text) # once; never rewritten entry.spans <- cut_spans(entry.owner_words) # 4.1: immutable, addressed tag_authority(entry.spans) # owner | quoted; unsure: quoted tag_intent(owner_spans(entry.spans)) # J5 A.1; versions stored if entry.returns_file: entry.content <- blob_put(ns, persist_filter(bytes)) record.append_durable(session, entry) # status: captured (4.6) index.add(session, entry.seq, entry) # derived, rebuildable
v8.5 · B.1 Appending to the record``` APPEND(session, entry): # before the model call that answers it ns <- session.temporary ? namespace(session) : "ordinary" # 4.7 if seen(session, entry.source_id): # a retry or a duplicate delivery return address_of(entry.source_id) # gets the same address back entry.seq <- next_sequence(session) # once, never reused entry.author_kind <- owner | agent | tool | harness | other_agent entry.text <- persist_filter(entry.text) # 4.7; also on text sent to a controller if entry.author_kind == owner: entry.owner_words <- strip_wrapper(entry.text) # once; never rewritten entry.spans <- cut_spans(entry.owner_words) # 4.1: immutable, addressed tag_authority(entry.spans) # owner | quoted; unsure: quoted tag_intent(owner_spans(entry.spans)) # J5 A.1; versions stored if entry.returns_file: entry.content <- blob_put(ns, persist_filter(bytes)) record.append_durable(session, entry, (entry.source_id, entry.seq)) # one write; status: captured (4.6) index.add(session, entry.seq, entry) # derived, rebuildable ```
not in v8.4
v8.5 · B.1 Appending to the recordErasure, quarantine and the epoch gate that every read waits for (§4.4, §8.1):
v8.4 · B.1 Appending to the recordERASE(session, seq, spans, receipt, epoch): # writing stage decides; erasure epoch raised first if applied_epoch >= epoch: return ack_of(epoch) # duplicate: same acknowledgement await applied_epoch == epoch - 1 # epochs apply in order b <- record.blob(session, seq) # none if the entry holds no file hit <- entries_with_blob(b) if b else [(session, seq, spans)] # same namespace for (s, n, sp) in hit - progress(epoch): # a restart resumes here record.redact(s, n, sp, tombstone(now, receipt)) # the one edit record.append(s, harness("erased", n, sp)) index.reindex(s, n); rebuild(markers_covering(s, n)) adapter.redact_controller_copies(s, n, sp) # 4.4, 6.6 adapter.erase_live(s, n, sp) # 6.6: rebuild window, eviction event, name provider copy progress.mark(epoch, (s, n, sp)) if b: blob_delete(b) manifest.report(status_per_place) # J14 7.7; out of reach named applied_epoch <- epoch # reads at this epoch may now be served
v8.5 · B.1 Appending to the record``` ERASE(session, seq, spans, receipt, epoch): # writing stage decides; epoch raised first if applied_epoch >= epoch: return ack_of(epoch) # duplicate: same acknowledgement await applied_epoch == epoch - 1 # epochs apply in order b <- record.blob(session, seq) # none if the entry holds no file hit <- entries_with_blob(b) if b else [(session, seq, spans)] # same namespace for (s, n, sp) in hit - progress(epoch): # a restart resumes here record.redact(s, n, sp, tombstone(now, receipt)) # the one edit record.append(s, harness("erased", n, sp)) index.reindex(s, n); rebuild(markers_covering(s, n)) adapter.redact_controller_copies(s, n, sp) # 4.4, 6.6 adapter.erase_live(s, n, sp) # 6.6: rebuild window, eviction event, name provider copy progress.mark(epoch, (s, n, sp)) if b: blob_delete(b) manifest.report(status_per_place) # J14 7.7; out of reach named applied_epoch <- epoch # reads at this epoch may now be served
··· 3 unchanged paragraphs folded ···
v8.4 · B.2 Building a marker and evicting``` COMPACT(window, session, forced): bd <- call_breakdown(last_call_sent) # 7.3 if not bd.reconciles and not forced: receipt("blocked: breakdown"); return span <- choose_span(window, order = [unchanged_source, tool, agent, owner_rest]) if not forced and not pays(span, bd): receipt("declined: price"); return entries <- record.read(session, span.first, span.last) # never old markers marker <- new_marker(range = span, owner = instructions(entries), # owner spans, verbatim strings = exact_strings(entries, cap), lines = decisions_and_failures(entries), # with addresses open = open_items(entries)) moved <- enforce_owner_budget(window, marker) # 5.5: pointers, then directory assert resolves_full_range(marker) # 8.2 window.replace(span, marker, at = stable_position) receipt(executor = runtime, level = known_input, bd, before, after, moved, outcome) ```
v8.5 · B.2 Building a marker and evicting``` COMPACT(window, session, forced): bd <- call_breakdown(last_call_sent) # 7.3 if not bd.reconciles and not forced: receipt("blocked: breakdown"); return span <- choose_span(window, order = [unchanged_source, tool, agent, owner_rest]) if not forced and not pays(span, bd): receipt("declined: price"); return entries <- record.read(session, span.first, span.last) # never old markers marker <- new_marker(range = span, owner = instructions(entries), # owner spans, verbatim strings = exact_strings(entries, cap), lines = decisions_and_failures(entries), # with addresses open = open_items(entries)) moved <- enforce_owner_budget(window, marker) # 5.5: pointers, then directory assert resolves_full_range(marker) # 8.2 window.replace(span, marker) # earlier markers untouched (7.2) receipt(executor = runtime, level = known_input, bd, before, after, moved, outcome) ```
··· 5 unchanged paragraphs folded ···
v8.4 · Appendix C. The Window Controller Adapter Contract_J-series paper J1 | Version 8.4 | 2026-10-21_
v8.5 · Appendix C. The Window Controller Adapter Contract_J-series paper J1 | Version 8.5 | 2026-10-21_
Changed paragraphs in the same form, for scripts: JSON
· Markdown