AI News
All stories
Official

Anthropic details 'dreaming' method for organizing Claude's agent memory

Anthropic says offline review of agent memory notes can fix errors, build wikis and promote key notes into future sessions, based on its own tests.

Research · · 5 min read

Watch the short

Under a minute, read by an AI anchor. Made .

YouTube loads only when you press play.

Anthropic has published an engineering post on 'dreaming,' an offline process in which Claude reviews its saved memory notes against past session transcripts. The goal is to correct errors, build wikis and promote key notes into future sessions. The company defines agent memory as knowledge Claude gains from experience and keeps between sessions. It compares the process to the hippocampus replaying experiences during sleep, so that some of them become long-term knowledge.

The post frames the difficulty as one of timing. Claude can tag important events while it works, but it cannot know what is salient before it knows what comes next. A note can be a prediction that a rule or fact will matter again. A note that is wrong from the start, or that goes stale as the environment changes, can still be read and trusted in a later session. Dreaming moves that judgment later. It reads existing notes alongside the transcripts they came from, so it can check each note against what actually happened. The cost is compute, and the post notes that dreaming outputs may not be immediately available to Claude.

CL-Bench 1.0 is a database task in which each question starts a fresh session and only a memory directory persists. On it, the models differed in how far they got. Claude Sonnet 4.6 generated theories about why answers were wrong but left them as untested guesses. Claude Opus 4.7 consolidated its notes and began marking which facts were confirmed. Claude Sonnet 5 marked answers as confirmed after the grader checked them and wrote corrections. Claude Opus 5 was the first to close the loop, with most of its entries holding a rule, how it knew the rule was true, and warnings about traps. Opus 5.5 and Sonnet 5.5 also closed the loop and scored about the same as Opus 5 with memory, though their baseline scores without memory were slightly higher.

The Pokémon Red test measures what a model chooses to save. Claude Sonnet 3.7 wrote 413 memory files across 225 folders and earned one badge. The post says much of that content went out of date because the game state changes constantly. Around step 10,000, Sonnet 3.7 created six files, deleted nine and took no game actions over 17 steps. Claude Fable 5 wrote nine files in two folders, plus a top-level file called global.md, and earned four badges. According to the post, Fable 5 stored things the screen does not show, such as strategy, plans and tested rules. It skipped facts like money or map position, which can be read off the screen each turn. Each model was run only once, so these results come from single runs.

The post also tested how much guidance to give. A general note that a memory folder exists was enough for Opus 4.7 and Opus 5 to use memory well. A fixed rule to 'record only failures' removed much of the performance gain for both. Steering mattered more for older models. Prompting Sonnet 4.6 to read its memory files and explicitly test its theories nearly doubled its benchmark score. Sonnet 5 reads its memory before answering 9 times out of 10 without being asked. Sonnet 4.6 did so less than half the time.

The clearest example of dreaming fixing an error involves Mt. Moon. The cave's entrance has a one-way ledge that drops the player back onto the route they came from. Claude had written down, incorrectly, that the PokéCenter was on the east side. So it announced 'Mt Moon is behind me' and marked the cave done. It fell off the ledge, concluded it had overshot, and kept the wrong note. When dreaming checked the note against the transcript and rewrote it, Claude went back into the cave and reached Cerulean City. In the run with the uncorrected note, Claude dropped back onto the route three times. After an automatic reply told it to continue, it ended up in Pewter City without reaching Cerulean City.

For wikis, the post used about 350,000 internal files, roughly 420M tokens, from Stainless, a software company Anthropic acquired in May. Over 128 sessions of Opus 5 agents, scores on 25 questions rose from 13% to 48% of graded criteria. Claude scored 54% with search and the wiki, rising to 61% as the wiki grew. With search alone it scored 53%, and its best wiki-only score was 48%. On a merger set of 24 questions, Claude scored 87% on the harder items when it used the wiki, against 73% with search alone. Those harder items required information across several documents, judgment or math. The post also reports a Harvey LAB task where the wiki showed no clear gain over search. In another, the wiki grew larger than the raw files, which the post compares to Borges's mapmakers.

A contracts task shows how instructions shape what dreaming keeps. With a shared table written by several agents at once, the brief included only 41 of 57 graded facts, which the post puts at 72%. After Claude reflected on its failures and rewrote its wiki-building instructions, each contract got its own page quoting its terms word for word. Then 100% of the criteria could be met. Dreaming can also promote notes into the injected context that loads at the start of every session. The post says that layer has to stay small, since injected notes use tokens and an incorrect note is carried into every session. It cites Claude Code's auto memory, which loads only the first 200 lines or 25 KB of its index file.

Anthropic's platform documentation describes Dreams as a research preview in the Claude API. A dream reads an existing memory store alongside past sessions and writes a separate output store. It never modifies its input. The documentation also says dreams are supported only on select models and require a specific beta header.

The post's evaluations are Anthropic's own. They use internal files, a Pokémon run and benchmarks such as CL-Bench and Harvey LAB, and several comparisons rest on single runs. The post doesn't report what the dreaming runs cost in tokens or time for the Stainless wiki or the Pokémon correction, although it says dreaming "requires compute."

What changed

Anthropic described 'dreaming', an offline process in which Claude reviews saved memory notes against past session transcripts to correct errors, build wikis and promote key notes into future sessions, and Dreams is available as a research preview in the Claude API.

Type: New capability · Applies to: Claude, Claude API

Why it matters

Companies running long-lived agents face a risk that a wrong memory note is reused in every later session. Anthropic's results suggest scheduled review against source logs can catch such errors, though the post notes this needs compute and the memory layer must stay small.

What you can do

Teams running persistent agents could check how stored memory notes are written, verified and reviewed against original logs, and track how often notes are actually read.

Original source

Where we saw it

1 source

Anthropic Research

AI wrote this summary from the sources listed, and nobody reviewed it individually before publication. Check the original source before you rely on it. How it works