Update, November 2026: the LongMemEval_M numbers in this post are from October 2026, on older engine builds, and we have not rerun them. The note-rewriting loop is ours, not an agent SDK.
When an agent's context fills up, the usual fix is to have the model summarize the old part and carry on. We built that loop and ran it against the engine on very long histories to see what the summaries lose.
The test
Same 60 LongMemEval_M questions as our truncation test: histories of about 1.2 million tokens, Gemma 4 31B as agent and judge. The summarizing loop reads the sessions in order. Whenever its notes plus unsummarized sessions pass 100,000 tokens, the model rewrites its notes from everything except the newest quarter of the window. The prompt told it to keep dates, numbers, names, purchases, plans, preferences and corrections. It never sees the question while compacting.
What happened
- In one Gemma run on 60 questions, the summarizing loop got 17 right. A loop that just truncates got 5 in each of its two runs, so summarizing beat truncation in this setup.
- The engine got 38 of 60, in two runs. (The engine version is not recorded in the public rows.) In the first run it was right on 28 questions the summarizer missed (27 in the second run), and the summarizer was right on 7 the engine missed (6 in the second).
- Of the summarizer's 43 misses, 29 say the detail isn't in the notes ("not mentioned", "no record"). By the time it reached the end it had rewritten its notes about 15 times, and the specific numbers and dates were what disappeared.
- By type, the summarizer scored 3 of 19 on multi-session questions against the engine's 13, and 3 of 20 on temporal against 8.
What it cost
The summarizing loop read about 1.13 million prompt tokens per question over 16 model calls, and wrote about 47,000 output tokens. The engine read about 10,000 to 12,600 tokens.
What this doesn't show
- 60 questions, one free model, and a summarizer prompt we wrote ourselves. A different prompt or a larger notes budget might do better.
- On Claude Haiku 5.5 we ran Anthropic's server-side compaction on 40 LongMemEval_M questions, with its default prompt and a 40,000 token trigger. It got 2 of 40 against the engine's 21. Our harness compacted whenever history passed 40,000 estimated tokens, about 29 times a question. That is below the 150,000 default of Anthropic's threshold mode (our 40,000 estimate was about 58,000 real tokens, just over its 50,000 minimum), and we used the default prompt untuned, so it is not a best-effort setup. Our own summarizer and Anthropic's ran with different models and settings, so the two numbers say nothing about each other.
- Dollar figures are estimates from token counts, not an invoice.
Every number, the by-type breakdown and the method are on the study page.
To see your own prompt grow before you pick a fix, try the long-session guide.
Sources and method: Ten times the history, still 38 of 60.