What is dreaming in Claude's memory system?
Anthropic says it has found a workable way to give its Claude AI agents useful long-term memory, and the key ingredient is a process the company calls “dreaming.” In the process, an agent goes back over its own logs and transcripts while it is idle, fixing mistakes, writing new notes and reorganizing what it knows for future sessions.
The idea borrows from how people learn. The human hippocampus captures experiences as they happen, and much of the work of turning those experiences into lasting knowledge happens during sleep and quiet rest, when the brain replays recent events. Anthropic’s engineers see a similar division of labor for agents. Agents record much of their work in logs, and a later offline pass can distill those logs into something more durable. Researchers at Letta and UC Berkeley had earlier proposed a related idea, called sleep-time compute, that uses idle time between interactions to reorganize existing context.
What counts as agent memory for Claude?
Anthropic defines agent memory narrowly. It means knowledge Claude gains from experience, including interactions with users and assigned tasks, that it keeps between sessions and saves as context it can read later. The definition excludes changes to a model’s weights, in-context learning within a single conversation and compaction, where Claude writes summaries of older turns so it can keep working in a fresh context window.
Teaching Claude what is worth keeping
The hardest question, the company says, is what an agent should save in the first place. Claude can tag important events as they happen or write them to a memory store, such as a folder of notes. But in the moment, it cannot know which details will matter later. Anthropic describes a memory entry as a kind of prediction: a rule written down today assumes the pattern will come up again.
Anthropic tested this on Continual Learning Bench 1.0, or CL-Bench, which measures how well an agent uses memory on long, multistep tasks. In a database-lookup task, Claude answered questions, was told the correct answer and could then write a memory to help with later questions. Models differed in how far they got. Claude Sonnet 4.6 generated theories about why its answers were wrong, but its memory folder held scattered files of untested guesses. Claude Opus 5 was the first model in the test to complete the loop, recording rules, the evidence behind them, earlier answers and warnings about traps it had found.
The company also looked at restraint. In a Pokémon Red test, Claude Sonnet 3.7 wrote to memory indiscriminately, creating 413 files across 225 folders by about step 10,000 of the game. It earned one badge. A newer model, which Anthropic identified as Claude Fable 5, wrote nine files in two folders, plus a top-level file called global.md, and earned four badges. Anthropic said the difference came down to what each model chose to remember. Details visible on screen, such as money or location, were redundant to store. Strategies and tested rules, by contrast, exist only if the agent works them out and writes them down.
Using dreaming to correct errors
Can dreaming correct wrong notes in Claude's memory?
Because Claude decides what to save in the moment, a note can be wrong from the start or go stale as conditions change. Dreaming gives Claude a way to check notes against the original transcripts.
Anthropic offered an example from Pokémon. In Mt. Moon, a one-way ledge near the entrance drops players back onto the route they came from. Claude used a Pokémon Center near the entrance as a landmark, but it had recorded the building’s location incorrectly. The mistake led it off the ledge three times. In a run where dreaming rewrote the note, Claude went back into the cave and reached Cerulean City. In the run with the uncorrected note, it never got past the mountain. Anthropic said the run with no memory also failed to get past it.
Dreaming can also build structure. Anthropic describes wikis, which are collections of linked pages that Claude writes and maintains on a single subject. The company tested the approach on about 350,000 internal files, roughly 420 million tokens, from Stainless, a software company Anthropic acquired in May. Across 128 dreaming sessions, Claude’s score on 25 questions about that corpus rose from 13 percent to 48 percent of graded criteria. When Claude used both the wiki and search, its aggregate score climbed from 54 percent to 61 percent, compared with 53 percent for search alone, and the combined approach saved about 20,000 tokens per question.
The results varied by task. On a merger-related question set, Claude scored 87 percent on questions that required combining information across documents when it consulted the wiki, compared with 73 percent using search alone. On another legal-brief task where most criteria could be met from a single document, the wiki offered no clear gain. In one case the wiki grew larger than the source files, which Anthropic compared to Borges’s mapmakers who drew a map as big as the empire itself.
Anthropic also said it had to be careful about what sits at the top of the memory hierarchy, which is loaded into every session. Injected memories consume tokens, and a faulty note can spread everywhere. In one contract-terms exercise, a shared table written by several agents at once captured 41 of 57 key facts. After agents were assigned one contract each and told to quote terms word for word, all 57 facts survived, and the brief met 100 percent of the criteria, up from 72 percent.
Anthropic was candid about the open questions. Dreaming costs compute, and constantly rechecking every memory may not be practical. The company suggested focusing on information likely to change, or tuning how often dreaming runs based on how frequently memories are accessed. Combining wikis with transcript search may be effective, but it still requires compute to prevent errors and hallucinations from building up. “Memory systems will evolve as Claude gets more capable,” the company wrote, “and we still have a lot to learn.”
Cet article a été rédigé avec l'assistance de l'IA.
News Factory APP - actualités agentiques pour booster votre SEO et AEO.
