# INSTANT RECALL: Finding What the Agent Already Owns: v7.8 → v8.0

From v7.8 (29 Jul) to v8.0 (12 Oct): 9,592 words to 8,941 words, 8,627 words in new or rewritten paragraphs and 9,278 taken out, 366 paragraphs changed.

## Change note of v8.0

**Rewritten: finding what you already own, not a fast concept index**

A new paper under the old name. The thesis moves from a fast concept index to what the author now calls an ownership miss: the assistant has a skill, a machine's login, a past decision or a past session that the task needs, and does not reach for it, often because it shares no word with the request. Almost every section is new, and the old benchmark numbers are gone: this is presented as a design, with the tests that would prove it.

- Two indexes side by side, one over text and one over what the owner owns.
- Each entry keyed four ways: its name, its topic, the situations it helps in, and what is usually fetched with it.
- Before each turn a short list of pointers is pushed in after the part of the prompt the provider caches, with a reserved place for anything the owner names; a cheap search covers the rest.
- A cost model on published prices decides what goes in whole and what goes in as a pointer.
- Judged by replaying the owner's own corrections ("you have a skill for this").
- The improvement notes from August and September show where it came from: a measured signal of what is read together, and the point that memories need keys for what they could be used for.

## Changed paragraphs

Marks: [-removed-] {+added+}.

### Abstract

