On December 4, 2026, OpenRouter published a hands-on test of agent memory: the same 12 sessions, four memory designs, three models — and the finding that summary notes use under 1% of the tokens yet match full history on recall. For anyone building their own coding agent, that directly decides what each request costs.
Four designs, close scores, costs apart by a hundredfold
The test used 12 synthetic sessions simulating a developer working with a coding assistant, 24 ordinary coding requests per session, with 19 facts, updates and distractors planted in between; a 13th session then asked 8 questions with exact answers. The models were Claude Haiku 5.5, GPT-6 Luna and DeepSeek V4.1 Flash.
| Design | Correct | Median prompt tokens | Cost per question set |
|---|---|---|---|
| No memory | 0 of 48 | 261 | $0.00007–$0.00021 |
| Full history | 46 of 48 | 97,341 | $0.012–$0.066 |
| Summary notes | 47 of 48 | 639 | $0.00011–$0.00037 |
| Retrieval | 47 of 48 | 785 | $0.00018–$0.00051 |
| Notes plus retrieval | 47 of 48 | 1,163 | $0.00013–$0.00043 |
With summary notes, a model rewrites a memory file of under 250 words after each session — durable facts, preferences, rules and configuration — and that file goes into the next session's system prompt. It trailed full history by a single point while using under 1% of the tokens, at a cost lower by two orders of magnitude.
Counting is every design's weak spot
Counting across sessions was the weakest area: only 22 of 30 answers were right. Models either mixed up similar events or dropped the number when summarizing. OpenRouter also tried a structured JSON event log, which did worse — 43 of 48, with the counting question right in only 2 of 6 runs. The conclusion is blunt: don't leave counting to model memory; record events in a database from your own code and give the agent a tool to query it.
In practice, OpenRouter's advice comes in three steps: start with summary notes, replacing outdated facts instead of keeping both versions; add retrieval when users ask about exact details such as hostnames, IDs or dates, so the original message comes back instead of a summary; and use a cheap model to write the notes, since the savings outweigh any loss in precision. For what agent memory is and how short-term and long-term memory differ, see What agent memory is: how short-term and long-term memory differ; the platform's earlier usage and cost test explains why switching models saves more than switching tools.