Skip to main content
Amnesia Is Optional

Agents recall past sessions 8x cheaper than handoffs

Coding agents lose everything when a session ends, so every new agent on every new machine starts from zero. Hugging Face's funes aims to change that by indexing the sessions already on your machine, turning old debugging detours and half-forgotten choices into searchable context. The team's benchmark makes a striking case.
Agents recall past sessions 8x cheaper than handoffs
Agents recall past sessions 8x cheaper than handoffs

Coding agents forget everything when a session ends, so each new agent on each new machine starts from zero. Hugging Face's funes is an open-source memory layer that indexes the sessions already on your machine and lets Claude Code, Codex, pi, and Hermes recall past decisions, rationale, and dead ends. In the team's benchmark, recall was 8x cheaper than a written handoff on one task and 4x cheaper on the other.

The article builds on an earlier argument that coding agents already produce the record we keep losing: as they search, try approaches, hit errors, and change direction, they leave a detailed account of not just what changed but why. Traces alone are still only an archive, though. You cannot grep your way to “why did we move off the streaming parser?” across ten thousand turns. An agent needs indexing, retrieval, ranking, and exact provenance to use those traces while it works. funes provides that layer.

How funes Works

funes is a single binary. Its default inference backend has no ML runtime dependency, and embedding and reranking run on your machine. It is built from the sessions already on your machine, works locally, and becomes part of your agent's normal workflow with one command. When you want it to, it can also travel to a Hugging Face dataset you own, private by default.

Install it with:

curl -fsSL https://huggingface.co/buckets/huggingface/funes/resolve/install.sh | sh

Then add it to an agent:

funes add claude

That one add command builds the first index, gives the agent recall and get tools, and installs the automation that indexes each completed turn. Indexing is incremental: new runs add new turns rather than embedding the whole history again, and older and deeper content can backfill in bounded steps.

After that, you just work. When a task touches a past decision, rationale, or finding, the agent can reach for recall itself, so you do not need to remember the old session or paste its context into the new one. The agent names the session behind its answer.

recall returns the original text, not a summary, and shows exactly where it came from: the agent, timestamp, session, and turn. Each result includes a get command that opens the full turn and its surrounding context.

Underneath, one deterministic pipeline parses every supported trace into the same turn-and-block shape, chunks it, embeds it with a pinned local model, and writes it to a local Lance dataset. A query combines vector and BM25 search, fuses their rankings, reranks the candidates with a cross-encoder, reweights them by recency, and attaches neighboring chunks.

This design gives funes three properties:

  • One memory across agents: Claude Code, Codex, pi, and Hermes all write to the same shape. recall spans their histories, and every hit says which agent produced it.
  • Raw evidence stays intact: Nothing is distilled into a fact at write time, so a result can always lead back to the turn that produced it.
  • Local by default: No account or Hub repository is required. A hosted model does not process your sessions for indexing. Embedding and reranking run on your machine, and your coding agent does the reasoning.

Making Memory Follow You

Memory becomes more useful when the next agent is running somewhere else. To make a memory follow your work, bind one when you add funes to an agent:

funes add codex acme/funes-memory

The bind publishes your current memory there. funes then keeps it current, indexing each turn locally and publishing at session boundaries. The agent recalls from it throughout, and running the same command on another machine makes the memory follow you there. Locally, the memory is a Lance dataset; the shared memory is a Hugging Face dataset, private by default, that you own.

Credentials are redacted during indexing. Before anything reaches the Hub, publishing scans every chunk again and withholds anything that still looks like a secret. The scanner is documented in SECURITY.md, including what it does and doesn't cover.

When an agent reads a remote memory, funes caches the dataset files locally, so warm queries return to local speed. The Hub supplies the ownership, access control, versioning, and distribution it already supplies for other datasets. Your memory does not become an account in a separate memory service, and you do not rent it back through an API.

Asking Memory Directly

recall is shaped for agents. To put a question to a memory yourself, use ask, which reads your local memory by default:

funes ask claude "what did we decide about the streaming parser"

You can also point it at a shared memory. The team published a memory of funes development, so you can ask why funes works the way it does without creating a memory of your own:

funes ask claude "why is funes append-only" --memory huggingface/funes-memory

funes ask is the read-only, one-question sibling of funes add. It recalls the passages, hands them to a coding agent, and returns a grounded answer that names its sources. It does not install an integration or change the agent's persistent setup. A retrieval miss is not hidden: if the passages do not support an answer, the agent says so. You can rephrase the question, or add funes to the agent so it searches the memory iteratively during normal work.

A shared memory is not tied to the agent or model that created it. You can start a task in Claude Code, continue it in Codex next week, and have the second agent recall the first agent's reasoning. You can also use pi with a local model or one served through the Hugging Face router, then return to Claude.

The article's examples cover several scopes:

  • Across your machines: Bind each agent to one memory and recall the history from whichever host you are using.
  • Across a team: A new teammate's agent can retrieve months of decisions on day one, including dead ends and rationale that never made it into a pull request.
  • Alongside an open-source project: A maintainer can publish the sessions behind a release, naming them on the push. This works like a searchable CLAUDE.md that holds the history of why the project is the way it is, instead of a page someone must keep rewriting. Anyone can read a public memory with --memory.

Published memories carry a dataset card and the funes tag, making them discoverable on the Hub. As the article puts it, the Hub already hosts open weights and datasets, and funes adds open working memory: the decisions, failed approaches, and rationale behind a project, queryable by another agent and traceable to the sessions that produced them.

Recall Versus Handoffs and Compaction

A long investigation bloats a session until each turn costs more to carry the context than to do the work. The usual answers are to let the agent compact and carry on, or to write a handoff and start fresh. The team measured recall against both on the handoff-vs-recall benchmark, using two tasks whose answers cannot be reconstructed without the session's prior knowledge.

Compaction, the default for most agents, was the only one of the three whose result divided: it arrived on one task and never arrived on the other. Where it failed, its summary had flattened the findings that mattered. Recall returns the passages themselves, so a finding does not have to survive summarization.

Recall was the cheapest of the three on both tasks: 8x cheaper than a written handoff on one and 4x on the other. The lighter segment of each benchmark bar is the one-time charge for preparing the channel, the handoff or the compaction, paid before the first question and counted once. A cross marks a channel that never arrives, so it has no cost per success.

Key Features at a Glance

  • Local recall: Embedding and reranking run on your machine, with no account or Hub repository required.
  • Single binary: Installed with one curl command; the default inference backend has no ML runtime dependency.
  • One-command setup: funes add claude builds the first index, adds recall and get tools, and installs per-turn indexing.
  • Incremental indexing: New runs add new turns; older content backfills in bounded steps.
  • Exact provenance: Results return original text with agent, timestamp, session, and turn, plus a get command for full context.
  • Shared memory: funes add codex acme/funes-memory binds a memory that follows you across machines and agents, private by default.
  • Redaction and scanning: Credentials are redacted at indexing, and every chunk is scanned again before publishing.
  • Grounded answers: funes ask returns answers that name their sources and says so when the passages do not support an answer.

Availability

funes is open source and lives at github.com/huggingface/funes. The article does not state a price or release date. Local use requires no account or Hub repository, and shared memories are stored in Hugging Face datasets that you own. Install issues, missed recalls, and requests for new agent support can be filed as issues on the project's GitHub repository.

Felipe Santos

“Artificial intelligence can process the world in milliseconds, but only the human heart can give meaning to every second lived” – Mr. Santos