Anyone who has worked with an AI agent on a project spanning several days knows the wall: every new session starts from scratch. In a new research post, Anthropic describes how Claude is designed to retain knowledge across sessions while the underlying model stays unchanged — by writing notes to a folder it can read back later. The surprising finding is that the hardest part of agent memory is not storage. It is selection.

The core problem, according to Anthropic, is that an agent has to decide in the moment what might matter later, before it knows what comes next. Every note is a bet on the future. Store too little and the agent repeats its mistakes; store too much and the archive goes stale, eats context, and carries errors forward indefinitely.

The Pokémon Test: 413 Files, One Badge

To illustrate the failure mode, Anthropic pointed to tests run inside Pokémon Red. Claude Sonnet 3.7, an older model, treated everything as potentially important. Across roughly 10,000 game steps it created 413 files spread across 225 folders — often a separate file for every battle and item it encountered. Because the game state kept changing, the archive went stale almost as fast as it was written. At times, the model did nothing but reorganize its notes instead of playing, and it finished the run with a single badge.

The newer Claude Fable 5 took the opposite approach: it limited its memory to a handful of files and earned four badges. Fable 5 did not record information that was already visible on screen, and instead wrote down plans, strategies, and rules it had tested. Anthropic cautions that the comparison covers only a single playthrough per model, so the result is indicative rather than definitive — but the direction is consistent with the company's broader advice.

That advice is to explain the purpose of memory to Claude and let the model decide how to use it. In one benchmark, rigid instructions such as "only record mistakes" wiped out most of the advantage for stronger models. Older models, by contrast, benefited from clear instructions, such as being told to actually read their notes before every response.

Dreaming: Auditing Memory After the Fact

The bigger risk in long-running agents is not forgetting — it is trusting faulty notes. Anthropic's answer is a process it calls Dreaming, an idea that builds on research from Letta and UC Berkeley. Much as the human brain consolidates experiences during sleep, Claude goes through transcripts of earlier sessions during a break and checks its notes against what actually happened.

In the Pokémon test, Claude had incorrectly noted which side of a mountain a landmark was on. Relying on that faulty note, the agent fell into the same trap three times, eventually wanted to give up, and missed its goal. After a Dreaming pass, Claude caught the error by checking the note against the transcript and found the right path.

Dreaming can also organize much larger knowledge bases. Claude built a linked wiki from about 350,000 internal documents from Stainless, a software company Anthropic acquired, with Dreaming generating new pages while fixing gaps, duplicates, and broken links. The payoff was greatest when Claude could combine the wiki with search, so the curated memory worked as a complement to retrieval rather than a replacement for it.

When a Wiki Beats Search

In a separate legal test conducted by Anthropic, a curated wiki helped most on questions whose answers were 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 — and in one case it even grew larger than the source documents it summarized.

Anthropic is candid about the open problems. Taking notes mid-task distracts the agent from its work. Dreaming costs extra compute, and its results arrive only after a delay. Wikis and notes also need regular upkeep, or errors and hallucinations pile up. And the company warns against automatically loading too many memories into every session, because they eat up context and pass any bad note along to every future session.

From Research Preview to Product

Dreaming itself is not new: Anthropic introduced it in May as a research preview for Claude Managed Agents, the company's cloud platform for AI agents. The service reads an existing memory store and up to 100 past sessions, removes duplicate and outdated entries, and creates a reorganized store while leaving the original untouched. At launch it supported Claude Opus 4.7 and Sonnet 4.6. OpenAI has since borrowed the branding for its own memory overhaul of ChatGPT in June, which it also calls "Dreaming" — a background system that maintains a user profile and automatically corrects outdated information.

The overall takeaway from Anthropic's research is that a useful agent memory depends less on storing as much as possible than on keeping the right information and correcting mistakes later. As labs race to build agents that can work reliably for days and weeks rather than minutes, memory curation is quietly becoming a competitive frontier of its own. You can follow the latest AI developments in agent research at AI Buzz Wire.

Stay Ahead of AI

Agent research is advancing quickly, and memory is the next battleground. Get every update, plus the latest AI developments from every major lab, at AI Buzz Wire.

Read more AI news →