
Anthropic has published new research on agent memory, explaining how Claude can save lessons between sessions and then “dream” over old transcripts to fix mistakes and tidy up its notes. The post walks through tests on a learning benchmark, legal documents and even a Pokémon game, and it shows clear gains when memory is organized well. If you build or use AI agents, it is a useful look at what separates helpful memory from a junk drawer of notes.
What Anthropic Means by Agent Memory
In the research post, agent memory means knowledge Claude picks up from experience and keeps between sessions as notes it can read later. That includes lessons from conversations with users and from tasks it was given. It does not include changes to the model’s weights, learning inside a single chat, or the summaries Claude writes when a long conversation gets compacted.
Anthropic frames memory as a kind of prediction. When an agent writes down a rule, it is betting that the rule will matter again in some future session. The company says newer Claude models have gotten much better at making those bets.
Newer models close the learning loop
On a task from Continual Learning Bench 1.0, Claude answered database questions one session at a time and could only carry over files in a memory folder. Older models stopped at untested guesses or loose notes. Claude Opus 5 was the first model in the test to “close the loop,” writing rules along with how it knew they were true, and Opus 5.5 and Sonnet 5.5 did the same.
How Claude’s Dreaming Works
Dreaming borrows an idea from how human brains are thought to sort memories during sleep. Between tasks, Claude reviews its logs and transcripts, checks its notes against what really happened, and rewrites or reorganizes them. Anthropic says this has been a useful tool for giving Claude effective memory.
The post lists several jobs dreaming can do:
- Catch wrong notes by comparing them with the original session transcript.
- Build new structures, such as a linked wiki, that make memories easier to find.
- Promote the most important notes so they load at the start of every session.
- Focus memory on a specific goal, like the terms in a set of contracts.
- Fill gaps one session left behind, such as links to pages that do not exist yet.
One example came from a Pokémon run. Claude wrote down the wrong side of a mountain for a key building, then kept falling off a one-way ledge. After dreaming checked that note against the transcript and corrected it, Claude went straight back through the cave and reached the next city.
The Agent Memory Results in Numbers
Anthropic shared several measured results. Here are the headline figures from the post.
| Test | What changed | Result |
|---|---|---|
| Wiki built from about 350,000 internal files | Dreaming scaled from 2 to 128 sessions | 13% to 48% of graded criteria |
| Same corpus, search plus wiki | Wiki added to a search tool | Up to 61%, vs 53% with search alone |
| 24 merger questions | Wiki vs search alone | 87% vs 73% on multi-step items |
| Legal brief on contract terms | Claude rewrote its own wiki instructions | 72% to 100% of criteria met |
| Pokémon Red memory folders | Sonnet 3.7 vs Fable 5 | 413 files and 1 badge vs 9 files and 4 badges |
Using search and the wiki together also saved about 20,000 tokens per question, according to Anthropic. Not every test improved, though. On one legal task, the wiki added nothing over plain search, and on another it grew larger than the documents it was meant to summarize.
Less Is More for Memory Rules
A surprising finding is that strict rules can hurt. When Anthropic told models to “record only failures,” Opus 5 and Opus 4.7 lost much of the boost memory gave them. Simply telling Claude that a memory folder exists worked better for stronger models.
The post also explains why the top layer of memory must stay small. Notes injected into every session cost tokens, and one wrong note can spread into every future run. That is why Claude Code loads only the first 200 lines or 25 KB of its MEMORY.md file, which works as an index pointing to everything else.
What This Means for You
If you use Claude for work, this research helps explain why its memory features behave the way they do. For teams building their own agents, it offers practical lessons worth trying.
- Tell your agent what memory is for, not exactly what to write.
- Keep the always-loaded memory file short and use it as an index.
- Schedule a review pass that checks notes against real logs to catch drift.
- Pair a knowledge wiki with search rather than replacing search outright.
- Give wiki-building instructions that name what matters most for the task.
This fits a wider push to make agents more reliable over long projects. Earlier this fall, Databricks launched persistent agent memory, and Anthropic has added tools like agent tracing support for developers.
Open Questions Anthropic Still Has
Anthropic admits there is a lot left to figure out. Writing notes in the moment can pull Claude’s attention away from its main task, while dreaming in the background means new memories may not be ready right away. Dreaming also takes compute, so checking every memory all the time may not be practical.
The company suggests focusing dreaming on information that is likely to change, or tuning how often it runs. It also says memory systems will keep evolving as Claude gets more capable. You can follow more updates like this on our AI news page.
Sources
Primary source: Anthropic’s research post on the components of agent memory.
Conclusion
Anthropic’s new research shows that good agent memory is less about saving everything and more about saving the right things, then checking them later. Dreaming lets Claude look back at its own transcripts, fix bad notes and build maps like wikis that make knowledge easier to find. The gains are real in several tests, from 13% to 48% on a large document corpus and 72% to 100% on a legal brief. But Anthropic is open that wikis do not always help and that dreaming costs compute. For anyone building agents, the takeaway is simple: give your agent room to judge what matters, and build in time for it to review its own memory.


