Skip to content
AI Primer
workflow

Anthropic explains Claude’s offline “dreaming” memory process

Anthropic described how Claude uses offline compute, called “dreaming,” to organize memory. The process corrects memory mistakes, creates memories and builds representations for later retrieval.

4 min read
Anthropic explains Claude’s offline “dreaming” memory process
Anthropic explains Claude’s offline “dreaming” memory process

TL;DR

  • Claude can revise persistent memory between sessions: Anthropic's announcement describes offline “dreaming” that corrects notes, builds representations and prepares future context.
  • Saving less coincided with better Pokémon progress: a community breakdown highlights a newer model's selective notes over exhaustive logging.
  • Wikis delivered their strongest result alongside search, according to the evaluation screenshot, with the combination outperforming either source alone.

A wrong Pokémon location note sent Claude over the same ledge three times. One legal-document wiki grew larger than its source files. The underlying sleep-time compute paper dates to April 2025, more than a year before this write-up.

Four memory layers

Anthropic defines agent memory as experience-derived context retained between sessions in its November 6 engineering post. The model's weights stay unchanged.

The architecture separates four jobs:

  1. Transcripts: Preserve conversations and activity logs for later inspection.
  2. Memory notes: Capture selected lessons, rules, goals and plans.
  3. Memory representations: Organize knowledge into linked pages, such as a wiki.
  4. Injected context: Preload a small memory layer into a new session; retrieve deeper material when needed.

Context-based learning drew skepticism from teortaxesTex, who argued that its ceiling remains bounded by the pretrained model's capabilities.

Selective notes

Anthropic compared one Pokémon Red run each from Sonnet 3.7 and Fable 5 at roughly 10,000 steps:

  • Sonnet 3.7: 413 memory files across 225 folders; one badge.
  • Fable 5: Nine files in two folders, plus global.md; four badges.

These were different models and single runs, so the comparison does not isolate memory management as the cause of better play.

Fable 5 organized its notes around three paths, described in the Pokémon excerpt:

  • global.md: Current goal, gym plan and rules for using memory.
  • locations: Route-specific navigation plans.
  • gameplay: Strategies inferred from playing.

Sonnet 3.7 repeatedly stored information already visible on screen. During one 17-step stretch, it created six memory files and deleted nine without taking any action in the game.

Memory prompts

On the CL-Bench database task, each question began in a fresh session with access to a persistent memory directory. Correct-answer feedback allowed the models to revise their notes:

  • Sonnet 4.6: Recorded untested guesses about failures. Prompting it to read memory and test its theories nearly doubled its benchmark score.
  • Opus 4.7: Consolidated notes into a reference document and distinguished checked facts from unconfirmed claims.
  • Opus 5: Recorded validated rules, supporting evidence and warnings about discovered traps.

A fixed instruction to “record only failures” erased much of the memory benefit for Opus 4.7 and Opus 5. Stronger models benefited more from choosing what deserved a note.

Transcript audits

The strongest example is a wrong landmark note: Claude recorded a PokéCenter as being east of Mt. Moon when it was actually near the western entrance. It then marked the mountain complete and walked over a one-way ledge onto an earlier route.

Dreaming checked the note against the original transcript and corrected the location. With that correction, Claude re-entered the cave and eventually reached Cerulean City; the uncorrected-memory run never got past the mountain.

The approach builds on Letta and UC Berkeley's sleep-time compute research, acknowledged in the author's follow-up.

Linked wikis

Anthropic tested wiki-building against approximately 350,000 internal Stainless documents, totaling roughly 420 million tokens. Opus 5 agents explored the corpus across 128 offline sessions, maintaining linked pages and checking claims against source documents.

Task structure changed the payoff in further evaluations:

  • Cross-document merger questions: On items requiring synthesis, judgment or arithmetic, wiki-based answers scored 87%, versus 73% with search alone.
  • Single-document legal criteria: One Harvey LAB task showed no clear wiki advantage when ordinary text search could retrieve the necessary information.

Injected context

Dreaming can promote notes into the context loaded at session start, giving Claude information it might never think to search for. Incorrect promoted notes can consequently recur in every session.

Claude Code already limits its automatically loaded index to the first 200 lines or 25 KB of MEMORY.md, whichever comes first, according to its memory documentation. Deeper files are read when needed; the documentation also warns that longer instruction files reduce adherence.

Concurrent wiki edits

Multiple wiki writers lost contract facts in Anthropic's acquisition-brief experiment. A shared contract-terms table captured only 41 of 57 facts, partly because agents summarized terms poorly and overwrote one another's edits.

Revised instructions gave each contract its own page, assigned that page to one agent and preserved terms verbatim. Briefs generated from the rebuilt wiki could meet every graded criterion.

Further reading

Discussion across the web

Where this story is being discussed, in original context.

On X· 5 threads
TL;DR2 posts
Four memory layers2 posts
Selective notes2 posts
Transcript audits1 post
Linked wikis1 post
Share on X