Skip to content
IFAI

Research

Claude uses 'dreaming' to clean up its agent memory

Published Reach 80

Anthropic just unveiled a new agent memory framework for Claude inspired by human sleep, dubbed 'dreaming.' During idle time between sessions, agents review raw logs to correct faulty assumptions and distill broad strategies rather than hoarding every trivial detail. Why it matters: smarter agents don't just remember more—they know what to prune.

Claude uses 'dreaming' to clean up its agent memory
Image: anthropic.com

When you go to sleep, your hippocampus quietly replays the day, turning fragmented short-term memories into lasting knowledge. AI agents have never enjoyed that luxury. Until now, they either suffer from total amnesia the second a session ends, or hoard every single raw token into an external database until their context window chokes.

Anthropic published research unpacking how to build actual agent memory. The main takeaway is refreshingly straightforward: smart agents don't get smarter by saving more data. They get smarter by learning what to ignore, and by using idle periods between tasks to run an offline consolidation process dubbed "dreaming."

Hoarding data makes agents dumber

A lot of developers assume that giving an agent a folder to write notes in automatically solves persistence. Anthropic tested this assumption by putting different versions of Claude into a run of Pokémon Red.

The older Claude Sonnet 3.7 acted like an obsessive packrat. It assumed every interaction could be vital, creating separate files for every item picked up, every battle fought, and every NPC encountered. By step 10,000, it had generated 413 files across 225 folders—nearly 980,000 characters of text—yet managed to win exactly one gym badge.

Because Pokémon changes constantly, Sonnet 3.7's notes were stale almost immediately. Around step 10,000, it spent 17 consecutive turns creating and deleting memory files without taking a single in-game action.

Claude Fable 5 took the opposite path. At the same checkpoint, it held just 10 files across three locations, totaling roughly 43,400 characters, and had earned four badges. It ignored everything already visible on screen, like player coordinates or wallet balances. Instead, it only saved deduced game logic—such as noting that if three Poké Balls fail on a Magikarp, varying input timing helps land the catch. Opus 5.5 adopted a similarly lean strategy and ended up beating the game.

Anthropic also found that rigid hand-holding backfires on frontier models. In CL-Bench tasks, forcing Opus 5 to only record failures actually degraded its performance. Giving advanced models the freedom to judge salience on their own worked best.

Waking up from a bad assumption

Selective note-taking is great, but what happens when an agent writes down a false assumption and blindly trusts it in the next session?

That exact trap happened outside Mt. Moon. A one-way ledge drops players back to a previous route if they step over it. Claude incorrectly jotted down that the nearby PokéCenter was east of the mountain rather than west. Thinking it had cleared the cave, it walked out, jumped the ledge, and got stuck. Trusting its faulty note, Claude made the same mistake three times before giving up entirely, writing that it would rather stop than keep looping.

Anthropic fixed this by triggering a dreaming cycle. During idle compute time, Claude cross-referenced its stored note against the raw session transcripts—the objective ground truth. It spotted the contradiction, corrected the landmark's coordinates, and on the next run pushed straight through to Cerulean City.

Dreaming can also turn scattered notes into living knowledge bases. Across 128 sessions processing 350,000 internal documents from software firm Stainless, Claude built an interconnected wiki that raised QA accuracy from 13% to 48%. In a separate merger document test, querying the synthesized wiki yielded 87% accuracy, trouncing traditional document search at 73%.

Why it matters

Most agent architectures treat memory like a storage locker. They dump raw turns into vector databases, leading to bloated retrieval costs and agents hallucinating over their own outdated notes. Anthropic is arguing for active memory curation: separating immutable raw logs from curated notes and linked wikis.

We think this background consolidation layer is the smartest architectural shift Anthropic has proposed in months. It mirrors biological sleep: compute-heavy reflection happens asynchronously when the agent is idle, so live user interactions remain fast and clean.

The catch, of course, is cost. "Sleep-time compute" is still compute that someone has to pay for, and running continuous background reviews across thousands of agent sessions will add up fast. Furthermore, while a jump from 13% to 48% on 350,000 documents is impressive, it also means Claude still missed more than half the answers.

Even so, the playbook for autonomous agents has clearly changed. Winning won't come down to stuffing larger context windows, but teaching agents how to prune the noise and self-correct when nobody is watching.

Sources (6)

  1. [1]
    anthropic.com(opens in a new tab)Originalanthropic.com
  2. [2]
    x.com(opens in a new tab)Discussionx.com
  3. [3]
    x.com(opens in a new tab)Discussionx.com
  4. [4]
  5. [5]
  6. [6]
    interestingengineering.com(opens in a new tab)Reportinterestingengineering.com

Similar events

Past happenings like this one, for context.

Best of AI, daily