---
title: "INSTANT RECALL: Finding What the Agent Already Owns"
author: "Oscar Serra · Independent Research"
date: "12 October 2026"
version: "v8.0"
---

## 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.

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.

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.

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.

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

## 1. Introduction

Three requests arrive on one morning.

*"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".

*"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.

*"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.

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.

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*.

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.

Finding what you own is hard for five reasons.

- 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.

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

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).

![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

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.

**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).

**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.

**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).

**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.

**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).

**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).

**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).

**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).

**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.

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

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.

**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}$,

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

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

**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.

**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.

**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.

**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.

![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

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.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

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

- 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.

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.

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.

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.

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.

![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

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.

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

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

**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.

**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.

**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.

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).

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.

**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.

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).

**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

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:

```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

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

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

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

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

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

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.

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

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

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

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).

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:

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

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.

Three limits keep fading from hiding what matters.

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.

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.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.

| 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 |

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

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:

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

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

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:

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

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

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

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

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

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

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

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

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.

![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

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.

**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.

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

**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).

**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).

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

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.

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

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

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).

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.

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.

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

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

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.

Five arms are compared on the same cases.

| 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 |

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.

| 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

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

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

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.

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

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.

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

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.

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.

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

## 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>

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>

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>

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

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

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

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>

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/>

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>

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>

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>

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>

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>

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

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>

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>

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>

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>

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>

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>

---

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