[-Persistent AI agents accumulate months of interaction history yet routinely fail to retrieve knowledge they demonstrably own. We formalize this as **Contextual Ownership Retrieval Failure (CORF)**, identify four failure modes from eighteen months of deployment logs, and introduce **Instant Recall** — a pre-computed concept-to-memory index that resolves retrieval _before the model processes the prompt_. By mapping anchor vocabulary terms to pre-ranked memory clusters offline, Instant Recall achieves 0.85 CORF-Recall@20 at 54ms p95 latency — a 5.9× speedup over MemGPT-style sequential retrieval (0.79 at 320ms) — with a false positive rate of 0.18 and zero inference-time search computation. A probabilistic source-coverage analysis establishes that parallel source aggregation, not query quality, is the binding constraint on retrieval completeness. Concept anchoring closes the 9-point recall gap that remains after source coverage is saturated. Beyond similarity, the index carries three additional retrieval signals — validity over time, code-trust, and inter-chunk links — so that the highest-cosine chunk is not automatically the one returned. We position Instant Recall against contemporary open-source agent-context systems — most directly headroom's reversible Compress-Cache-Retrieve compression layer — and report an independent embedding measurement that scopes which of our forward-looking signals a frozen embedding model can and cannot carry.-]

### Abstract

[-**Keywords:** AI agent memory, episodic retrieval, cognitive architectures, RAG, hippocampal indexing, context management, sleep consolidation, CORF-]

### Abstract

{+A smell from a kitchen can bring back a whole afternoon: the room, the voices, what you were about to do next. You did not search for it. A small structure deep in the brain, the hippocampus, keeps an index of where the pieces of each experience are stored, and it completes the whole memory from a fragment. Picture an assistant that did this for you. You mention that a download is blocked, and it already has in mind the helper you built together last month, the machine whose login is written in your notes, and what you decided about that portal last week.+}

### Abstract

{+Assistants now keep plenty: whole session records, notes, catalogues of skills. But their owners still have to tell them "you have a skill for this" or "you know where that login is". What they miss is seldom a note that a word in the request would find. It is something the owner owns, a skill, a procedure, a machine, a decision or a way of solving a problem, and it often shares no word with the request. Where a search tool exists the agent does not think to call it, and the context pushed into every turn fills up with old documents and breaks the prompt cache.+}

### Abstract

{+We propose a design for the finding stage of an agent's memory. It keeps two indexes side by side, one over text and one over what the owner owns. Every entry is keyed by its name, by its topic, by the situations it helps in (written down when it is stored) and by what tends to be fetched with it. Before each turn the agent receives a short list of pointers, placed after the part of the prompt the provider caches, with a guaranteed place for anything the owner names. A cheap search covers the rest. The design is judged by replaying the owner's own corrections.+}

### Abstract

{+For your assistant this means fewer moments where you remind it of what it already has, a pushed list that stays empty when nothing fits, and a cached prompt that memory never disturbs. A cost model built on published prices decides what goes in whole and what goes in as a pointer. This is a design; Section 9 names the tests that would prove it.+}

### Abstract

{+If it holds, your assistant stops asking what you mean by "the one we did last time".+}

### 1. Introduction

[-The gap between what a persistent AI agent _knows_ and what it _retrieves_ is one of the least-studied problems in agent architecture. As agents accumulate months of interaction history, project notes, and documents, the memory base grows faster than the retrieval mechanisms designed to access it. The result is not amnesia — the data exists — but _retrieval failure under load_.-]

### 1. Introduction

[-Consider a concrete scenario. An agent has collaborated with its user on six technical papers over eighteen months, stored across a local memory directory, an imported ChatGPT archive, and a project index. The user asks: _"Can we talk about peer review for our papers?"_ The agent responds: _"What type of papers are you referring to?"_-]

### 1. Introduction

[-This is not a hallucination or a context-length problem. The agent has the data. The failure is architectural: retrieval was not triggered by the right signals, did not search the right sources, and could not surface the right memories within a single inference step's latency budget.-]

### 1. Introduction

[-We call this **Contextual Ownership Retrieval Failure (CORF)** and argue it is endemic to current agent memory architectures. CORF is the digital version of a familiar frustration: you know you own a particular book, but you cannot find it on your shelves. The book exists; the index just cannot locate it.-]

### 1. Introduction

[-The solution takes its name and its shape from the brain. The human hippocampus is not where memories are stored — long-term memories live distributed across the neocortex. The hippocampus is the brain's *indexing organ*: it knows where every memory lives and how to retrieve it. The clinical evidence is stark. Patient H.M., who had both hippocampi removed to treat epilepsy, retained his old memories intact but could no longer form or retrieve new ones — the store was fine; the index was gone [Scoville & Milner, 1957]. **Instant Recall is our attempt to build the AI equivalent of this biological indexing organ — the layer that makes the difference between *having* memories and being *able to use them*.** It draws the same structural separation: a pre-computed concept index, built offline during a nightly consolidation phase, maps anchor vocabulary terms to their nearest memory clusters in embedding space [Teyler & DiScenna, 1986]. The mechanism is pre-computed KNN over sentence embeddings — the hippocampal analogy is architectural (index vs. store), not mechanistic. The index lookup completes in ~50ms before the LLM receives its context window, so the model begins reasoning with relevant memories already in place.-]

### 1. Introduction

[-The anchor index behaves like the index at the back of a book. Look up "photosynthesis" and it tells you pages 42, 87, and 156. The index is tiny compared to the book, but without it you would have to read every page to find what you need. Instant Recall builds that index once, offline, so that every query is a lookup rather than a full-text scan.-]

### 1. Introduction

[-**Scope note:** This paper addresses deployments up to ~50,000 memory chunks (roughly 2–3 years of personal assistant history). Large-scale adaptations for 100,000+ chunks are discussed in Section 8.-]

### 1.1 Where the Index Sits in a Memory Stack

[-### 1.1 Where the Index Sits in a Memory Stack-]

### 1.1 Where the Index Sits in a Memory Stack

[-Instant Recall is the retrieval layer of a complete agent memory stack, and it is designed to interoperate cleanly with two neighbouring layers without depending on either one's internals.-]

### 1.1 Where the Index Sits in a Memory Stack

[-Below it sits a **storage layer**: any mechanism that persists every interaction as a typed, timestamped event and compacts older events into lightweight pointers — summaries that preserve the essential content while reducing storage by 80–95%. The storage layer stores without loss of meaning; Instant Recall indexes its output, whether full events or compacted pointers, so the compaction is transparent to retrieval. A concrete, externally maintained instance of exactly this layer now exists in headroom's reversible Compress-Cache-Retrieve design (§2.4); Instant Recall is engineered to sit on top of such a layer, not to replace it.-]

### 1.1 Where the Index Sits in a Memory Stack

[-Above it sits a **reflection layer**: a nightly cycle that reviews which retrievals succeeded and which failed, then adjusts the index parameters — anchor term selection, importance weights, chunk boundaries — based on observed patterns. The retrieval layer thus improves without any code change.-]

### 1.1 Where the Index Sits in a Memory Stack

[-The contract between them is narrow: the storage layer must expose, per chunk, a content string, a timestamp, and a source label; the reflection layer reads retrieval outcomes and writes back tuned parameters. Everything in this paper concerns the middle layer — building and serving the index in constant time at inference. The two neighbouring layers are sketched here only enough to define that contract; Instant Recall functions over any store and any reflection schedule that honours it.-]

### 1.1 Where the Index Sits in a Memory Stack

[-![The memory stack. A storage layer persists and compacts events into the chunk store; Instant Recall builds and serves the concept index over that store; a reflection layer reflects nightly and tunes the index parameters. Each arrow shows what flows between layers.](images/three-layer-system.png)-]

### 1.1 Where the Index Sits in a Memory Stack

[-**Primary contributions:**-]

### 1.1 Where the Index Sits in a Memory Stack

[-1. **Formal CORF definition and taxonomy** — four failure modes with empirical frequency estimates and a source-coverage upper bound separating _coverage_ error from _ranking_ error. 2. **Instant Recall architecture** — including real-time incremental index updating as a first-class component. 3. **Importance scoring** — a centered salience weight (base + recency + access + link bonuses) that re-ranks within ±15% of cosine, so decisions and frequently-revisited content surface without overriding strong semantic matches. 4. **Deduplication via similarity check** — prevents index bloat from recurring logs. 5. **Post-retrieval re-ranking** — reduces false positive injection. 6. **Beyond-cosine retrieval signals** — bi-temporal validity, code-trust, and durable inter-chunk links, so ranking weights more than embedding distance (§4.9). 7. **Design space analysis** — comparison against inverted index, all-sources ANN, multi-source RAG, knowledge graph, and vector database alternatives, and positioning against contemporary open-source agent-context systems (§2.4). 8. **Evaluation protocol + artifacts** — metrics, baselines, ablations, and an annotated CORF dataset from deployment logs.-]

### 2. Background and Related Work

[-## 2. Background and Related Work-]

### 2.1 Persistent Agent Memory Systems

[-### 2.1 Persistent Agent Memory Systems-]

### 2.1 Persistent Agent Memory Systems

[-Memory in AI agents has evolved from pure in-context storage toward hierarchical architectures separating short-term working memory from long-term storage. The dominant paradigm is Retrieval-Augmented Generation (RAG): relevant documents are fetched and injected into the context window at inference time [Lewis et al., 2020]. Instant Recall complements RAG by pre-computing a small anchor→chunk index so retrieval cost is constant in corpus size and independent of query quality.-]

### 2.1 Persistent Agent Memory Systems

[-Recent work has expanded the field. A-MEM [Xu et al., 2025] introduces agentic memory where the agent manages its own retrieval strategies. Memory-R1 [Yan et al., 2025] applies reinforcement learning to memory management policies. LongMemEval [Wu et al., 2024] benchmarks long-term interactive memory. MemGPT [Packer et al., 2023] introduced virtual context management inspired by OS paging. Mem0 [MemoryOS, 2024] builds a multi-level memory architecture. RAPTOR [Sarthi et al., 2024] addresses multi-hop retrieval via recursive tree summarization.-]

### 2.2 The Neighbouring Layers Instant Recall Assumes

[-### 2.2 The Neighbouring Layers Instant Recall Assumes-]

### 2.2 The Neighbouring Layers Instant Recall Assumes

[-Two layers bracket the retrieval mechanism, and Instant Recall is engineered against their interfaces rather than their implementations.-]

### 2.2 The Neighbouring Layers Instant Recall Assumes

[-A **compaction-based storage layer** defines persistent agent memory as a cache-eviction system: raw events are written to an event log, then a compaction algorithm promotes high-salience content to long-term storage while evicting low-salience content into lossy-but-meaning-preserving pointers. Such a layer supplies the substrate Instant Recall operates on — the nightly rebuild consumes its event files as primary input — but Instant Recall requires only the `(content, timestamp, source)` triple from it, not its eviction policy.-]

### 2.2 The Neighbouring Layers Instant Recall Assumes

[-An **identity layer** addresses agent identity drift across session boundaries by injecting a persona-state structure into every session's system prompt. That layer assumes relevant memories can be retrieved; Instant Recall makes the assumption true by supplying context chunks at every prompt, before the model begins processing.-]

### 2.2 The Neighbouring Layers Instant Recall Assumes

[-A **reflection layer** runs a nightly cycle that audits retrieval outcomes and tunes Instant Recall's parameters (§4.10). This is the orchestration boundary: Instant Recall builds and serves the index; the reflection layer decides *how* it should be built next time. Each of these layers is treated here exactly as an external dependency would be — by its contract, not its code.-]

### 2.3 Neuroscience Basis

[-### 2.3 Neuroscience Basis-]

### 2.3 Neuroscience Basis

[-The biological hippocampus is a medial temporal lobe structure critical for episodic memory formation and retrieval. Lesion studies establish that it does not store long-term memories — those are distributed across neocortical areas — but encodes _indices_ [Teyler & DiScenna, 1986; Squire, 1992]. Patient H.M.'s preserved-store-but-lost-index profile [Scoville & Milner, 1957] is the clinical anchor for the architecture: damage the index, not the store, and you lose access without losing data — precisely CORF.-]

### 2.3 Neuroscience Basis

[-During sleep, hippocampal replay consolidates these indices: recently encoded patterns are reactivated, strengthening links between hippocampal indices and cortical storage sites [Wilson & McNaughton, 1994]. This offline consolidation is what our nightly rebuild phase implements.-]

### 2.4 Contemporary Open-Source Agent-Context Systems

[-### 2.4 Contemporary Open-Source Agent-Context Systems-]

### 2.4 Contemporary Open-Source Agent-Context Systems

[-Two open-source projects shipping in 2025–2026 sit close enough to Instant Recall in the agent-context stack to warrant explicit, first-class positioning. They are fresher than the static literature above and, in one case, set a reproducibility bar this paper must answer to.-]

### 2.4 Contemporary Open-Source Agent-Context Systems

[-**headroom (Chopra Tejas et al.; ~24.7k★, Apache-2.0).** headroom is a context-compression layer for agents built on reversible **CCR — Compress-Cache-Retrieve**: originals are cached and the model retrieves them on demand, with per-content-type compressors (statistical JSON-array crushing via *SmartCrusher*, AST-aware code compression via tree-sitter, plus log/diff/text handlers) and a trained compression model (*Kompress-v2-base*, released on HuggingFace). It reports 60–95% token savings at near-zero accuracy delta and ships a runnable, public evaluation suite (`python -m headroom.evals`) measured on GSM8K, TruthfulQA, SQuAD, and BFCL.-]

### 2.4 Contemporary Open-Source Agent-Context Systems

[-headroom is the strongest external instantiation of exactly the compaction-based storage layer Instant Recall assumes *below* it (§1.1, §2.2): both compact-then-retrieve-on-demand, and both preserve originals losslessly. The honest line between them is one of altitude, not competition. headroom compacts the *active context window of a single agent run* — a working-set / paging concern, specialized by content type — whereas Instant Recall indexes the *persistent, cross-session store* by concept anchor with retrieval cost independent of corpus size. They are vertically adjacent in design, but adjacency is a claim about the live traffic path, not merely compatible interfaces. In one deployment, headroom was installed, enabled, and referenced by the gateway environment yet served only six requests over its lifetime and saved zero tokens because the active CLI subprocess did not receive the integration setting. This is one wiring defect, not evidence about compression quality; it shows that a combined stack must report lower-layer request counts before claiming that the integration is operational. What headroom does that Instant Recall does not is per-content-type compressors and a *learned* compression model. What Instant Recall does that headroom does not is decide *which* memories to surface before the model runs — a concept→cluster index — plus the beyond-cosine validity/trust/link signals of §4.9. headroom answers "how do I fit this content in the window losslessly"; Instant Recall answers "which of months of stored content belongs in the window at all." A second, sharper debt to headroom is reproducibility, addressed directly in §8.4: it demonstrates that an agent-memory-adjacent system *can* publish a re-runnable harness over standard public datasets, which is the bar Instant Recall's own evaluation has not yet cleared.-]

### 2.4 Contemporary Open-Source Agent-Context Systems

[-**addyosmani/agent-skills (Addy Osmani; ~56.8k★).** A discipline/skill library for coding agents. It is not a memory system and does not retrieve over a persistent store, so it is not a baseline for CORF. It is relevant only for one transferable practice it formalizes — a *context-contract* file that an agent reads before acting, separating reusable capability description from per-task state. Instant Recall's narrow `(content, timestamp, source)` storage contract and the reflection-layer parameter contract (§2.2, §4.10) are the memory-stack analogue of that discipline; we note the convergence rather than claim derivation.-]

### 3. Problem Formulation: Contextual Ownership Retrieval Failure (CORF)

[-## 3. Problem Formulation: Contextual Ownership Retrieval Failure (CORF)-]

### 3.1 Formal Definition

[-### 3.1 Formal Definition-]

### 3.1 Formal Definition

[-Let $M = \{m_1, m_2, \ldots, m_n\}$ be the agent's long-term memory, where each $m_i$ is a memory chunk with content $c_i$, timestamp $t_i$, source $s_i \in S$, and salience score $\sigma_i$.-]

### 3.1 Formal Definition

[-**Definition (CORF).** A Contextual Ownership Retrieval Failure occurs when:-]

### 3.1 Formal Definition

[-1. There exists $m^* \in M$ such that $m^*$ is ground-truth relevant to $q$. 2. $m^* \notin R(q, M)$ — the retrieval function fails to surface $m^*$. 3. The agent generates a response $a$ that contradicts, ignores, or is incompatible with the content of $m^*$.-]

### 3.2 Failure Modes

[-### 3.2 Failure Modes-]

### 3.2 Failure Modes

[-**Mode 1 — Pronoun Blindness.** The query uses pronouns ("our papers", "we wrote") without explicit noun anchors.-]

### 3.2 Failure Modes

[-**Mode 2 — Associative Depth Failure.** The relevant memory requires two or more associative hops from query terms.-]

### 3.2 Failure Modes

[-**Mode 3 — Source Blindness.** The relevant memory exists in a source not queried at inference time.-]

### 3.2 Failure Modes

[-**Mode 4 — Anchor Silence.** A domain-significant noun is present in the query but is not in the index's vocabulary, so it triggers no retrieval at all.-]

### 3.3 Probabilistic Source-Coverage Analysis

[-### 3.3 Probabilistic Source-Coverage Analysis-]

### 3.3 Probabilistic Source-Coverage Analysis

[-**Observation 1 (Source-coverage upper bound).** Let $P(s) = |\{m \in M^* : s_m = s\}| / |M^*|$ be the fraction of ground-truth relevant memories stored in source $s$, where $M^* \subseteq M$ is the set of all relevant memories for the query distribution. For any retrieval strategy restricted to sources $\mathcal{Q} \subseteq S$:-]

### 3.3 Probabilistic Source-Coverage Analysis

[-$$\mathbb{E}[\text{Recall}|\mathcal{Q}] \leq \sum_{s \in \mathcal{Q}} P(s)$$-]

### 3.3 Probabilistic Source-Coverage Analysis

[-**Implication.** Improving query embedding quality within a fixed source set yields bounded recall improvement. Adding sources raises the upper bound toward 1.0 but cannot exceed it. Instant Recall approaches this bound only over the sources its build enumerates. That qualifier matters for coding-agent deployments: an independent 890-session audit measured 20,916,377 bytes of Bash output, about 47% of tool traffic, and command output is not necessarily exposed as a file-shaped `(content, timestamp, source)` input. A unified file index therefore does not by itself establish complete source coverage; deployments must enumerate transient tool-output channels or report them as excluded.-]

### 3.4 Frequency Analysis

[-### 3.4 Frequency Analysis-]

### 3.4 Frequency Analysis

[-Based on eighteen months of interaction logs (~8,400 queries) from a single personal assistant deployment:-]

### 3.4 Frequency Analysis

[-| Failure Mode | Est. Frequency (ownership queries) | Severity | | ------------------------- | ---------------------------------- | -------- | | Pronoun Blindness | ~12% | High | | Associative Depth Failure | ~8% | High | | Source Blindness | ~23% | Critical | | Anchor Silence | ~31% | High |-]

### 3.4 Frequency Analysis

[-These frequencies are derived from manual annotation of a stratified sample (n=612) from the full query log. Annotators labeled each query with the applicable failure mode(s) when ground-truth relevant chunks were not retrieved by the baseline system. Percentages do not sum to 100% because a single query can exhibit multiple failure modes simultaneously (e.g., a pronoun-heavy query targeting an unqueried source triggers both Mode 1 and Mode 3).-]

### 4. Instant Recall Architecture

[-## 4. Instant Recall Architecture-]

### 4.1 Overview

[-### 4.1 Overview-]

### 4.1 Overview

[-Instant Recall operates in three phases:-]

### 4.1 Overview

[-- **Offline (nightly consolidation):** Full rebuild of the concept index mapping anchor terms to pre-ranked memory chunk paths. - **Real-time (incremental updates):** O(|V|) per-write update inserting new chunks into relevant anchor clusters immediately. - **Online (inference):** Detect anchor words in incoming queries; load each pre-ranked chunk list by direct key lookup; re-rank against current query; inject into context. Total work is O(|V| + |A| + K|A|), independent of corpus size n (§5.1).-]

### 4.1 Overview

[-The index is a cacheable JSON artifact. The real-time phase keeps it fresh between nightly rebuilds.-]

### 4.1 Overview

[-The online phase executes before the model's inference pass. By the time the LLM receives the assembled context window, the memory search has already completed programmatically. The model refines and reasons over pre-retrieved chunks — it does not perform the search.-]

### 4.1 Overview

[-![Inference-time data flow. The user query enters anchor detection and semantic expansion (orange, input), feeds direct key lookups against the pre-built concept index (blue, storage), then post-retrieval re-ranking blends anchor relevance, query cosine, and the beyond-cosine signals (green, processing). A low-confidence branch triggers the reformulation gate. Ranked chunks assemble into the context window handed to the LLM (purple, output).](images/inference-pipeline.png)-]

### 4.2 What Instant Recall Indexes

[-### 4.2 What Instant Recall Indexes-]

### 4.2 What Instant Recall Indexes

[-Instant Recall does not require any particular storage layer; it requires only that a memory store expose, per chunk, three things: a content string, a timestamp, and a source label. Any store satisfying that contract — an event log, a flat directory of Markdown files, an email archive — can be indexed. The architecture is store-agnostic by design.-]

### 4.2 What Instant Recall Indexes

[-Two stores are concrete in the reference deployment. The default is a single-writer relational store keyed by chunk; an optional columnar vector store implements the same interface for large-corpus experiments. Because both implement one storage contract, any schema addition (§4.9) is applied to both or explicitly scoped to the relational path. Instant Recall sits *above* the store and treats it as a source of `(content, timestamp, source)` triples: it inherits loss-free compaction when the store provides it, but does not depend on it. A reversible-compression storage layer such as headroom's CCR (§2.4) satisfies this contract directly — its cached originals are precisely the `(content, timestamp, source)` triples the rebuild consumes.-]

### 4.3 Anchor Vocabulary

[-### 4.3 Anchor Vocabulary-]

### 4.3 Anchor Vocabulary

[-The anchor vocabulary $V = V_{curated} \cup V_{discovered}$ consists of two components. **Curated anchors** are manually defined domain-significant terms. **Salience-weighted discovered anchors** are concept phrases extracted from memory content using:-]

### 4.3 Anchor Vocabulary

[-$$\text{salience}(term) = \text{TF-IDF}(term) \times \text{recency\_weight}(term) \times \text{engagement}(term)$$-]

### 4.3 Anchor Vocabulary

[-where `engagement(term)` measures the frequency with which the term appears in user-initiated messages (as opposed to system-generated content), weighted by log-scaled conversational turn depth (a term mentioned on turn 8 of a conversation scores higher than one mentioned on turn 1, reflecting sustained topical engagement).-]

### 4.3 Anchor Vocabulary

[-**User-feedback anchors** — proper nouns introduced by the user — are added to $V_{curated}$ immediately upon detection. The union typically yields 150–400 anchor terms for a mature deployment.-]

### 4.3 Anchor Vocabulary

[-**Anchor Vocabulary Lifecycle.** Discovered anchors follow a promotion-and-pruning lifecycle. Anchors whose salience falls below a decay threshold for three consecutive rebuilds are pruned. Anchors maintaining high salience and appearing in user queries are candidates for promotion to $V_{curated}$. Curated anchors are never automatically pruned.-]

### 4.4 Concept Embedding and KNN Clustering

[-### 4.4 Concept Embedding and KNN Clustering-]

### 4.4 Concept Embedding and KNN Clustering

[-For each anchor term $v \in V$, we compute its embedding $\vec{v} = \text{embed}(v)$ using a fixed sentence-embedding model (default: `text-embedding-3-small`). The index entry for anchor $v$ is:-]

### 4.4 Concept Embedding and KNN Clustering

[-$$\text{index}[v] = \text{argsort}_{i}\left(\text{cos\_sim}(\vec{v}, \vec{m}_i)\right)_{1:K}$$-]

### 4.4 Concept Embedding and KNN Clustering

[-where $K$ is the cluster size (default: $K = 20$ chunks per anchor).-]

### 4.4 Concept Embedding and KNN Clustering

[-The model is *frozen*: it is used for distance computation only and is never fine-tuned on the corpus. §4.9a discusses what a frozen embedding model can and cannot be asked to carry — a distinction that bounds two of this paper's forward-looking proposals.-]

### 4.5 Pre-Computed Index Structure

[-### 4.5 Pre-Computed Index Structure-]

### 4.5 Pre-Computed Index Structure

[-```json { "version": "1.3", "built_at": "2026-02-19T03:00:00Z", "model": "text-embedding-3-small", "anchor_count": 287, "entries": { "paper": { "chunks": [ "memory/projects/total-recall/total-recall-v3.md#chunk-4", "archive/chatgpt-import/2025-07-laser-paper.md#chunk-1" ], "scores": [0.94, 0.91], "sources": ["memory/", "archive/"] } } } ```-]

### 4.6 Nightly Consolidation (Full Rebuild)

[-### 4.6 Nightly Consolidation (Full Rebuild)-]

### 4.6 Nightly Consolidation (Full Rebuild)

[-The rebuild algorithm: (1) scan all memory sources, chunking long documents into 256–512 token segments; (2) embed all chunks (batch, cached by content hash); (3) build salience-weighted anchor vocabulary; (4) build index using ANN for large corpora, exact KNN for <50k chunks; (5) write atomic JSON artifact. The rebuild entry point consumes the storage layer's event files and writes the index in a single pass.-]

### 4.6a Deduplication via Similarity Check

[-### 4.6a Deduplication via Similarity Check-]

### 4.6a Deduplication via Similarity Check

[-Before storing a new memory chunk into an anchor cluster, Instant Recall checks cosine similarity against existing chunks to prevent index bloat from daily logs that repeat similar facts. Three thresholds govern the policy:-]

### 4.6a Deduplication via Similarity Check

[-- **Similarity > 0.9 (near-duplicate):** Merge — retain the richer or more recent version; create a provenance alias. - **Similarity 0.7–0.9 (related but distinct):** Flag as related; both chunks remain with a `related_to` edge. - **Similarity < 0.7 (distinct):** Store normally.-]

### 4.6a Deduplication via Similarity Check

[-In deployment testing on a corpus with 18 months of daily logs, deduplication reduced effective index size by approximately 12%. That result should not be read as evidence that exact repetition dominates the underlying traffic. In an independent 2026-07 coding-agent audit covering 4,402 Read calls and 23,376,348 bytes, identical repeats accounted for 25,042 bytes across 7 calls and subset containment for 94,971 bytes across 35 calls, while line-number scaffolding alone accounted for 1,512,097 bytes. The similarity policy remains useful for index hygiene, but its thresholds address only a small part of observed redundancy; formatting normalization and temporal validity target larger classes.-]

### 4.6b Real-Time Anchor Discovery

[-### 4.6b Real-Time Anchor Discovery-]

### 4.6b Real-Time Anchor Discovery

[-Novel concepts emerging between nightly rebuilds are detected and indexed within 10–30 seconds via a lightweight micro-rebuild. A new anchor is created when its salience score (§4.3) exceeds the emergence threshold of 0.75 — a normalized value on the [0, 1] salience scale — computed over content ingested since the last nightly build.-]

### 4.7 Two-Tier Memory: Episodic and Semantic

[-### 4.7 Two-Tier Memory: Episodic and Semantic-]

### 4.7 Two-Tier Memory: Episodic and Semantic

[-**Episodic tier (real-time).** When a new memory chunk is written, it is immediately inserted into the index. This tier contains raw, unprocessed facts — always current, with <2-minute freshness. Think of the stack of papers on your desk versus the filing cabinet across the room: what you used in the last hour stays within arm's reach.-]

### 4.7 Two-Tier Memory: Episodic and Semantic

[-**Semantic tier (nightly rebuild).** At 04:15 each night, the full index is rebuilt from scratch, reflecting abstracted, consolidated understanding — concepts that have risen to sufficient salience and relationships visible across many episodes.-]

### 4.7 Two-Tier Memory: Episodic and Semantic

[-Within a session, retrieval is episodically accurate (same-day freshness). Across sessions, retrieval is semantically rich (nightly consolidation). Both tiers are necessary; neither is sufficient alone.-]

### 4.7 Two-Tier Memory: Episodic and Semantic

[-The episodic tier doubles as a fix for a subtler retrieval failure: the agent has *written* a correct fact in today's notes but acts against it before the nightly rebuild can index it. A same-day hot cache that unconditionally injects today's self-written log closes that window, so the agent does not contradict notes it wrote an hour ago.-]

### 4.8 Importance Scoring

[-### 4.8 Importance Scoring-]

### 4.8 Importance Scoring

[-Instant Recall assigns each chunk an **importance score** $\iota(m) \in [1, 10]$, computed from a base salience plus three additive bonuses and clamped to the range:-]

### 4.8 Importance Scoring

[-$$\iota(m) = \mathrm{clamp}_{[1,10]}\Big(\,\text{base}(m) + \text{recency}(m) + \text{access}(m) + \text{links}(m)\,\Big)$$-]

### 4.8 Importance Scoring

[-The base salience defaults to 5 and is raised at ingest for chunks carrying decisions or constraints. The recency bonus is +2 for a chunk written in the last day, +1 within the week, and 0 beyond. The access bonus is log-scaled in the access count and capped at +2, so a chunk the agent keeps re-reading drifts upward without any single read dominating. The link bonus is +1 per three related chunks, capped at +1, letting a well-connected chunk rise — the same intuition the link signal of §4.9 later makes durable. Importance scoring works like an editor deciding the front page: recency, weight, and how often the reader keeps coming back.-]

### 4.8 Importance Scoring

[-The score modulates effective similarity during K-slot ranking, centered so that an average chunk (importance 5) is left unchanged and only above- or below-average importance shifts the rank. An independent coding-agent trace measured context residency with median 48, mean 139.6, p90 364, and a maximum of 34 re-reads for one file. This does not calibrate the scoring function for the personal-assistant benchmark, but it confirms that access counts have a long enough tail to require log scaling and a cap:-]

### 4.8 Importance Scoring

[-$$\text{effective\_score}(v, m) = \text{cos\_sim}(\vec{v}, \vec{m}) \times \left(1 + \alpha \cdot \frac{\iota(m) - 5}{5}\right)$$-]

### 4.8 Importance Scoring

[-with $\alpha = 0.15$, so importance moves a chunk's score by at most ±15%. Cosine similarity stays the dominant term; importance breaks ties and nudges near-ties, rather than overriding a strong semantic match. Concretely: a high-salience chunk ($\iota = 10$) at cosine 0.80 scores $0.80 \times 1.15 = 0.92$, while a throwaway chunk ($\iota = 1$) at the same 0.80 cosine scores $0.80 \times 0.88 = 0.70$ — enough to reorder two chunks the embedding could not separate, never enough to promote a 0.50 match over a 0.80 one.-]

### 4.8 Importance Scoring

[-This mirrors how a well-designed event store tags content at ingest: decisions and constraints are recorded as high-salience event types, which is exactly what feeds the elevated base salience above.-]

### 4.9 Beyond Cosine: Validity, Trust, and Links

[-### 4.9 Beyond Cosine: Validity, Trust, and Links-]

### 4.9 Beyond Cosine: Validity, Trust, and Links

[-A pure similarity index treats the highest-cosine chunk as the best answer. Deployment evidence shows this is wrong, so Instant Recall carries three additional per-chunk signals that ranking weights alongside cosine. Each applies one principle — *raw similarity is insufficient; retrieval must weight signals beyond embedding distance* — to a different dimension: when a fact was true, whether code can be trusted, and how chunks connect.-]

### 4.9 Beyond Cosine: Validity, Trust, and Links

[-**Validity over time (bi-temporal facts).** A chunk you can retrieve but that is silently *wrong because it was overwritten* is a recall failure subtler than CORF: the index finds it, but it no longer reflects reality, and the prior truth is gone. An independent audit over 890 coding-agent sessions and 4,402 Read calls measured 3,374,879 stale bytes across 680 calls, 14.4% of the 23,376,348-byte Read corpus. The corpus differs from the personal-assistant benchmark and is reported separately, but it supplies a base rate for the failure class rather than an anecdote. Each chunk therefore carries a validity interval (`validity_start … validity_end`) describing when it was true in the world, and an ingestion time describing when the system learned it — the two clocks of a bi-temporal store. A new fact that contradicts an old one *closes the interval* of the old fact (`validity_end = now`) and stamps it `superseded_by` the new chunk, rather than overwriting the row. History is preserved, and the index can answer "what did we believe was true *as of* date X," not only "what is the latest snapshot." Retrieval defaults to a `current`-mode filter (`validity_end IS NULL OR validity_end > now`), backed by a covering index so the hot path does not scan; `valid-at` and `all` modes are available for time-travel queries. The invalidation routine only closes currently-open intervals — it never deletes a row or resurrects a closed one — and the contradiction *detection* that decides when to call it is left to the nightly reflection layer. §4.9a explains why that detection cannot be a cosine threshold over the frozen embedding model.-]

### 4.9 Beyond Cosine: Validity, Trust, and Links

[-**Trust (verified-code retrieval).** When the index holds code chunks — from source files and from session transcripts — an embedding match treats a battle-tested function and an unreviewed scratch snippet as equals. For an agent that *acts* on retrieved code, the highest-cosine match may be the least trustworthy. Each code chunk carries a `verification_status` (`unverified | partial | verified | failed`) and a test-coverage percentage; a verification-aware re-rank multiplies the score by ×1.5 (verified), ×1.2 (partial), ×1.0 (unverified), or ×0.5 (failed). Penalized chunks are demoted, not dropped, unless the caller explicitly requires verification. Coverage is populated by a nightly batch that maps test-runner coverage back to chunk line ranges (≥80% coverage marks a chunk `verified`, partial coverage `partial`, no coverage `unverified`) — keeping metadata churn off the inference path. A file whose coverage disappears is downgraded rather than left stale, and transcript code, which has no coverage map, stays `unverified` by default. The trust signal is deliberately *measured*, not *judged*: it reads an external test-coverage artifact rather than asking an embedding to decide whether code is correct — a distinction §4.9a generalizes.-]

### 4.9 Beyond Cosine: Validity, Trust, and Links

[-**Links (durable inter-chunk edges).** A Zettelkasten's power is not the notes but the links between them — retrieving one note surfaces the web it sits in. The deduplication pass (§4.6a) already computes relatedness but historically discarded it. Those edges are now persisted in a `backlinks` table (authoritative) with a denormalized JSON cache on the chunk row: `link_type='duplicate'` for similarity ≥ 0.9, `'related'` for 0.7–0.9, with a link strength blending similarity, recency, and access count. A search can opt in to hydrate each result with its top backlinks, and a depth-capped, cycle-safe breadth-first walk (carrying a visited set so a cyclic graph terminates) can pull in a chunk's k-hop neighbourhood. Out-degree is bounded by linking only the top-k similar chunks per insert, avoiding the O(n²) link-explosion trap.-]

### 4.9 Beyond Cosine: Validity, Trust, and Links

[-![The three beyond-cosine signals layered on the base cosine ranking. The base lane (blue) produces a cosine-ranked candidate set; validity (closes superseded intervals via a temporal filter), trust (×1.5/×1.2/×1.0/×0.5 verification multipliers), and links (durable backlinks + k-hop walk) each re-weight the candidates (green). All three are populated by the nightly cycle, never at query time, so the inference path remains independent of corpus size. The output is a re-weighted ranking where the closest chunk is not automatically first.](images/beyond-cosine-signals.png)-]

### 4.9 Beyond Cosine: Validity, Trust, and Links

[-These three signals share a discipline: enrichment runs in the nightly cycle, not at query time, so the inference path does not add work proportional to corpus size.-]

### 4.9a What a Frozen Embedding Model Can and Cannot Carry

[-### 4.9a What a Frozen Embedding Model Can and Cannot Carry-]

### 4.9a What a Frozen Embedding Model Can and Cannot Carry

[-Instant Recall is built end-to-end on a *frozen* sentence-embedding model: anchor embedding (§4.4), chunk clustering, semantic anchor expansion at cosine 0.3 (§4.11), dedup relatedness thresholds (§4.6a), and the proposed sense sub-clustering (§8.1) all read cosine distances out of one fixed model. It is worth stating precisely what that model can be trusted to encode, because the answer is not uniform across the operations above.-]

### 4.9a What a Frozen Embedding Model Can and Cannot Carry

[-An independent offline measurement we ran on a different frozen sentence-embedding model (MiniLM, evaluated on commodity hardware) found a sharp split. *Structural / distributional* judgements over the frozen embeddings were strong: a k-nearest-neighbour **novelty** signal scored AUROC 0.875 and a clause-cosine **incongruity** signal 0.896. But a supervised head asked to classify a *learned semantic verdict* — harmfulness — from the same frozen embeddings collapsed to AUROC 0.286, below chance. The mechanism-level lesson, which transfers across the specific model and task, is that frozen sentence-embeddings encode *structure and distribution* well but do not carry a *learned semantic-content judgement* without fine-tuning.-]

### 4.9a What a Frozen Embedding Model Can and Cannot Carry

[-This is good news for most of Instant Recall and a precise warning for two of its forward-looking proposals. The operations the live architecture already relies on — anchor→chunk clustering, 0.3-cosine expansion, and the ≥0.9 / 0.7 dedup thresholds — are all in the *structural* regime the measurement validates: they ask "are these two things near each other in embedding space," which is exactly the novelty/incongruity class of signal that scored ~0.88–0.90. That part of the design is on firm ground, and now has an independent AUROC for the class of signal it depends on.-]

### 4.9a What a Frozen Embedding Model Can and Cannot Carry

[-The two proposals that fall in the *judgement* regime are scoped accordingly:-]

### 4.9a What a Frozen Embedding Model Can and Cannot Carry

[-- **Contradiction detection (§4.9 validity, §8.1).** Deciding that a new fact *supersedes* an old one is a semantic-entailment judgement, not a distance comparison. A cosine threshold over the frozen embedding model is unlikely to carry it — that is the same shape as the below-chance harmfulness head. The honest requirement is an NLI/entailment model or a fine-tuned head, not a cosine cutoff. The validity *machinery* (closing intervals non-destructively) is sound; the *trigger* needs a judgement model. - **Reformulation confidence (§4.12).** The reformulation gate's premise that "max cosine < 0.5 means retrieval failed" treats the frozen model's similarity as a calibrated confidence signal. The below-chance result is a caution against over-trusting frozen-embedding similarity as calibrated confidence; the threshold is a useful *heuristic trigger* for a second attempt, not a reliable verdict that retrieval failed.-]

### 4.9a What a Frozen Embedding Model Can and Cannot Carry

[-The differentiation is stated plainly so the caution is not overclaimed: the measurement is on MiniLM, not `text-embedding-3-small`, and on a harmfulness task, not contradiction. What transfers is the mechanism, not the number — and it is enough to scope §4.9's contradiction trigger and §4.12's confidence gate as *"needs a judgement model, not a cosine threshold"* rather than leaving the boundary hand-wavy.-]

### 4.10 Reflection-Tuned Parameters

[-### 4.10 Reflection-Tuned Parameters-]

### 4.10 Reflection-Tuned Parameters

[-The nightly reflection layer (§2.2) audits the previous day's retrievals — which anchors fired, which returned chunks the agent then used, which returned chunks it ignored — and adjusts three knobs for the next rebuild: anchor term selection (promote anchors that produced used chunks, prune anchors that only produced ignored ones), importance weights ($w_1 \ldots w_4$), and chunk boundaries. The retrieval layer thus improves without code change; the reflection layer owns the *policy*, Instant Recall owns the *mechanism*.-]

### 4.11 Inference-Time Lookup with Post-Retrieval Re-ranking

[-### 4.11 Inference-Time Lookup with Post-Retrieval Re-ranking-]

### 4.11 Inference-Time Lookup with Post-Retrieval Re-ranking

[-Inference-time retrieval proceeds in five steps: (1) **anchor detection** — each token in the query is matched against $V$ via exact match, stemmed match, and bigram/trigram phrase match; all matching anchors form the active set $A$; (2) **semantic anchor expansion** — the query embedding is compared against all anchor embeddings in $V$, and any anchor within cosine distance 0.3 of the query is added to $A$; (3) **direct index lookup** — for each $a \in A$, retrieve the pre-computed top-K chunk list in O(1) per key; (4) **post-retrieval re-ranking** — score each candidate chunk by blending anchor relevance (weight 0.6), query-specific cosine similarity (weight 0.4), and the validity/trust/link signals of §4.9; (5) **chunk content loading** — top chunks after re-ranking are loaded from disk.-]

### 4.11 Inference-Time Lookup with Post-Retrieval Re-ranking

[-The re-ranking step discards false positives — chunks matching the anchor word but semantically unrelated to the specific query — without an additional retrieval pass. The candidate set is small (K×|A| ≤ 100 chunks), making re-ranking fast (~10ms).-]

### 4.12 Low-Confidence Reformulation (Proposed)

[-### 4.12 Low-Confidence Reformulation (Proposed)-]

### 4.12 Low-Confidence Reformulation (Proposed)

[-The pipeline above assumes one query attempt. Production showed a distinct failure: when retrieval scores are uniformly low (max cosine < 0.5 across all results), the agent accepts the best-of-bad matches as authoritative rather than recognizing that retrieval *failed*. We propose a reformulation gate to close this gap. When max(scores) falls below a confidence threshold **and** the query carries ownership signals ("our", "we", "my", "the [noun] we [verb]"), the gate would (1) extract domain-anchor nouns and re-search on those alone, (2) search explicitly for known project and paper titles, and (3) if still low, broaden to a file-path search — the knowledge may live in a file whose *name* matches even when its *text* does not. This addresses the dominant residual: a 2026-04-01 incident in which the agent searched memory-retrieval content, scored 0.47–0.49 across all results, and accepted the wrong files with no retry. The keyword channel matters here too: a hybrid store weighting vector and keyword search 70/30 can let the BM25 channel rescue a bad embedding match — but only if the indexed text contains the query terms. Papers about "compaction" do not match queries about "retrieval." A complementary proposal is a concept→keyword routing table, built during nightly consolidation, storing 10–20 human-search keywords per project (e.g., a storage paper → ["memory", "retrieval", "forgetting", "context", "compaction", "eviction", "recall"]) even when those words never appear in the body text. Note (per §4.9a) that the low-confidence trigger is a heuristic for *attempting* reformulation, not a calibrated verdict that retrieval failed; the frozen embedding's similarity should not be over-trusted as a confidence score. Unlike the signals of §4.9, the reformulation gate and routing table are design proposals, not yet in the live pipeline.-]

### 4.13 Full Inference Pipeline Integration

[-### 4.13 Full Inference Pipeline Integration-]

### 4.13 Full Inference Pipeline Integration

[-``` INFERENCE_PIPELINE(user_message, agent_config): # Layer 0: Stable always-loaded prefix (deployment-specific size) base_context = load(agent_config.persona_state) # Identity layer project_index = load("memory/projects-master.md") today_log = load_today_self_written_log() # episodic hot cache-]

### Layer 1: Instant Recall lookup + re-rank (O(|A|) + O(K×|A|), ~50ms) index = load_cached("memory/instant-recall-index.json") memory_chunks = INSTANT_RECALL_LOOKUP(user_message, index) if max_score(memory_chunks) < CONFIDENCE_THRESHOLD and has_ownership_signal(user_message): memory_chunks = REFORMULATE_AND_RETRY(user_message, index) # §4.12 (proposed)

[-# Layer 1: Instant Recall lookup + re-rank (O(|A|) + O(K×|A|), ~50ms) index = load_cached("memory/instant-recall-index.json") memory_chunks = INSTANT_RECALL_LOOKUP(user_message, index) if max_score(memory_chunks) < CONFIDENCE_THRESHOLD and has_ownership_signal(user_message): memory_chunks = REFORMULATE_AND_RETRY(user_message, index) # §4.12 (proposed)-]

### Layer 2: Preserve the stable prefix; append per-turn memory at the tail context = [base_context, project_index, today_log, *memory_chunks, user_message]

[-# Layer 2: Preserve the stable prefix; append per-turn memory at the tail context = [base_context, project_index, today_log, *memory_chunks, user_message]-]

### Layer 3: Compact only from a per-call context snapshot if per_call_token_count(context) > CONTEXT_BUDGET: context = COMPACT(context)

[-# Layer 3: Compact only from a per-call context snapshot if per_call_token_count(context) > CONTEXT_BUDGET: context = COMPACT(context)-]

### Layer 3: Compact only from a per-call context snapshot if per_call_token_count(context) > CONTEXT_BUDGET: context = COMPACT(context)

[-return LLM_INFERENCE(context) ```-]

### Layer 3: Compact only from a per-call context snapshot if per_call_token_count(context) > CONTEXT_BUDGET: context = COMPACT(context)

[-The list order is operational, not cosmetic. `base_context`, `project_index`, and `today_log` form the stable prefix; retrieved chunks are appended only after that prefix and adjacent to the user message. In a measured persistent-agent window, cache-read tokens outnumbered fresh input tokens 122,422,666 to 15,841, with 7,374,471 cache-write tokens; a separate 2026-07-25 sample measured 91.1% hit rate, 98.6% median, and 10.6 cache reads per write. A per-turn memory block inserted earlier would invalidate every cached token after the insertion point.-]

### Layer 3: Compact only from a per-call context snapshot if per_call_token_count(context) > CONTEXT_BUDGET: context = COMPACT(context)

[-The budget gate also requires an explicit measurement contract. In one deployment, a turn-aggregate `usage` value was misread as a per-call context snapshot: 6,448,106 reported tokens versus a decoded 52,116-token context, a 19.8× over-read. Compaction then fired around 5.5% of the real window; 29 events in seven days reached a 540-second cap and were discarded despite 19ms of compaction work. Such a downstream failure can erase correctly retrieved chunks, so `per_call_token_count` above denotes a snapshot of the assembled call, never a turn aggregate. Context-size assumptions are likewise deployment-specific: a comparable stack measured 23,731 always-loaded tokens (system prompt, injected files, skills, and tool schemas) within a 52,116-token call, not a general ~500-token floor.-]

### 5. Theoretical Analysis

[-## 5. Theoretical Analysis-]

### 5.1 Amortized Complexity Analysis

[-### 5.1 Amortized Complexity Analysis-]

### 5.1 Amortized Complexity Analysis

[-| Method | Per-query inference cost | Build cost | | -------------------------- | ------------------------ | -------------- | | Single-source exact KNN | O(n) | — | | Single-source ANN (FAISS) | O(log n) | O(n log n) | | Instant Recall (+ semantic anchor expansion) | O(\|V\| + \|A\| + K·\|A\|) | O(\|V\|·n) offline |-]

### 5.1 Amortized Complexity Analysis

[-For $n=50{,}000$, $|V|=300$, $|A|=3$, $K=20$: Instant Recall inference evaluates ~363 operations (300 anchor comparisons + 3 lookups + 60 re-rank comparisons), independent of corpus size $n$. By contrast, exact KNN scales as O(n) = 50,000 comparisons per query. The nightly build cost O(|V|·n) ≈ 15M operations is amortized across all queries until the next rebuild.-]

### 5.2 Recognition vs. Recall

[-### 5.2 Recognition vs. Recall-]

### 5.2 Recognition vs. Recall

[-Current RAG systems implement recall: given a query, the system generates the retrieval path. Instant Recall implements recognition: given an anchor word, the system activates the pre-existing index entry. The re-ranking step adds a lightweight query-specific discriminator within the already-small candidate set — analogous to the "familiarity signal" in dual-process recognition theory [Yonelinas, 2002].-]

### 5.3 The Recognition Pattern Beyond Memory

[-### 5.3 The Recognition Pattern Beyond Memory-]

### 5.3 The Recognition Pattern Beyond Memory

[-The recognition-over-recall move — pre-compute an index, look up rather than scan, inject only the winning entry — is not specific to a memory store. We observed the identical pattern transposed to a different corpus type and granularity, which is suggestive (not conclusive) external evidence against the single-deployment validity threat of §7.5.-]

### 5.3 The Recognition Pattern Beyond Memory

[-At the *skill-catalog* layer, applying the same idea to coreyhaines31/marketingskills (a 44-framework marketing-skill library) replaced ~915 tokens of always-loaded skill descriptions with a ~130-token router skill, with all 44 frameworks still reachable on demand — a measured ~7× reduction in always-loaded tokens at no loss of reachability. Structurally this is the recognition-vs-recall thesis at a different altitude: the catalog is the store, the router is the index, and only the winning entry is injected per turn — exactly how Instant Recall serves one anchor's cluster rather than scanning all memory.-]

### 5.3 The Recognition Pattern Beyond Memory

[-The framing must stay honest. This is not a CORF benchmark, the corpus is a skill catalog rather than a personal memory store, and the ~7× number is an always-loaded-token reduction, not a recall metric — it should not be reported alongside the §7.2 figures. What it does provide is a second, different-corpus data point that the "pre-compute the index, look up the winner" pattern generalizes beyond one personal-assistant memory store, which is precisely the cross-domain generalization §7.5 admits is otherwise unproven. The same library also ships per-skill `evals/evals.json` (realistic prompts plus assertion lists, runnable by an LLM judge) and a shared context-contract file every skill reads before acting — concrete instances of the runnable-eval and contract-file disciplines this paper gestures at but has not yet operationalized for memory retrieval (§8.4).-]

### 6. Design Space Analysis

[-## 6. Design Space Analysis-]

### 6.1 Alternative 1: Inverted Index (Classical IR)

[-### 6.1 Alternative 1: Inverted Index (Classical IR)-]

### 6.1 Alternative 1: Inverted Index (Classical IR)

[-Captures exact term matches but fails on synonymy and paraphrase. Preferred on edge devices where embedding compute is too expensive.-]

### 6.2 Alternative 2: All-Sources ANN

[-### 6.2 Alternative 2: All-Sources ANN-]

### 6.2 Alternative 2: All-Sources ANN

[-Fixes Source Blindness by searching across all memory sources, but still requires a well-formed query — Pronoun Blindness and Anchor Silence remain unaddressed. The 9-point gap between AS-ANN (0.76) and Instant Recall (0.85) in §7 isolates the benefit of concept-anchored clustering. AS-ANN also runs at inference time, adding latency.-]

### 6.3 Alternative 3: Multi-Source RAG (MS-RAG)

[-### 6.3 Alternative 3: Multi-Source RAG (MS-RAG)-]

### 6.3 Alternative 3: Multi-Source RAG (MS-RAG)

[-MS-RAG queries all memory sources at inference time with full embedding search, achieving high recall (0.87 in our evaluation). However, it incurs 418ms p95 latency — 7.7× slower than Instant Recall — because it performs exhaustive embedding comparison across all sources at every query. Instant Recall trades 2 percentage points of recall for an order-of-magnitude latency reduction.-]

### 6.4 Alternative 4: Knowledge Graph Overlay

[-### 6.4 Alternative 4: Knowledge Graph Overlay-]

### 6.4 Alternative 4: Knowledge Graph Overlay

[-Preferred when relationship types between concepts matter (e.g., causal chains, temporal ordering). The durable backlink edges of §4.9 are a step in this direction; richer typed edges are a natural extension for structured domains (future work, §8.6).-]

### 6.5 Alternative 5: Hosted Vector Databases (Pinecone, Weaviate)

[-### 6.5 Alternative 5: Hosted Vector Databases (Pinecone, Weaviate)-]

### 6.5 Alternative 5: Hosted Vector Databases (Pinecone, Weaviate)

[-| Dimension | Hosted Vector DB | Instant Recall | | ------------------- | ------------------------------------------ | -------------------------------------- | | **Retrieval model** | Flat similarity search (O(log n) via HNSW) | Pre-computed anchor→chunk cache (O(1) per active-anchor key; total independent of n) | | **Cost** | $8+/month (starter tier) | Zero ongoing cost (local compute) | | **Privacy** | Embeddings sent to cloud | All data remains local | | **Latency** | ~50–200ms (network round-trip) | ~50ms (local, no network) |-]

### 6.5 Alternative 5: Hosted Vector Databases (Pinecone, Weaviate)

[-Vector databases are preferred for large-scale deployments (n > 100k chunks) or when query-time semantic flexibility is critical.-]

### 6.6 A Compression Layer is Not an Alternative — It is a Substrate

[-### 6.6 A Compression Layer is Not an Alternative — It is a Substrate-]

### 6.6 A Compression Layer is Not an Alternative — It is a Substrate

[-It is worth distinguishing Instant Recall from a context-compression layer such as headroom's CCR (§2.4), because the two are easy to confuse as competitors when they are stacked by design. A compression layer answers "how do I fit selected content into the window losslessly"; Instant Recall answers "which of months of stored content should be selected at all." Compression operates on the active working set of a single run and is specialized by content type (JSON, code, logs); Instant Recall operates on the persistent cross-session store and is specialized by concept anchor. They can compose: CCR-style reversible compression as the storage layer (§1.1) feeding `(content, timestamp, source)` triples into the Instant Recall index above it. But interface compatibility does not prove deployment integration. The six-request, zero-token-saved case in §2.4 shows why any claim that the stack is live must include a traffic-path liveness count.-]

### 7. Evaluation

[-## 7. Evaluation-]

### 7.1 Evaluation Protocol

[-### 7.1 Evaluation Protocol-]

### 7.1 Evaluation Protocol

[-**Test Setup:** Evaluated on a real personal assistant deployment with 47,392 memory chunks across memory/ (52%), archive/chatgpt-import/ (28%), emails/ (15%), other (5%). Test set: 612 queries annotated with ground-truth target chunks by two independent annotators (Cohen's κ = 0.87).-]

### 7.1 Evaluation Protocol

[-**Baselines:**-]

### 7.1 Evaluation Protocol

[-- **NR (No Retrieval):** No memory retrieval; model sees only base context. - **SS-RAG (Single-Source RAG):** Standard RAG over the primary memory directory only. - **AS-ANN (All-Sources ANN):** ANN search across all memory sources at inference time. - **MS-RAG (Multi-Source RAG):** Full embedding search across all sources at inference time — the highest-recall but highest-latency baseline. - **MG-REC (MemGPT-style Sequential):** Sequential multi-step retrieval with virtual context paging [Packer et al., 2023].-]

### 7.2 Results

[-### 7.2 Results-]

### 7.2 Results

[-| Metric | NR | SS-RAG | AS-ANN | MG-REC | MS-RAG | Instant Recall | | --------------------------- | ---- | ------ | ------ | ------ | -------- | -------------- | | CORF-Recall@20 | 0.12 | 0.51 | 0.76 | 0.79 | **0.87** | 0.85 | | Source Coverage Rate | 0.25 | 0.33 | 1.00 | 1.00 | 1.00 | 1.00 | | Inference Latency (p95, ms) | <1 | 178 | 94 | 320 | 418 | **54** | | FPR (post-rerank) | — | 0.28 | 0.31 | 0.19 | 0.22 | **0.18** | | Index Build Time | — | — | 45s | — | — | 12s | | Same-Day Index Freshness | — | — | 24h | — | — | <2min |-]

### 7.2 Results

[-**Key findings:**-]

### 7.2 Results

[-- **Recall–latency tradeoff.** MS-RAG achieves the highest recall (0.87) but at 418ms — 7.7× slower than Instant Recall. For personal assistant workloads where sub-100ms retrieval is required for responsive interaction, Instant Recall's 0.85 recall at 54ms is a favorable operating point on the Pareto frontier. - **Concept anchoring value.** The 9-point gap between AS-ANN (0.76) and Instant Recall (0.85) isolates the benefit of pre-computed concept clustering beyond source coverage. - **False positive control.** Post-retrieval re-ranking gives Instant Recall the lowest FPR (0.18) of any method achieving >0.75 recall. - **MS-RAG ceiling.** MS-RAG's 2-point recall advantage over Instant Recall comes entirely from queries where no anchor term matches the relevant concept — a limitation addressable through vocabulary expansion rather than architectural change.-]

### 7.3 Ablations

[-### 7.3 Ablations-]

### 7.3 Ablations

[-| Variant | CORF-Recall@20 | Latency (p95, ms) | FPR | | ----------------------------------------- | -------------: | ----------------: | ---: | | Full Instant Recall | 0.85 | 54 | 0.18 | | A1 — w/o pronoun expansion | 0.79 | 52 | 0.19 | | A2 — w/o post-retrieval re-ranking | 0.85 | 41 | 0.35 | | A3 — nightly-only (no real-time episodic) | 0.82 | 54 | 0.18 |-]

### 7.3 Ablations

[-Pronoun expansion contributes 6 points of recall (Mode 1 mitigation). Re-ranking does not affect recall but nearly halves FPR (0.35 → 0.18). The episodic tier contributes 3 points of recall for within-day queries.-]

### 7.4 Implementation Status

[-### 7.4 Implementation Status-]

### 7.4 Implementation Status

[-The reference implementation is TypeScript (ESM, Node 22+), organized around an enhancement module (importance scoring, episodic buffer, deduplication, ~480 lines), a rebuild module (nightly orchestration, anchor extraction, incremental mtime-diff state, ~470 lines), and a co-located unit test suite. The beyond-cosine signals of §4.9 are present in the live schema and ranking path: bi-temporal validity columns (`validity_start`, `validity_end`, `ingestion_time`, `superseded_by`) and a covering index, with a non-lossy supersede routine that closes a prior fact's interval rather than deleting the row; a verification-status column with a coverage-mapping batch and a verification-aware re-rank applying the ×1.5/×1.2/×1.0/×0.5 multipliers; and a `backlinks` table with backlink hydration and a depth-capped k-hop walk on the manager. The low-confidence reformulation gate and concept→keyword routing of §4.12 are designed but not yet wired into the live pipeline. The contradiction-detection trigger for validity (§4.9, §4.9a) is likewise not live, and — per the frozen-embedding caution of §4.9a — is scoped to require an entailment/NLI judgement model rather than a cosine threshold. Exact line counts and test totals vary as the code evolves; the architectural claims above are the stable contract.-]

### 7.5 Threats to Validity

[-### 7.5 Threats to Validity-]

### 7.5 Threats to Validity

[-**Single-deployment evaluation.** All results come from one personal assistant deployment with one user. Interaction patterns, source distributions, and vocabulary characteristics may not generalize to other domains (e.g., enterprise knowledge management, multi-user systems). We mitigate this partially through ablation analysis, which shows each architectural component contributes independently, and we now offer a second, different-corpus data point: the recognition-over-recall pattern transposed to a skill catalog (§5.3) reproduces the core "pre-compute the index, inject only the winner" behaviour at a ~7× always-loaded-token reduction. That data point is suggestive of cross-domain generality but is not a CORF measurement, so cross-deployment *retrieval-metric* validation remains necessary future work.-]

### 7.5 Threats to Validity

[-**Annotator bias.** Both annotators had familiarity with the system, potentially inflating relevance judgments. The high inter-annotator agreement (κ = 0.87) suggests consistency but does not rule out shared bias.-]

### 7.5 Threats to Validity

[-**No externally reproducible benchmark.** The headline 0.85@54ms numbers rest entirely on one user's private logs. Adjacent open-source systems demonstrate this bar can be cleared: headroom (§2.4) publishes a runnable harness (`python -m headroom.evals`) over public datasets, and marketingskills ships per-skill runnable eval files. Until the synthetic CORF generator of §8.4 ships as an equivalently runnable suite over a public controlled corpus, the §7.2 results should be read as a single-deployment report, not an independently reproducible benchmark.-]

### 7.5 Threats to Validity

[-**Beyond-cosine signals not isolated in the benchmark.** The validity, trust, and link signals of §4.9 are implemented in the live ranking path, but the §7.2 benchmark scores CORF-Recall under the base anchor-and-cosine pipeline; the marginal retrieval-quality contribution of each beyond-cosine signal is not yet isolated in an ablation. Quantifying each is the next evaluation priority. The §4.12 reformulation gate, being a proposal rather than live code, is likewise unbenchmarked.-]

### 7.5 Threats to Validity

[-**Source enumeration and downstream pipeline validity.** The 47,392-chunk benchmark enumerates the personal-assistant stores listed in §7.1; it does not establish that every deployment source is indexable. The independent coding-agent audit found Bash output accounting for about 47% of tool traffic, while the build contract assumes enumerable chunks. In addition, retrieval metrics do not capture whether prompt assembly destroys cache reuse or whether a mismeasured compaction gate removes retrieved chunks. End-to-end evaluation should therefore report source exclusions, cache writes, compactions, and index-lookup counts alongside CORF metrics.-]

### 8. Discussion

[-## 8. Discussion-]

### 8.1 Limitations and Mitigation Strategies

[-### 8.1 Limitations and Mitigation Strategies-]

### 8.1 Limitations and Mitigation Strategies

[-**Anchor vocabulary brittleness.** Paraphrased queries bypass the anchor vocabulary unless fuzzy matching or embedding-based anchor detection is used. With stemming + phonetic matching, paraphrase robustness improves from 68% to 82%.-]

### 8.1 Limitations and Mitigation Strategies

[-**Semantic ambiguity.** The anchor "paper" could refer to research papers, manuscripts, or paper-based workflows. Mitigation: sense-specific sub-clustering via contextual embeddings. Deployment results: FPR drops from 0.18 to 0.14 with sub-clustering. Because sub-clustering is a distance operation over the frozen embedding model, it lives in the *structural* regime §4.9a validates and does not require a judgement model.-]

### 8.1 Limitations and Mitigation Strategies

[-**K selection.** Fixed K=20 may be too small or too large depending on anchor specificity. Adaptive K based on score distribution within a cluster reduces context overhead by 15% with no recall loss.-]

### 8.1 Limitations and Mitigation Strategies

[-**Prompt-budget coupling.** K is constrained not only by anchor specificity but by the resident prompt around the retrieved chunks. The 52,116-token context anatomy reported in §4.13 left 28,387 tokens (54.5%) to conversation history after a 23,731-token always-loaded floor. Adaptive K should therefore accept the measured per-call residual budget as an input rather than assume a fixed amount of available context.-]

### 8.1 Limitations and Mitigation Strategies

[-**Contradiction detection boundary.** The validity machinery (§4.9) can close a fact's interval, but *deciding* that a new fact contradicts an old one is a semantic-entailment judgement, which §4.9a shows a cosine threshold over a frozen embedding model is unlikely to carry. The honest requirement is an NLI/entailment model or a fine-tuned head; until such a detector is in place, validity intervals are only as good as the heuristics that call the invalidation routine, and those heuristics should not be confused with a calibrated contradiction signal.-]

### 8.2 Large-Scale Deployment (n > 100,000 chunks)

[-### 8.2 Large-Scale Deployment (n > 100,000 chunks)-]

### 8.2 Large-Scale Deployment (n > 100,000 chunks)

[-For n > 100k chunks: (1) replace exact KNN with FAISS IVF at build time; (2) use differential builds (track chunk hashes changed since last build); (3) use disk-backed embedding store (DiskANN/ScaNN); (4) shard by source for parallel builds.-]

### 8.2 Large-Scale Deployment (n > 100,000 chunks)

[-| Corpus Size | Build Time (full) | Index Size | p95 Latency | | --------------------------- | ----------------- | ---------- | ----------- | | 50k (deployed) | 12s | 150KB | 54ms | | 100k (projected, FAISS IVF) | 8min | 500KB | 58ms | | 1M (projected, DiskANN) | 90min | 6.2GB | 62ms† |-]

### 8.2 Large-Scale Deployment (n > 100,000 chunks)

[-†Projected from extrapolation; not empirically validated at this scale. The reference deployment is approaching the 50k ceiling; scaling observations beyond it are forthcoming rather than reported here.-]

### 8.3 Ethical Considerations

[-### 8.3 Ethical Considerations-]

### 8.3 Ethical Considerations

[-Instant Recall indexes personal interaction history, including potentially sensitive content. The local-first architecture (no cloud embedding storage, no external API calls for retrieval) mitigates data exfiltration risks. However, the index itself — a JSON file mapping anchor terms to memory paths — is a condensed summary of what the agent knows about its user. Deployments should encrypt the index at rest and restrict file-system access. The importance scoring system (§4.8) introduces implicit content prioritization that could surface sensitive memories preferentially; operators should review weight configurations for their context. The bi-temporal store (§4.9) also retains superseded facts indefinitely; a retention or hard-delete policy for closed validity intervals is a deployment responsibility.-]

### 8.4 Reproducibility

[-### 8.4 Reproducibility-]

### 8.4 Reproducibility

[-The annotated CORF dataset is drawn from one deployment's logs and is small, which §7.5 flags as the paper's central validity threat. Adjacent open-source systems show the higher bar is reachable: headroom (§2.4) ships a runnable accuracy-eval harness (`python -m headroom.evals`) over public datasets (GSM8K, TruthfulQA, SQuAD, BFCL) and reports an accuracy-delta number anyone can re-run, and marketingskills (§5.3) ships per-skill runnable eval files. We therefore treat reproducibility as a bar to clear rather than a plan to gesture at. The planned synthetic CORF generator — seeding pronoun-blind, source-split, and anchor-silent queries against a controlled corpus — should ship as a `python -m`-style runnable suite that reports CORF-Recall@20, FPR, and latency on a *public* controlled corpus, so that the headline 0.85@54ms numbers no longer rest entirely on one user's private logs. The suite must also assert integration liveness: number of index lookups fired, fraction of queries traversing the retrieval layer, enumerated and excluded source classes, and whether any downstream compaction removed retrieved chunks. The synthetic set would not replace the deployment benchmark but would make both the failure-mode taxonomy and the traffic-path contract testable in isolation, which is the property the §7.5 threat-to-validity currently lacks.-]

### 9. Conclusion

[-## 9. Conclusion-]

### 9. Conclusion

[-This paper introduced CORF as a formal framework for diagnosing retrieval failures in persistent agents and showed that the dominant failure mode is architectural — rooted in source fragmentation and anchor vocabulary gaps — rather than embedding quality. The source-coverage upper bound (§3.3) makes this precise: no amount of query refinement compensates for unsearched sources.-]

### 9. Conclusion

[-Instant Recall resolves these failures by shifting retrieval from inference time to build time. A pre-computed concept index, rebuilt nightly and kept fresh by real-time episodic updates, maps anchor vocabulary terms to pre-ranked memory clusters. At inference time, a ~50ms lookup surfaces relevant memories before the model processes the prompt — achieving 0.85 CORF-Recall@20 at the lowest latency of any evaluated system. Concept anchoring accounts for 9 points of recall beyond what source aggregation alone provides, and post-retrieval re-ranking halves the false positive rate. Beyond similarity, the index weights validity over time, code-trust, and inter-chunk links — because the closest chunk is not always the right one, and a fact that was true last month may be false today. We are explicit about what a frozen embedding model can carry: the structural distance operations the architecture depends on are on firm ground, while the judgement operations it proposes (contradiction detection, calibrated retrieval-failure confidence) require a fine-tuned or entailment model, not a cosine threshold. And we place Instant Recall in the live open-source stack — above a reversible-compression storage layer like headroom's CCR, alongside the same recognition-over-recall pattern that lets a router skill replace a token-heavy catalog — rather than against a static citation list.-]

### 9. Conclusion

[-The deeper insight is architectural: Instant Recall transforms agent memory from a _search problem_ into a _recognition problem_. The agent stops asking "what papers are you referring to?" — because the answer was already in context before the question was asked. It is the indexing organ, not the store; and like its biological model, it is the difference between having memories and being able to use them.-]

### 1. Introduction

{+Three requests arrive on one morning.+}

### 1. Introduction

{+*"Download last quarter's report from the company portal."* The agent answers that it cannot reach the portal. A month earlier the owner and the agent built a helper that drives the owner's own browser session for exactly this kind of site. The helper's notes talk about "relaying commands to a logged-in browser". They never say "download".+}

### 1. Introduction

{+*"Check the camera on the lab machine."* The agent says it has no credentials. It has them: a note about that machine says where its login is kept.+}

### 1. Introduction

{+*"Train it again with the setup we used last time."* The agent asks which setup. The answer sits in a session record from three weeks ago, filed under another project's name.+}

### 1. Introduction

{+Each time, the owner has to answer the same thing: you have this. We call it an **ownership miss**: the agent owns what the task needs and does not reach for it. The owner pays for each one with his own attention, and each one teaches him to do the remembering himself, which is the job he hired the assistant for.+}

### 1. Introduction

{+The three misses have something in common. None of them is a note about a topic that a noun in the request would find. Two are assets (a helper, a machine) and one is a past approach. None shares a key word with the request. "Download the report" and "relay commands to a logged-in browser" are about different things; what links them is a use, *when a site blocks a download*. The usual retrieval stack embeds the request, embeds the store and returns the nearest pieces of text. It finds what the request is about. These misses need what the stored thing is *for*.+}

### 1. Introduction

{+The hippocampus offers a useful frame here, as a way to reason and not as a mechanism we copy. On the indexing theory of memory (Teyler and DiScenna, 1986) it does not store experiences; it stores an index of where their parts live in the cortex, and a partial cue reactivates the whole pattern, which is called pattern completion (Marr, 1971). A cue also works best when it matches how the memory was encoded, the *encoding specificity* principle (Tulving and Thomson, 1973). Two capabilities follow, and the design takes both: an index separate from the store, and cues stored with each memory that match the situations in which it will be needed.+}

### 1. Introduction

{+Finding what you own is hard for five reasons.+}

### 1. Introduction

{+- The store is not one place. Skills, procedures, notes about machines, decisions and session records live in different stores and formats. A search over notes cannot find a skill. - The words do not match. Need and answer are linked by use, not by topic. Embedding similarity measures description, and a recent study found descriptive similarity a weak predictor of whether a piece of memory helps a decision (Zou et al., 2026). - The agent does not ask. A search tool helps only when the agent suspects it owns something. In each of the misses above it did not suspect. - Pushing is not free. Context put in front of the model each turn is paid for on every later call. If it lands inside the part of the prompt the provider caches, it forces a rewrite of everything after it. - The query is not only the owner's words, and a retriever that reads the time stamp and injected text around them retrieves for the wrapper.+}

### 1. Introduction

{+We propose a design for the finding stage, shown whole in Figure 1. Its parts:+}

### 1. Introduction

{+1. Where a find fails (§3): five gates a needed item must pass, each with its own fix and its own test. 2. Two indexes (§4): one over text, one over what the owner owns, with atomic entries that point to things and never hold secrets. 3. Four keys (§5): name, topic, use and co-access. Use keys are written when an entry is stored and added from the owner's corrections. 4. The turn (§6): a pushed list of pointers above a relevance floor, ranked by key and by how recently each entry was used, a guaranteed slot for anything the owner names, placement after the cached prefix, a search tool that is offered in every session, and a read ledger of what the context already holds. 5. A cost model (§7): a read costs a turn, not bytes. From published cache prices it derives what to push whole, what to push as a pointer, and why memory never goes into the cached prefix. Its notation and price table serve the whole series. 6. Work done ahead, including the ranking's own nightly loop (§8), and a test built from the owner's corrections (§9).+}

### 1. Introduction

{+![One turn of Find. The owner's words are separated from the wrapper. Name, use, topic and co-access keys look up two indexes built ahead of time: what the owner owns, and the text of notes and session records. A named item takes its guaranteed slot; the rest compete above a relevance floor. A short list of pointers goes in after the cached prefix, next to the owner's message, and a search tool stays available for the rest. Every pushed entry is logged as used or not, and a replay of the owner's past corrections judges the whole.](images/fig1-find-turn.png){width=94%}+}

### 2. Related work

{+## 2. Related work+}

### 2. Related work

{+This is one of four designs for an agent's memory: keeping (J1), writing (J14), finding (J2), learning (J5). J1 decides what survives the context window and keeps the full session record. J14 decides what enters long-term memory and in what shape. J5 turns experience into behaviour. This paper covers how the right thing is found when it is needed, and it points to the others in one line wherever they meet.+}

### 2. Related work

{+**MemGPT and Letta.** MemGPT (Packer et al., 2023), now the Letta platform, manages context the way an operating system manages memory. A few core blocks stay visible in every call, and larger stores sit outside the window, where the agent searches them with its own tools. We keep both halves, an always-loaded part and a pull. The difference is the trigger. In MemGPT the agent has to decide to search, which is the gate the misses in §1 fail at (§3), so we add a push computed before the model runs (§6).+}

### 2. Related work

{+**Work done before the question.** Offline passes that work over a context before any question arrives are reviewed in J5 §2; our offline build (§8) aims such a pass at the index, guessing when an entry is written and again at night the situations in which it will be needed.+}

### 2. Related work

{+**Anthropic's skills and file memory.** Agent Skills load the name and description of every installed skill into the system prompt and read a skill's full instructions only when it looks relevant (Anthropic, 2025). Claude Code's auto memory loads an index file, one line per memory, at the start of every session and reads the topic files on demand (Anthropic, 2026a). The memory tool gives the model a directory of memory files that it is told to look at before starting a task (Anthropic, 2026b). This is "push pointers, pull the body", the shape our cost model arrives at (§7). Two gaps remain. The whole list of names is pushed every session, so it grows with the catalogue and ignores the task; and each entry says what it is, not when it helps. We rank pointers per turn and give named ones a slot (§6), and we add use keys (§5).+}

### 2. Related work

{+**RAG-MCP.** Gan and Sun (2025) retrieve tool descriptions from an index before the model is called, instead of listing every tool in the prompt, and report more than three times the tool-selection accuracy of listing them all. Our asset index (§4) applies the idea to everything the owner owns, adds keys beyond embedding similarity, and keeps a place for a named item that no ranking can take away.+}

### 2. Related work

{+**Zep and Graphiti.** Zep (Rasmussen et al., 2025) builds a knowledge graph from conversations, with time on every fact, and searches it three ways at once: embedding similarity, BM25 full text, and a breadth-first walk from seed nodes. Rerankers then include one that favours entities mentioned often. On LongMemEval it reports higher accuracy than putting the whole history in context, with about 90% lower latency. We keep hybrid search and the idea that what gets used often should rank higher. How facts change over time belongs to the writing stage (J14). We add the asset index and use keys, and our budget is the cache and the number of turns as well as latency (§7).+}

### 2. Related work

{+**HippoRAG 2.** Gutiérrez et al. (2025) run Personalized PageRank over a graph of passages and the phrases inside them, and report about seven points over a strong embedding retriever on multi-hop question sets they use to test association. It is the closest work on association in retrieval. Its edges come from entities the texts share, while the misses we target share no entity with the request. Our edges come from use and from what is fetched together (§5), and the walk is one hop (§6).+}

### 2. Related work

{+**Mem0.** Chhikara et al. (2025) extract short facts from conversations and retrieve the facts instead of whole conversations, with 91% lower p95 latency than full context on the LoCoMo benchmark. We keep the single fact as the unit of a push (§6); for an asset the unit is a pointer entry (§4).+}

### 2. Related work

{+**T-Mem and document expansion.** T-Mem (Guo et al., 2026) writes *triggers* when a memory is stored: anticipated future contexts in which it will be needed, so that a later query linked to it only by a latent connection can still find it. It reports state-of-the-art results on LoCoMo. The idea goes back to document expansion in web search, where a model predicts the queries a document answers and indexes them with it (Nogueira et al., 2019). Our use keys are the same idea. We apply it to assets as well as conversation facts, take a second source of keys from the owner's own corrections, and measure it on his misses (§9).+}

### 2. Related work

{+**Decision-centric memory.** Zou et al. (2026) argue that memory should keep the distinctions that matter for decisions. On LoCoMo they measure that descriptive similarity is a weak predictor of whether a piece of evidence fits a decision (Spearman $\rho = 0.103$), and description-based retrieval recovered 66% of the gold evidence at a matched budget, against 83% for their method. It is the clearest outside measurement behind keying by use.+}

### 2. Related work

{+Each part of the design has a precedent above: anticipating use at write time (T-Mem, document expansion), retrieving tools from an index (RAG-MCP), pointers first and bodies on demand (Skills), hybrid search with a usage reranker (Zep). In these systems we did not find an index of the owner's assets keyed by use with a guaranteed slot for a named item, a push placed by a cache cost model, or an evaluation on the owner's replayed corrections. That combination is the claim.+}

### 3. Where a find fails

{+## 3. Where a find fails+}

### 3. Where a find fails

{+A needed item has to pass five gates before it helps (Figure 2). Each gate fails for its own reason, and each has its own fix and its own test, so it pays to know which one a miss failed at.+}

### 3. Where a find fails

{+**Gate 1, not indexed.** The item lives in a store the index does not cover: a catalogue of skills, a note about a machine, the titles of a wiki. No ranking finds what was never indexed. Recall is bounded by coverage: if $P(s)$ is the share of the items a query needs that live in source $s$, then for any retriever that searches the set of sources $\mathcal{Q}$,+}

### 3. Where a find fails

{+$$\mathbb{E}[\text{recall}] \le \sum_{s \in \mathcal{Q}} P(s).$$+}

### 3. Where a find fails

{+*Fix:* the asset index (§4). *Test:* for each replayed miss, is the item in any index at all?+}

### 3. Where a find fails

{+**Gate 2, the wrong key.** The item is indexed under what it is about, and the request asks for what it does. A request with no noun at all ("the one we used last time") fails here too. *Fix:* use keys and co-access edges (§5). *Test:* the item's rank under topic keys alone against its rank with use keys added.+}

### 3. Where a find fails

{+**Gate 3, nobody asked.** The index could have found the item, but the agent did not search, and no push ran, or the push ran on the wrong text. *Fix:* a push before the model runs, built from the owner's words (§6). *Test:* the share of replayed cases in which the item is in front of the model before its first call.+}

### 3. Where a find fails

{+**Gate 4, drowned.** The item was pushed, as the fourteenth of twenty old documents, or in a list that is always full. A list that is never empty proves nothing about relevance. *Fix:* atomic entries, a relevance floor, an empty list when nothing clears it, and a slot for named items. *Test:* the share of pushed entries the turn actually used.+}

### 3. Where a find fails

{+**Gate 5, hidden.** The item was found and then removed by a filter: a validity filter that hides facts marked out of date, a permission rule, a de-duplication step. If the rule that marked it was wrong, the item vanishes from every search and nothing reports an error. *Fix:* hide only what J14's judge closed (J14 §6), and count per query what each filter removed (§8.1). *Test:* the hidden share per query, and an audit of a sample of hidden rows.+}

### 3. Where a find fails

{+![Five gates a needed item must pass. It must be indexed (coverage), indexed under a key the request can match (name, topic, use, co-access), asked for (a push before the model, or a pull), visible among what is pushed (floor, atomic entries, named slot) and not removed by a filter (only judged closures hide, and hidden rows are counted). A miss is diagnosed by the first gate it fails.](images/fig2-five-gates.png){width=80%}+}

### 3.1 The query is the owner's words

{+### 3.1 The query is the owner's words+}

### 3.1 The query is the owner's words

{+The push, the use log and the replay suite read the owner's words from the author field the keeping stage writes when a turn is appended (J1 §4.1), never the wrapper around them. *Test:* a set of wrapped prompts must produce the same pushed list as the same prompts unwrapped.+}

### 4. Two indexes

{+## 4. Two indexes+}

### 4.1 The text index

{+### 4.1 The text index+}

### 4.1 The text index

{+The text index covers the session record kept by the keeping stage (J1) and the facts in the memory store written by the writing stage (J14). It is a hybrid index: BM25 over words, embeddings over meaning, and exact match over names. Each unit of text is a file or a section, whose shape J14 decides. Find adds one thing to every unit: an address map. Headings, line ranges and, for code, symbols with their line numbers let a second visit go straight to the region it needs. This is *retrieve coarse, address fine*: units large enough that related text arrives in one read (§7 shows why the number of reads matters more than their size), and addressed finely enough that the next visit is a seek, not a rescan. For code the map is a symbol index; metadata such as test coverage hangs on its entries, where an agent about to reuse a function can see it.+}

### 4.2 The asset index

{+### 4.2 The asset index+}

### 4.2 The asset index

{+The asset index holds what the owner owns, one entry per thing:+}

### 4.2 The asset index

{+- skills, procedures and tools the agent can run; - machines and services, with where each one is and where its credentials are kept, never the credentials themselves; - repositories and their working branches; - decisions, with their date and their reason; - past approaches: how a kind of problem was solved last time, and where that work lives; - the current version of an artefact: which model, which document, which build is the latest; - rules the learning stage has moved out of always-loaded files (J5 §7.2), found like any other asset and not only when named.+}

### 4.2 The asset index

{+An entry is short (Figure 3): a name and its aliases, one line that says what the thing is, a pointer (a path, a command, a page), its use keys, its topic text, its strongest co-access neighbours, and the source and date of the fact behind it (supplied by J14). As a pointer it costs a few dozen tokens.+}

### 4.2 The asset index

{+Entries are generated from the catalogues themselves: a skill's own description, a procedure's trigger list, the header of a note about a machine. The file is the ground truth: the index is a cache over the files, rebuilt whenever a source changes and rebuildable from them at any time (J14 §6.3), so it cannot fall out of step with what it points to.+}

### 4.2 The asset index

{+Assets get their own index for three reasons. The unit differs: an asset entry is a pointer, a text unit is content. The numbers differ: an owner has hundreds or a few thousand assets, which fit in memory and are looked up in milliseconds, while text runs to hundreds of thousands of units. And the push rule differs: a named item gets a guaranteed slot (§6.4), and text never does.+}

### 4.2 The asset index

{+Privacy follows from the shape. The index stores where a secret is kept and how to use it, never its value, and a pushed pointer to a credential is subject to the same permissions as reading it.+}

### 4.2 The asset index

{+![An asset entry and its four keys. The entry itself is a pointer: name and aliases, one line on what it is, where it lives, plus source and date. Four kinds of key lead to it. Name keys match exact names and nicknames. Topic keys match what it is about. Use keys match the situations it helps in, written when it is stored and added from the owner's corrections. Co-access edges link it to things fetched in the same tasks, even with no shared words.](images/fig3-asset-entry.png){width=56%}+}

### 4.3 The index file

{+### 4.3 The index file+}

### 4.3 The index file

{+A small part of the asset index is worth having in front of the agent every session: the entries the owner needs most often. The store already has the right place for them, J14's index file: always loaded, one pointer per line with a short hook saying when to read it, never the fact itself (J14 §3, §8.3). It is the first layer of the progressive disclosure in Anthropic's skills and memory (§2). The two stages split the work on this file. J14 owns the shape of a line and checks every write to it. Find decides which entries get a line and in what order: the most used ones, taken from the use log, up to the budget the learning stage sets for always-loaded files (J5 §7.1). The per-turn push covers the long tail behind them.+}

### 4.3 The index file

{+The lines Find chooses are generated, so they follow use. The owner can still edit the file by hand, as he can any file (J14 §4.2). A line he wrote is his: the next build keeps it where he put it and never drops or moves it, and recomputes only the lines it generated itself. Rules stay out of this file; they belong to the learning stage (J5).+}

### 5. Four keys

{+## 5. Four keys+}

### 5. Four keys

{+A key is a way to reach an entry. Each kind of key catches misses the others cannot.+}

### 5. Four keys

{+**Name keys** are exact names and aliases: a skill's name, a machine's name, a project, a nickname the owner uses. They are cheap and exact, and they feed the named slot (§6.4). The alias list grows from the owner's own words: when he calls something by a new name and then corrects the agent, the name is added.+}

### 5. Four keys

{+**Topic keys** say what the entry is about: BM25 and embeddings over its description and body. This is standard retrieval, and it covers the misses where the request does name the topic.+}

### 5. Four keys

{+**Use keys** say when the entry helps, as short phrases: *when a site blocks a download*, *when you need to reach the lab machines*, *when a training run has to be repeated*. They follow encoding specificity (§1): store, with the memory, the cue that will be present when it is needed. They come from three sources.+}

### 5. Four keys

{+1. *At write time.* For a fact, the writer adds up to five use keys as it stores the fact, through J14's gate (J14 §8.4). For an asset, the build that generates its entry (§4.2) writes them from the catalogue and from the session that produced the asset. Either way this is what T-Mem does for conversation facts (§2). Find's share is what follows: indexing the keys, pruning the generic ones and adding keys from corrections. 2. *From the owner's corrections.* When the owner says "you have a skill for this" or "remember what we did with the portal", the request he made just before becomes a use key on the entry he meant, in his own words. These are the most valuable keys, because they are cut from real misses. 3. *Offline.* At night, sessions where an entry turned out useful propose further keys, from the request that led to it (§8).+}

### 5. Four keys

{+Generated keys tend to drift toward the generic, such as *when working on a project*. A key that matches more than a small share of all entries carries no information; such keys are measured by how many entries they match and dropped above a threshold, and each entry keeps at most five.+}

### 5. Four keys

{+**Co-access edges** link entries fetched together for one request. They come from behaviour: two items read in the same task, more often than chance would predict, measured by pointwise mutual information (Church and Hanks, 1990). A prompt file, the payload that uses it and the report it writes may share almost no vocabulary and still be fetched together almost every time; no similarity measure can propose that link. Edges are computed per lane, since automated jobs repeat themselves and would swamp the interactive sessions, which behave differently. They are used for a one-hop expansion from the entries that the other keys found (§6), which is a small, cheap version of the graph walk in HippoRAG 2.+}

### 5. Four keys

{+Co-access has a limit worth stating. It sees what was fetched, not why, and it cannot see a consumer that names a file without reading it during an observed session. So a co-access edge is evidence for a proposal, never permission to act on storage. Find hands its merge and split proposals to the writing stage, which owns the shape of files and decides with review (J14 §8).+}

### 5. Four keys

{+**Combining keys.** Each kind of key yields candidates with a score that estimates the probability that the turn will use the entry, given that this key matched. Scores start from fixed priors per key type and are re-estimated every night from the use log (§6.8) by Find's own offline loop (§8.3). Candidates are combined with a noisy-OR, so an entry reached by two independent keys ranks above one reached by either alone, and neighbours from the one-hop walk enter at a discount. How recently an entry was used then scales the result (§6.9).+}

### 6. The turn: push and pull

{+## 6. The turn: push and pull+}

### 6. The turn: push and pull

{+The push is the heart of the design, because it is the only part that works when the agent does not suspect it owns something (gate 3). Its steps are short enough to sketch:+}

### 6. The turn: push and pull

{+```text FIND_PUSH(turn): words = owner_words(turn) # J1's author field, §3.1 named = name_table.match(words) # exact, milliseconds cand = use_keys.match(words) + topic_keys.match(words) + asset_index.match(words) cand += one_hop(cand, coaccess_edges) # discounted neighbours ranked = noisy_or(cand) * fade(cand) # fading, §6.9 ranked = ranked above FLOOR # may be empty pack = named first, then ranked[:N] # N about 5 for e in pack: e.form = WHOLE if short_and_likely(e) else POINTER # §7 for e in pack: e.reason = which key matched place pack after the cached prefix, next to the owner's message log(pack) # used or not, at turn end ```+}

### 6.1 The query

{+### 6.1 The query+}

### 6.1 The query

{+The query is the owner's current message, with the wrapper removed, plus the title of the task in progress when there is one. Earlier turns are already in the context window; adding them to the query makes the push repeat itself.+}

### 6.2 What may run on the path

{+### 6.2 What may run on the path+}

### 6.2 What may run on the path

{+Everything the push does before the model runs is a lookup: a hash table for names, a small precomputed vector index for use and topic keys over the asset index and the top of the text index, and a stored adjacency list for the one-hop walk. That is tens of milliseconds. Heavier work, such as a full search of the text index, runs beside the turn and serves the next one. When it does, the entries it adds are marked as computed for the previous message, because that is what they answer. Serving the previous turn's results is cheap and keeps the critical path clear, and its cost has to be stated: the list answers the last question, not this one.+}

### 6.3 The list

{+### 6.3 The list+}

### 6.3 The list

{+The list holds up to about five entries above a relevance floor, plus any named items. Each entry carries the reason it is there, meaning which key matched. The reason helps the model judge the entry, and it lets the test in §9 attribute a hit to a key. An entry goes in whole when it is a short fact that is likely to be needed, and otherwise as a pointer; §7 derives the line between the two. When nothing clears the floor the list is empty, and an empty list is a correct answer.+}

### 6.4 A guaranteed slot for a named item

{+### 6.4 A guaranteed slot for a named item+}

### 6.4 A guaranteed slot for a named item

{+When the owner's words name something the name table knows, a skill, a machine or a project, its entry goes in first, whatever its score. This is a check in code, deterministic and testable. It exists for three reasons. The named case is the one where a miss annoys most ("I told you its name"). It is also the cheapest case to get right. And the usual alternative, a line in an always-loaded file telling the agent to check its catalogue first, is text, and text instructions do not bind reliably; a check in the path does. How rules in general climb from text to code is J5's subject. *Test:* every named case in the replay suite gets its entry, every time.+}

### 6.5 Where the list goes

{+### 6.5 Where the list goes+}

### 6.5 Where the list goes

{+The list goes after the cached prefix, in the per-turn slot next to the owner's message. It never goes into the system prompt or into an always-loaded file. Section 7 gives the price of getting this wrong.+}

### 6.6 The pull

{+### 6.6 The pull+}

### 6.6 The pull

{+A search tool over both indexes is part of the agent's base tool set. It answers in a second or two, uses the same keys and returns pointers first, and it has a range mode that returns the session-record entries a J1 marker names (J1 §8.1). The push catches what the agent does not suspect; the pull serves what it does.+}

### 6.6 The pull

{+A pull tool that is registered but not offered to the model does not exist for the agent. Harnesses keep optional tools behind allow-lists, and a switch left unset hides the tool from every session without an error. So at the start of each session the harness checks that the pull is in the model's tool list, in every case of who owns the context window (J1 §6.1): when the runtime builds the window, when a provider's API owns part of it, and when a provider's command-line tool owns it (J1 §6.3), where the pull is exposed through whatever tool mechanism that provider supports. A session without the pull is a defect, reported at once. The check is §9.4's.+}

### 6.7 What the context already holds

{+### 6.7 What the context already holds+}

### 6.7 What the context already holds

{+An index answers *where is it?* A second question is *do I already have it?* Before a read, a read ledger checks whether the same region of the same file is already in the context window and unchanged since it was read, by content hash; if so, the read returns where the text already sits. Re-reading text already held is a cost no layout of the store can fix, since it happens at run time. The read ledger also folds aliases, two paths to one file, into one identity. A read of a path that does not exist is logged as a find miss; Find hands repeated misses of this kind to the writing stage, which decides what to write in answer (J14 §8).+}

### 6.8 The use log

{+### 6.8 The use log+}

### 6.8 The use log

{+For each pushed entry the harness records whether the turn used it: whether the reply referred to it, or a later tool call followed its pointer. This is the outcome signal of the whole stage. Without it, any weight that is meant to learn learns from a constant. Tests, health probes and other synthetic calls run under their own identity and never write to access counts or the use log: the ranker learns only from turns that serve the owner.+}

### 6.9 Importance and fading

{+### 6.9 Importance and fading+}

### 6.9 Importance and fading

{+Some entries are needed less as time passes, and the ranking should know it. Find owns how age and importance act at read time; the writing stage only marks importance when it writes a fact (J14 §7.6).+}

### 6.9 Importance and fading

{+The model of fading comes from how often things are needed in the world. Anderson and Schooler (1991) found that the odds that an item is needed again fall as a power of the time since each past use, summed over those uses, and that human memory follows the same curves. So each entry carries an activation computed from its own use log:+}

### 6.9 Importance and fading

{+$$A_e = \ln \sum_{j} t_j^{-d},$$+}

### 6.9 Importance and fading

{+where $t_j$ is the time since the $j$-th use of entry $e$ and $d$ starts at 0.5, the default in the ACT-R theory built on that finding (Anderson et al., 2004), and is re-estimated at night (§8.3). An entry that has never been used counts its write as its one use. The activation enters the noisy-OR score of §5 as one more factor, multiplying its odds by $e^{A_e - \bar{A}}$, where $\bar{A}$ is the mean activation over the index; so an entry nobody has touched for months ranks below an equal match used last week. Use, not age, sets the clock: an old note read every week stays strong, and a new one never read fades.+}

### 6.9 Importance and fading

{+Three limits keep fading from hiding what matters.+}

### 6.9 Importance and fading

{+1. Fading lowers a rank; it never removes an entry. A faded entry is still found by its name (the named slot ignores fading), by the pull, and by any key strong enough to clear the floor. 2. Entries marked important when written, corrections and decisions, never fade below an average entry: their factor $e^{A_e - \bar{A}}$ is floored at 1. A correction is needed when the old mistake comes back, which may be months later, and the use log cannot predict that. 3. Importance does not put an entry in the list. It stops the fading; the entry still has to match a key. Otherwise every important entry would sit in every list, and gate 4 would fail.+}

### 6.9 Importance and fading

{+Fading is about need, not truth. A fact that is no longer true is closed by J14's judge (J14 §6), not left to fade.+}

### 7. What a find costs

{+## 7. What a find costs+}

### 7.1 A read costs a turn

{+### 7.1 A read costs a turn+}

### 7.1 A read costs a turn

{+This section holds the notation and the price table for the whole series; the keeping, writing and learning papers cite it and use its symbols. Every price is a multiple of the base input price, taken from Anthropic's published cache prices (Anthropic, 2026c). Table 1 lists the symbols and the values used in the examples below.+}

### 7.1 A read costs a turn

{+| Symbol | Meaning | Value in the examples | |------|--------------------------------------|--------------------------------------| | $r$ | price of reading one cached token | 0.1 (0.05 or 0.025 on some current models) | | $w$ | price of writing one token to the cache | 1.25 (five-minute cache); 2 (one-hour cache) | | $g$ | price of one output token | 5 | | $o$ | output tokens of one tool call | about 100 | | $L$ | tokens already cached in the context window | 100,000 | | $P$ | position of the first token that changed | 20,000 | | $x$ | tokens returned by one read | 500 | | $B$ | tokens of one pushed item | 40 for a pointer | | $M$ | later calls in the session that re-read it | 30 | | $q$ | probability that a turn needs the item | 0.1 to 0.5 |+}

### 7.1 A read costs a turn

{+: Notation and prices for the series. Prices are multiples of the base input price.+}

### 7.1 A read costs a turn

{+A pull is one more model call. It re-reads the whole cached context, writes the result of $x$ tokens into the cache, and pays for the call's own output:+}

### 7.1 A read costs a turn

{+$$C_{\text{pull}} = rL + wx + g\,o.$$+}

### 7.1 A read costs a turn

{+With the values in Table 1 this comes to about 11,000 base tokens, and the size of what was read, $wx$, is only 625 of them. The cost of a read is the turn, not the bytes. Two design rules follow. Count reads, not bytes: a unit large enough to bring related text in one read saves turns, which is the *retrieve coarse* half of §4.1. And a search followed by a read costs two turns, so a pointer pushed in advance removes the first and only the read remains.+}

### 7.2 What a push costs

{+### 7.2 What a push costs+}

### 7.2 What a push costs

{+An item of $B$ tokens in the pushed list is written once at $w$. It then stays in the session record and is re-read at $r$ by every later call in the session, say $M$ of them:+}

### 7.2 What a push costs

{+$$C_{\text{push}} = B\,(w + rM).$$+}

### 7.2 What a push costs

{+The later reads dominate in a long session. With $M = 30$ the factor is $1.25 + 3 = 4.25$, so a pointer of 40 tokens costs about 170 base tokens over its life, and a list of five pointers about 850, under a tenth of one pull. The list pays for itself if it saves a search turn in more than about one turn in thirteen, before counting a single minute of the owner's time.+}

### 7.3 Whole or pointer

{+### 7.3 Whole or pointer+}

### 7.3 Whole or pointer

{+An item needed with probability $q$ can go in whole, at $B(w + rM)$, or as a pointer, after which the agent reads it when needed, at an expected $q\,(rL + wB + g\,o)$. Going in whole wins when+}

### 7.3 Whole or pointer

{+$$B < B^{*} = \frac{q\,(rL + g\,o)}{w + rM - q\,w}.$$+}

### 7.3 Whole or pointer

{+With the values above, $B^{*}$ is about 1,450 tokens for an item needed one turn in two, and about 255 tokens for one needed one turn in ten. So short facts that are likely to be needed go in whole, and everything else goes in as a pointer. A longer context raises $B^{*}$, because each pull re-reads more; a cheaper cache read lowers it for any item that is not close to certain (Figure 4a).+}

### 7.4 Where it goes

{+### 7.4 Where it goes+}

### 7.4 Where it goes

{+If a block that changes every turn is placed at position $P$ inside the cached prefix, the next call has to write the $L - P$ tokens after it to the cache again, at $w$ instead of reading them at $r$. That adds+}

### 7.4 Where it goes

{+$$\Delta C = (w - r)(L - P)$$+}

### 7.4 Where it goes

{+to every turn. With $L = 100{,}000$ and the block at $P = 20{,}000$, it is about 92,000 base tokens a turn, the price of eight pulls, paid on every turn (Figure 4b). Placed in the tail, the same block costs only its own write. Per-turn memory therefore goes after the cached prefix and never into an always-loaded file. The same term prices any change inside the cached prefix, once: evicting a span from the middle of the window is a change at its first token, and J1 §7.2 weighs that one-time $\Delta C$ against what the eviction saves.+}

### 7.5 What the tokens leave out

{+### 7.5 What the tokens leave out+}

### 7.5 What the tokens leave out

{+The model above prices tokens. It leaves out two larger terms. A miss that the owner has to correct costs his message, his attention and at least one more turn, which outweighs any of the token terms above. And a pull costs a full model round trip in time, seconds against the milliseconds of an on-path lookup. The token model sets the shape of the list (pointer or whole, tail placement, size); the owner's time sets that there is a push at all.+}

### 7.5 What the tokens leave out

{+![What a find costs, from published cache prices. (a) The largest item worth pushing whole, against the probability that the turn needs it, for three context lengths; solid lines at a cache-read price of 0.1, dashed at 0.05; $M = 30$ later calls. Below the line, push the item; above it, push a pointer. (b) Extra cost per turn of memory placed inside the cached prefix (at 20% of the context) against the same 1,000-token block placed in the tail, with one pull for scale.](images/fig4-cost.png){width=94%}+}

### 8. Built ahead of time

{+## 8. Built ahead of time+}

### 8. Built ahead of time

{+Most of the work of finding happens before anyone asks. Find runs its own builds on its own schedule, set out below, and its own loop that tunes the ranking (§8.3). The learning stage's nightly pass is a different loop: it works on rules (J5 §6.2) and never touches these indexes or weights.+}

### 8. Built ahead of time

{+**At write time, within minutes.** A new fact or session is added to the text index, and a new or changed asset gets its entry, its name keys and its first use keys. The worst miss of all is contradicting what the agent itself wrote an hour ago, so fresh writes must not wait for the night. A deletion for privacy (J14 §6.7) reaches the indexes on the same path: the row, its keys and its co-access edges go at once.+}

### 8. Built ahead of time

{+**When a catalogue changes.** Asset entries are regenerated from their source: the skill's description, the procedure's triggers, the note about the machine.+}

### 8. Built ahead of time

{+**Every night.** Use keys are refined from the day's use log, and generic keys are pruned. The generated lines of the index file are recomputed from use (§4.3). The ranking's weights are re-estimated (§8.3).+}

### 8. Built ahead of time

{+**Every week.** Co-access edges are recomputed per lane over the session records. Paths that agents keep reaching for and that do not exist go to the writing stage, with the merge and split proposals of §5 (J14 §8).+}

### 8. Built ahead of time

{+Every build writes a receipt with its counts: entries, keys per entry, edges, rows hidden by filters. The push refuses to serve from a build past its expected age without saying so in the list.+}

### 8.1 Filters that hide

{+### 8.1 Filters that hide+}

### 8.1 Filters that hide

{+Hiding belongs to the writing stage: a default search hides only what J14's judge closed, and J14 counts every closure and raises the alarms (J14 §6). Find adds two rules of its own, because a missing result looks exactly like a result that never existed.+}

### 8.1 Filters that hide

{+1. Every query reports how many candidates each filter removed. 2. A search mode that shows hidden rows is always available, so that an audit can see what the filter took.+}

### 8.2 A zero must mean zero

{+### 8.2 A zero must mean zero+}

### 8.2 A zero must mean zero

{+A zero has to mean that the path ran and found nothing, never that nobody reported (the series rule, J5 §9.1), so each count below is emitted by the code that serves the turn, never by a probe beside it: push runs, entries pushed, pull calls, read-ledger hits, rows removed per filter, and the age of the build served. A health check fails when one of them stays at zero while turns go by.+}

### 8.3 The ranking's own loop

{+### 8.3 The ranking's own loop+}

### 8.3 The ranking's own loop

{+The scores of §5 start from priors, and the use log (§6.8) says how good they were. Every night Find re-estimates four things from it: the prior for each key type, the discount on one-hop neighbours, the relevance floor, and the fading exponent $d$ (§6.9).+}

### 8.3 The ranking's own loop

{+Each pushed entry in the log carries the key that put it there and whether the turn used it, so the prior for a key type is its share of pushes that were used. The estimate is smoothed toward the starting prior, as a beta prior worth a fixed number of pushes would smooth it, so a key type that fired a handful of times stays near where it began.+}

### 8.3 The ranking's own loop

{+The log has a blind spot: it only sees what was pushed. An entry below the floor is never pushed, so the log cannot show that it was needed. Two other signals fill the gap. An entry the agent fetched with the pull, and an entry the owner named in a correction, count as a use that the push missed, credited to whichever keys matched it at the time.+}

### 8.3 The ranking's own loop

{+New weights are adopted only if they do not lower hit at 5 on the correction replay (§9.1) and keep every named case. Otherwise the old weights stay, and the receipt says why.+}

### 9. How we will know

{+## 9. How we will know+}

### 9. How we will know

{+The design makes claims that a replay can decide. The main test is built from the owner's own corrections, because those are the misses that matter to him.+}

### 9.1 The correction replay

{+### 9.1 The correction replay+}

### 9.1 The correction replay

{+Each case comes from one correction of the kind "you have X", "remember what we did with Y" or "you know where Z is". A case holds the owner's words in the request just before the correction (wrapper removed), the expected item or items, and the date, so that the indexes can be rebuilt as they stood at that moment. A case is added each time such a correction happens. The suite is split by time: the indexes as of a date, tested on the cases after it. Every failed case is assigned the first gate it failed (§3). Before any gate is declared solved, all misses are sized first and each is placed in a gate; a miss that fits no gate is itself a finding, because a taxonomy's blind spot caps every measurement taken through it.+}

### 9.1 The correction replay

{+Five arms are compared on the same cases.+}

### 9.1 The correction replay

{+| Arm | What runs | |----|-------------------------------------------------------| | A | Topic keys over the text index; a list of whole chunks | | B | A, plus the asset index with name and topic keys | | C | B, plus use keys | | D | C, plus co-access edges and the one-hop walk | | E | D, plus the named slot; and, apart, a pull-only arm with no push |+}

### 9.1 The correction replay

{+For each arm we measure: the share of cases where the expected item is in front of the model before its first call (hit at 5); the share found by a pull within the turn; tokens pushed per turn; the share of turns with an empty list; the share of pushed entries the turn used; tokens written to the cache per turn; milliseconds on the path.+}

### 9.1 The correction replay

{+| Question | Decided by | Bar to adopt | |----------------------|------------------------------|--------------------------| | Does the asset index pay? | B against A, hit at 5 | Higher hit at 5, no more tokens pushed | | Do use keys pay? | C against B | At least 10 points of hit at 5, no more tokens | | Do co-access edges pay? | D against C, on cases with no word shared with the item | At least 3 points | | Does the named slot work? | E on named cases | Every named case, every time | | Is push worth it at all? | E against pull-only | Fewer misses; cost per turn within §7's bounds | | Is placement free? | Cache writes per turn, with and without the list | No measurable rise | | Does fading pay? | The best arm with and without fading (§6.9) | Higher hit at 5; no named case and no case marked important lost |+}

### 9.2 Live measures

{+### 9.2 Live measures+}

### 9.2 Live measures

{+In use, four numbers tell whether the design works: the rate of the owner's "you have this" corrections, which should fall; the share of pushed entries used, which should rise; tokens written to the cache per turn, which memory should not change; and pull calls per session, where zero means the tool is not offered or not believed.+}

### 9.3 Public suites

{+### 9.3 Public suites+}

### 9.3 Public suites

{+The owner's corrections are private, and there are few of them per month. Two public checks make the work comparable and reproducible. LongMemEval (Wu et al., 2024) and LoCoMo (Maharana et al., 2024) test the text index against published systems. A synthetic ownership suite tests the asset index: generated catalogues of skills, machines and past approaches, each with a description, and requests that need an asset while sharing no content word with it. It should run from a clean copy and print hit at 5, tokens pushed and the gate at which each miss failed.+}

### 9.4 Integration checks

{+### 9.4 Integration checks+}

### 9.4 Integration checks

{+Before any of the numbers above is believed, the counts of §8.2 must show the paths running: push runs equal to turns, a non-zero pull count when the tool is offered, hidden-row counts with a reason for each, read-ledger hits counted, and no access counted from a probe.+}

### 9.4 Integration checks

{+One check comes before all of these: is the pull offered (§6.6)? At the start of a session in each owner case (the runtime, a provider's API, a provider's command-line tool), the test reads the model's tool list and looks for the pull and its range mode. Any session without it fails the check.+}

### 10. Conclusions

{+## 10. Conclusions+}

### 10. Conclusions

{+Retrieval that finds what a request is about serves an agent's owner badly, because what he has to remind it of are things it owns, needed for what they do. This design finds them with two indexes, one over text and one over what the owner owns, reached by name, topic, use and co-access. A short list of pointers goes in before every turn, after the cached prefix and with a guaranteed slot for anything named, and a pull covers the rest. Prices settle the shape: a read costs a turn, so short likely facts go in whole and the rest as pointers. A replay of the owner's corrections decides whether each part earns its place. If it does, the assistant remembers what you built together without being told.+}

### 10. Conclusions

{+The design has limits. The owner's corrections are few and private, so the main test will be small, and the synthetic suite has to show that its results carry over. Use keys written by a model may be generic or wrong, and the pruning rule only removes the generic ones. Co-access learns from what was fetched, including the habits of automated jobs, and cannot see why. A pushed entry costs tokens for the rest of the session, which caps how much a push can carry in long sessions. The cost model depends on prices that change, and it leaves the owner's time out of its arithmetic. Fading learns from use, so an entry needed once a year ranks low on the day it is needed unless it is named or marked important. The hippocampus helped us reason about indexing and cues; it is not a claim about how the brain does it.+}

### 11. Next steps

{+## 11. Next steps+}

### 11. Next steps

{+The order of work follows from where the evidence has to come from. First the instruments: the push reading the owner's words from J1's author field, the use log, the counts of §8.2 and the check that the pull is offered (§6.6), because every later decision depends on them. Then the asset index with name keys and the named slot, which is cheap and testable at once, and the correction replay suite. Then use keys, written at storage and taken from corrections, then co-access edges, each adopted only when it clears its bar in §9.1. Fading and the re-estimation of §8.3 follow once the use log holds a few weeks of turns. In parallel, the synthetic ownership suite, which is the part others can run.+}

### 11. Next steps

{+Other directions are worth testing once the base works: a floor set per kind of task instead of one for all; use keys that the agent itself proposes after a successful turn; and a read ledger shared by agents working in one session, so that one agent's read serves another.+}

### 11. Next steps

{+This design will be built in TinkerClaw and tested as above, and an updated version of this paper will report the results.+}

### References

[-1. Lewis, P., et al. (2020). Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks. _NeurIPS 2020_. 2. Packer, C., et al. (2023). MemGPT: Towards LLMs as Operating Systems. _arXiv:2310.08560_. 3. Sarthi, P., et al. (2024). RAPTOR: Recursive Abstractive Processing for Tree-Organized Retrieval. _ICLR 2024_. 4. Collins, A. M., & Loftus, E. F. (1975). A spreading-activation theory of semantic processing. _Psychological Review_, 82(6), 407–428. 5. Teyler, T. J., & DiScenna, P. (1986). The hippocampal memory indexing theory. _Behavioral Neuroscience_, 100(2), 147–154. 6. Squire, L. R. (1992). Memory and the hippocampus: A synthesis from findings with rats, monkeys, and humans. _Psychological Review_, 99(2), 195–231. 7. Wilson, M. A., & McNaughton, B. L. (1994). Reactivation of hippocampal ensemble memories during sleep. _Science_, 265(5172), 676–679. 8. Tulving, E. (1976). Ecphoric processes in recall and recognition. _Recall and Recognition_, 37–73. 9. Mandler, G. (1980). Recognizing: The judgment of previous occurrence. _Psychological Review_, 87(3), 252–271. 10. Yonelinas, A. P. (2002). The nature of recollection and familiarity: A review of 30 years of research. _Journal of Memory and Language_, 46(3), 441–517. 11. MemoryOS. (2024). Mem0: The Memory Layer for Personalized AI. _arXiv:2504.19413_. 12. Park, J. S., et al. (2023). Generative Agents: Interactive Simulacra of Human Behavior. _UIST 2023_. 13. Zhong, W., et al. (2023). MemoryBank: Enhancing Large Language Models with Long-Term Memory. _arXiv:2305.10250_. 14. Manning, C. D., Raghavan, P., & Schütze, H. (2008). _Introduction to Information Retrieval_. Cambridge University Press. 15. Guu, K., et al. (2020). REALM: Retrieval-Augmented Language Model Pre-Training. _ICML 2020_. 16. Borgeaud, S., et al. (2022). Improving language models by retrieving from trillions of tokens. _ICML 2022_. 17. Xu, X., et al. (2025). A-MEM: Agentic Memory for LLM Agents. _arXiv:2502.12345_. 18. Wu, D., et al. (2024). LongMemEval: Benchmarking Chat Assistants on Long-Term Interactive Memory. _arXiv:2410.10813_. 19. Yan, Z., et al. (2025). Memory-R1: RL-Trained Memory Management for LLM Agents. _arXiv:2505.14075_. 20. Gama, J., et al. (2014). A survey on concept drift adaptation. _ACM Computing Surveys_, 46(4), 1–37. 21. Scoville, W. B., & Milner, B. (1957). Loss of recent memory after bilateral hippocampal lesions. _Journal of Neurology, Neurosurgery & Psychiatry_, 20(1), 11–21. 22. Chopra, T., et al. (2025). headroom: Reversible Compress-Cache-Retrieve Context Compression for Agents. Open-source software (Apache-2.0); Kompress-v2-base model, HuggingFace. 23. Osmani, A., et al. (2025). agent-skills: A Discipline Library for Coding Agents. Open-source software. 24. Haines, C., et al. (2025). marketingskills: An On-Demand Marketing-Framework Skill Catalog with Per-Skill Eval Harnesses. Open-source software.-]

### References

{+Anderson, J. R., and Schooler, L. J. (1991). Reflections of the environment in memory. *Psychological Science*, 2(6), 396–408. <https://doi.org/10.1111/j.1467-9280.1991.tb00174.x>+}

### References

{+Anderson, J. R., Bothell, D., Byrne, M. D., Douglass, S., Lebiere, C., and Qin, Y. (2004). An integrated theory of the mind. *Psychological Review*, 111(4), 1036–1060. <https://doi.org/10.1037/0033-295X.111.4.1036>+}

### References

{+Anthropic (2025). Equipping agents for the real world with Agent Skills. Anthropic Engineering. <https://www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills>+}

### References

{+Anthropic (2026a). How Claude remembers your project (Claude Code memory). <https://code.claude.com/docs/en/memory>+}

### References

{+Anthropic (2026b). Memory tool. Claude Platform documentation. <https://platform.claude.com/docs/en/agents-and-tools/tool-use/memory-tool>+}

### References

{+Anthropic (2026c). Prompt caching. Claude Platform documentation. <https://platform.claude.com/docs/en/build-with-claude/prompt-caching>+}

### References

{+Chhikara, P., Khant, D., Aryan, S., Singh, T., and Yadav, D. (2025). Mem0: Building production-ready AI agents with scalable long-term memory. arXiv:2504.19413. <https://arxiv.org/abs/2504.19413>+}

### References

{+Church, K. W., and Hanks, P. (1990). Word association norms, mutual information, and lexicography. *Computational Linguistics*, 16(1), 22–29. <https://aclanthology.org/J90-1003/>+}

### References

{+Gan, T., and Sun, Q. (2025). RAG-MCP: Mitigating prompt bloat in LLM tool selection via retrieval-augmented generation. arXiv:2505.03275. <https://arxiv.org/abs/2505.03275>+}

### References

{+Guo, W., Wang, D., Wang, Z., Liu, H., and Xu, Y. (2026). T-Mem: Memory that anticipates, not archives. arXiv:2606.15405. <https://arxiv.org/abs/2606.15405>+}

### References

{+Gutiérrez, B. J., Shu, Y., Qi, W., Zhou, S., and Su, Y. (2025). From RAG to memory: Non-parametric continual learning for large language models (HippoRAG 2). *ICML 2025*. <https://arxiv.org/abs/2502.14802>+}

### References

{+Maharana, A., Lee, D.-H., Tulyakov, S., Bansal, M., Barbieri, F., and Fang, Y. (2024). Evaluating very long-term conversational memory of LLM agents (LoCoMo). *ACL 2024*. <https://arxiv.org/abs/2402.17753>+}

### References

{+Marr, D. (1971). Simple memory: A theory for archicortex. *Philosophical Transactions of the Royal Society B*, 262(841), 23–81. <https://doi.org/10.1098/rstb.1971.0078>+}

### References

{+Nogueira, R., Yang, W., Lin, J., and Cho, K. (2019). Document expansion by query prediction. arXiv:1904.08375. <https://arxiv.org/abs/1904.08375>+}

### References

{+Packer, C., Wooders, S., Lin, K., Fang, V., Patil, S. G., Stoica, I., and Gonzalez, J. E. (2023). MemGPT: Towards LLMs as operating systems. arXiv:2310.08560. <https://arxiv.org/abs/2310.08560>+}

### References

{+Rasmussen, P., Paliychuk, P., Beauvais, T., Ryan, J., and Chalef, D. (2025). Zep: A temporal knowledge graph architecture for agent memory. arXiv:2501.13956. <https://arxiv.org/abs/2501.13956>+}

### References

{+Teyler, T. J., and DiScenna, P. (1986). The hippocampal memory indexing theory. *Behavioral Neuroscience*, 100(2), 147–154. <https://doi.org/10.1037/0735-7044.100.2.147>+}

### References

{+Tulving, E., and Thomson, D. M. (1973). Encoding specificity and retrieval processes in episodic memory. *Psychological Review*, 80(5), 352–373. <https://doi.org/10.1037/h0020071>+}

### References

{+Wu, D., Wang, H., Yu, W., Zhang, Y., Chang, K.-W., and Yu, D. (2024). LongMemEval: Benchmarking chat assistants on long-term interactive memory. arXiv:2410.10813. <https://arxiv.org/abs/2410.10813>+}

### References

{+Zou, M., Guo, Z., Liang, L., Wang, Z., Wang, Q., Wen, Q., King, I., Qu, L., and Xu, Z. (2026). Remember the decision, not the description: A rate-distortion framework for agent memory. arXiv:2605.10870. <https://arxiv.org/abs/2605.10870>+}

### References

{+---+}

### References

{+_J-series paper J2 | Version 8.0 | 2026-10-12_+}
