Back to Blog
By 7 min read

Keep the Evidence Behind the Summary

Agents should compress what they believe and keep a pointer to what they saw.

AI AgentsAgent MemoryContext EngineeringRAGEvaluationOpen Source

In August I wrote that [agents need to forget on purpose](/blog/2026-08-09). This month's papers cover the other half of that problem: what an agent should keep when it compresses its history.

The usual answer is a summary. The model rewrites its own history into a shorter paragraph, and in many agents that paragraph becomes the only copy the model can see. When a later step needs the exact error message or the row the agent read twenty turns ago, the model has nothing left to check.

The memory work I have shipped is small. Boring Agent Memory returns exact lines and the file they came from instead of a summary. In open source, my merged pull requests to agent projects have touched memory search, context compaction, and what a memory tool says when memory is off. Eight papers from this month test the same ideas at a larger scale.

Fold the history, keep the records

Folio starts from the cost of summarizing. Each compaction pays a model to reread and rewrite the history it replaces. Folio records three linked levels while the agent runs: a short note the model writes in its normal reply, a runtime manifest of every call, and the captured source records. The runtime then folds older turns into coarser views without a model call, and the fold leaves handles that point back to the detailed levels. On 75 LOCA-bench tasks with DeepSeek-V4-Pro behind every system, Folio solved 66 tasks. The same runtime with model-written compaction solved 54, and Claude Code, Codex, and SoL-Pi solved 49 to 59, while Folio used about half their working time. That is one benchmark and one model, so I read it as a strong design signal, not a ranking of products.

CarryOn and Semantic Context Handoff, from two other groups, split context into a compact state and linked evidence. CarryOn pairs a compact execution state with source-linked evidence and selects what to keep without extra LLM calls. It reports 75.7 percent macro-averaged success across AppWorld, OfficeBench, and Tau2 Telecom, 6.7 points above the strongest baseline. Semantic Context Handoff calls the idea state-evidence separation. In a controlled 150-task SWE-bench study, letting old evidence re-enter context raised Pass@1 from 80.0 to 86.9 percent at about the same token use. Against the strongest baseline, the full system used 43 percent fewer tokens and 41 percent less wall-clock time.

The state holds what the agent currently believes. The evidence holds what it saw, and the state keeps an address for each piece. A summary can still exist, but it should not be the last copy of a tool result.

My own contact with compaction is smaller. In agav, a terminal coding assistant, my merged #730 added tests for the `/compact` command: what it reports, and what it saves and refreshes. Those tests check the command's output and saved state. They do not check whether evidence survives the summary, which is the question these papers raise.

Resolution is the hard part

DISCERN argues that recall is the easy part. On ENT-310, a synthetic benchmark of 310 enterprise sales-agent questions with 100 unanswerable ones, a plain RAG reader already matched strong memory systems on recall. Retention and currency scored about 0.93 to 0.98 for every competent system. The hard part was resolution: which entity a question means, which version of a fact is current, and whether to answer at all.

DISCERN's rule is "preserve at write, resolve at read." Its graph never merges look-alike entities and never drops a superseded value, so the reader can see the conflict. It reached an abstention F1 of 0.924, against at most 0.802 for eight baselines, and 0.800 on entity resolution where no baseline passed 0.40. A council of LLM judges scored those results on synthetic data, so the exact numbers need outside replication.

Boring Agent Memory hit the same problem at a much smaller scale. Its strict mode is built to return nothing instead of a wrong match. On my synthetic benchmark, strict mode returned nothing for all 20 trick questions that pair one system's name with another system's setting, and recall dropped to 80 percent. DISCERN gives that trade a name, abstention, and my benchmark reports it next to recall.

RAG in a Trenchcoat pushes the point further. Its memory, BRIDGE, uses chained notes, BM25 plus cosine retrieval, and chronological order, with one LLM call per ingestion or query. It matched the prior state of the art within confidence intervals on LongMemEval-S and BEAM. The authors argue that this parity is the finding: the benchmarks score what memory retrieves, while agents need memory that changes what they do. On their probes, where a question can only be solved by applying a remembered rule or pattern it never mentions, no design won everywhere. Fact extractors won rule application, and BRIDGE won pattern induction.

MAPE evolved whole memory programs and found a recurring pattern. Designs that kept raw conversations as retrievable evidence held on to details that extracted memories dropped.

A deliberately minimal retrieval layer matched far more elaborate memory on these recall benchmarks. On my own synthetic benchmark, plain keyword search found the right file in the top three for all 100 answerable questions. My merged #740 in agav added a `/memory search` command that matches the query as one phrase, ignoring case, with no embeddings. I would add extraction or graphs only after a probe shows the plain version failing at a task.

What a citation proves

Cited but Unused tested whether cited claims came from the retrieved text. The authors replaced a fact in the retrieved passage with a false one and asked again. Across model sizes, 1.2 to 15.7 percent of citable claims followed the model's own memory instead of the passage. Natural language inference checks, the standard way to verify citations, performed at chance. The cause is structural: a model that answers from memory picks a citation that agrees with its answer.

That limit applies to my own checks. Boring Agent Memory verifies that each cited source still matches what was indexed. In careeroc, a rule-based check threw out 2 of 17 citations it could not verify in one recorded review. Both checks confirm that a citation exists and points at real text. Neither proves the model used that text, and the counterfactual swap is the test I would add next.

Memory is custody

HEAMS asks what a memory system owes its user beyond accuracy. Stored information can leak into the wrong context, resist correction or deletion, outlive what the user wants, or carry poison into later behavior. Across its suite, no system led every performance benchmark, and the authors found that strong performance scores can coexist with weak privacy, security, and user-control scores. Governance policies moved the results too: recall policies cut inappropriate disclosure at some cost in helpfulness, and both recall and retention policies improved poisoning resistance.

The smallest version of that failure is one I fixed. In Sentient, a personal AI assistant, a turn with memory switched off could still echo stored content through the `memory_remember` tool, including a renamed fact and a duplicate's stored text. My merged #548 made that answer carry no stored content, and I checked it on two real model backends before opening the pull request. An accuracy benchmark without a memory-off case would miss it. A custody test would catch it: turn memory off, then ask what the answer reveals.

My takeaway

These papers give me a short checklist for the next memory or context layer I build.

  1. Keep the source records, and let every summary or state entry point back to them.
  2. Fold older context in code where possible, and keep the fold reversible.
  3. Report abstention next to recall, with questions that should get no answer.
  4. Treat a citation as an address, and test whether swapping the cited text changes the answer.
  5. Add custody tests for memory-off, correction, and deletion before adding retrieval tricks.
  6. Start with keyword search and citations, and add machinery only when a probe shows it failing.

Folio ran every system on DeepSeek-V4-Pro, so its gain came from what the runtime kept and how it read it back. That is the part of an agent I can build, test, and fix in a small pull request.