Claude Remembered 413 Files but Earned Only 1 Badge; Choosing Well Is Worth More Than Remembering More
Anthropic breaks down agent memory: record while working, then 'dream' afterward to correct mistakes. In Pokémon tests, Sonnet 3.7 wrote 413 memory files and earned 1 badge; Fable 5 wrote 10 files and earned 4. Choosing well is harder than remembering more.
Anthropic's engineering blog post on November 6 breaks agent memory into four layers and even gives it a name: 'dreaming.' This system is already in research preview in Claude Managed Agents and requires an application. The most striking numbers come from Pokémon: Sonnet 3.7 wrote 413 memory files and earned 1 badge; Fable 5 wrote only 10 files and earned 4.
First, the definition. By 'agent memory,' Anthropic means content Claude learns from experience, retains across sessions, and stores so it can be read later. The following three do not count: changing model weights, things learned temporarily within a single conversation, and compressing old conversations into summaries when the context is nearly full.
Memory is divided into four layers from bottom to top: at the very bottom are raw session records, which can be searched; above that are memory notes Claude writes itself; above that is organized structure, such as a wiki with interlinked pages; and at the top is content automatically inserted into context whenever a new session starts. 'Dreaming' is responsible for checking and distilling the lower layers and moving them upward.

The difficulty is straightforward: Claude has to decide in the moment what is worth remembering, yet it does not know what will be useful later. Anthropic's approach is to add a background step: after a session ends, Claude goes back through the raw conversation records, corrects notes it got wrong, and reorganizes scattered notes into a form that is easier to find. It is like the brain replaying the day's experiences during sleep and consolidating some of them into long-term knowledge.
The Pokémon Test: Remembering Too Much Becomes a New Task
Sonnet 3.7 thought anything might be useful, so it created a separate file for every battle, every item, and every passerby. After about 10,000 steps, its memory had nearly 980,000 characters. At that point it started creating a fourth 'master' folder; over the next 17 steps it created 6 files and deleted 9, without playing the game for a single step.
Fable 5 remembered only things that could not be seen on the screen. Money and position can be read from the screen every turn, so writing them down is redundant and quickly out of date; strategies and verified patterns exist only after it summarizes them itself. It used a global.md as a control panel, containing the current objective, the plan for beating gyms, and its own memory rules. After failing to catch a Magikarp with seven Poké Balls, it noted: 'After 3 consecutive failed balls, change the rhythm and press a few extra waits between menu steps.' Opus 5.5 used a similar small folder, revised it while playing, and eventually beat the game.

The most important takeaway here is: choosing well matters more than remembering more. Sonnet 3.7's detailed records kept expiring, and the further it went, the more time and resources it had to spend digging through memory rather than playing the game. Fable 5 remembered things the game would not directly tell it.
Dreaming Can Correct Errors and Build a Wiki
The Mt. Moon section is typical. Claude misremembered the location of the Pokémon Center; after walking out the door it said 'Mt. Moon is behind me' and changed its note to 'Mt. Moon complete.' A few steps later it dropped down a one-way ledge and returned to the path it had come from. The navigation tool did not show this drop, and it then judged that it was 'too far west,' when in fact it had never been on the correct side.
Without correcting this wrong note, Claude fell back onto the same path three times and finally said, 'I'm going to stop and not loop anymore.' An automated reply told it to continue, and it retreated all the way to Pewter City, never reaching Cerulean City that run. After 'dreaming' checked against the raw session records, Claude found the error, corrected the note, re-entered the cave, and finally reached Cerulean City.

Database tests are looking at the same thing. Each question starts a new session; only the memory folder carries over, and after answering, the model is told the correct answer. Sonnet 4.6 only piled up unverified guesses, with its score going from 0.330 to 0.364; Opus 5 was the first in this batch of models to form a complete learning loop, and most of its notes wrote down rules, how to confirm a rule holds, previous answers, and pitfalls it had hit, with its score going from 0.564 to 0.828.

A Few Lessons for Developers
Tell Claude what memory is for; don't prescribe how to remember. Just saying 'there is a memory folder available' worked well for Opus 4.7 and Opus 5; adding the instruction 'only record failures' made both lose most of the improvement that memory provided. Opus 5 dropped by 0.234, and Opus 4.7 dropped by 0.150. For strong models, giving judgment is more effective than presetting rules.
Older models need prompting. Having Sonnet 4.6 read memory before answering and verify its guesses raised its score from 0.364 to 0.641. Sonnet 5 does not need a reminder: 9 out of 10 times it reads memory first on its own.
The layer that loads automatically must be small. It consumes tokens every time, a single wrong item gets carried into every session, and the longer the instruction file, the less likely the model is to follow it. Claude Code's automatic memory loads only the first 200 lines or 25KB of MEMORY.md; this part serves as a directory, with details kept in lower layers and linked to.
When multiple agents work in parallel, don't let them write to the same file. In an acquisition-contract test, four agents wrote simultaneously into a shared terms table, overwrote one another, and only 41 of 57 key points survived. After changing it to one page per contract, one agent responsible for each, and verbatim copying of clause text, all 57 points were preserved.

A Wiki Is Not Always Useful
Anthropic used about 350,000 internal documents from Stainless, roughly 420 million tokens, for a test. It had Opus 5 organize them into a wiki across 128 sessions and then answer 25 questions. With the wiki alone, the score rose from 13% to 48%; with search alone it was 53%; wiki plus search rose from 54% to 61%, while also saving about 20,000 tokens per question.
A wiki is suited to questions that require piecing together information across documents. In a 24-question M&A Q&A set, more than half required synthesizing multiple documents; using the wiki got 87% correct, while search alone got 73%. For tasks where the answer can be found in a single document, the wiki offered no clear help; in one case the wiki grew to 203KB, larger than the 115KB original file. Anthropic itself cited Borges's one-to-one map joke.


'Dreaming' is already a feature in Claude Managed Agents; it is currently a research preview and requires an application to use. The cross-session memory library feature is beta. Anthropic also released a cookbook teaching developers how to build their own version with their own prompts and models.
All the numbers above come from Anthropic's own tests; the Pokémon comparison ran each model once. The article also says that 'dreaming' requires extra compute, and there is still no settled answer on how often memory should be reviewed, or whether to record while working or organize afterward.
Choosing well is worth more than remembering well; deleting is harder than storing. As memory systems mature, the core question may not be how to remember, but how to forget accurately.
发布时间: 2026-11-08 23:38