Anthropic tests selective memory for Claude agents
Anthropic found that Claude agents retained knowledge across sessions more effectively by saving selected strategies, plans and rules instead of exhaustive records of every action. The company also tested a post-session process called Dreaming, which reviews earlier transcripts to correct faulty notes and organize…
Anthropic found that Claude agents retained knowledge across sessions more effectively by saving selected strategies, plans and rules instead of exhaustive records of every action. The company also tested a post-session process called Dreaming, which reviews earlier transcripts to correct faulty notes and organize stored knowledge.
The approach allows Claude to write notes to a folder and read them during later sessions without changing the model itself. Anthropic said the main challenge is deciding which information could prove useful before the agent knows what future tasks will require.
Exhaustive notes hinder performance
In a Pokémon Red test spanning roughly 10,000 game steps, Claude Sonnet 3.7 created 413 files across 225 folders, often making a separate record for each battle and item. Changing game conditions quickly left many notes outdated, and the model sometimes reorganized its records instead of playing. Claude finished with a single badge.
Claude Fable 5 restricted its memory to a few files and earned four badges. The newer model avoided recording information already visible on screen, focusing instead on plans, strategies and tested rules.
Anthropic's comparison involved only a single playthrough for each model. The company recommends explaining the purpose of memory and allowing Claude to decide how to manage it.
Rigid directions such as “only record mistakes” erased most of the advantage stronger models showed in one Anthropic benchmark. Older models benefited more from explicit instructions, including directions to read their notes before every response.
Dreaming corrects faulty memories
Dreaming reviews previous session transcripts during idle periods and checks the agent's notes against them. The method builds on research from Letta and UC Berkeley.
During the Pokémon test, Claude recorded the wrong side of a mountain for a landmark. Relying on that note, the model entered the same trap three times. Claude wanted to give up and missed its goal.
A Dreaming pass identified the error by comparing the note with the transcript. Claude then found the correct path. Anthropic said the process can also create structured knowledge collections while resolving gaps, duplicates and broken links.
Wikis improve complex retrieval
Claude used Dreaming to build a linked wiki from about 350,000 internal documents belonging to Stainless, a software company Anthropic acquired. The strongest results came when Claude combined the wiki with search rather than treating it as a replacement.
In a separate Anthropic legal test, the wiki helped most when answers depended on information spread across multiple documents. Claude scored 87 percent with the wiki, compared with 73 percent using search alone.
For simple lookup tasks, the wiki performed roughly on par with search. In one case, the generated wiki grew larger than the source documents.
Costs and errors remain concerns
Anthropic said taking notes during a task can distract an agent, while Dreaming requires extra computing resources and produces results after a delay. Notes and wikis also require regular maintenance to prevent errors and hallucinations from accumulating.
Automatically loading too many memories into each session can consume context and carry faulty notes into future work. In Anthropic's tests, selecting and correcting information improved agent memory more than storing the largest possible archive.
Anthropic introduced Dreaming in May as a research preview for Claude Managed Agents, its cloud platform for AI agents. The service can review an existing memory store and up to 100 past sessions to remove duplicate and outdated entries. Dreaming creates a reorganized store while leaving the original unchanged.
At launch, Dreaming supported only Claude Opus 4.7 and Sonnet 4.6. Anthropic said unresolved questions include how agents should balance active work with note-taking and how often stored knowledge should be reviewed.