Complete AI Training
Start for Free

Your job's AI kit

Get your AI kit

Tell us who you are and what you do. We show you your kit right away and email you the link: skills, prompts, AI agents, MCP servers and courses for your job.

500+ jobs ready, and we make a kit for any other job. No payment needed to look.

Share

AI news ·

Anthropic details how memory works for Claude AI agents and why it sometimes needs to dream

Claude agents can now build and correct their own long-term memory during idle time through a process called "dreaming." In tests, this boosted a model's accuracy on complex document questions from 13% to 48% and saved roughly 20,000 tokens per query.

Claude and other AI agents can now build, organize, and correct their own long-term memory using a process called "dreaming" - an offline computation method that mirrors how human brains consolidate knowledge during sleep. Researchers at Letta and UC Berkeley first proposed sleep-time compute as a way for models to use idle time between interactions, and Anthropic's latest tests show it dramatically improves an agent's ability to tackle complex, multi-step tasks without repeating past mistakes.

How agent memory works

Agent memory is knowledge Claude gains from experience that persists between sessions, saved as context it can read later. It excludes in-context learning within a single conversation, changes to model weights, or compaction summaries. The system draws a direct parallel to human cognition - the hippocampus captures experiences in the moment, while offline replay during sleep gradually distills those experiences into long-term knowledge stored in the neocortex.

During active work, Claude can tag salient events or write notes to a memory store, such as a folder of files. But judging what matters in the moment is a prediction problem. "By writing down a rule, an agent predicts that the pattern it's describing will be relevant again," the research team said. Claude Opus 5 was the first model to close this learning loop reliably, recording rules alongside evidence for why those rules were true and flagging traps it discovered along the way.

What Pokémon Red reveals about memory judgment

Testing Claude's ability to play Pokémon Red exposed stark differences in how models judge what's worth remembering. Claude Sonnet 3.7 wrote 413 memory files across 225 folders and earned one badge. Claude Fable 5 wrote nine files in two folders plus a single top-level file called global.md, and earned four badges. Sonnet 3.7 stored everything - battle logs, item pickups, NPC encounters - most of which became outdated as the game state changed. It eventually spent more time managing its memory folder than playing.

Fable 5 stored only what the game did not explicitly show on screen: strategies, plans, and tested rules. After seven Poké Balls failed to catch a Magikarp, it wrote, "If 3+ balls fail in a row, VARY the timing (insert extra 'wait' presses between menu steps) - the catch landed right after doing this." Opus 5.5 took a similar approach and beat the game. The lesson: stronger models benefit more from freedom to judge salience than from fixed rules about what to record.

Dreaming corrects errors and builds knowledge maps

Dreaming lets Claude validate its memory notes against original session transcripts. In one Pokémon run, Claude incorrectly recorded that a PokéCenter was on the east side of Mt. Moon. It repeatedly walked off a one-way ledge and looped back to an earlier route three times before giving up. When dreaming checked the note against the transcript, it caught the error and rewrote it. With the corrected note, Claude navigated straight through the cave and reached Cerulean City.

Dreaming also builds richer memory representations called wikis - collections of linked pages that gather what Claude knows about a subject. In a test using roughly 350,000 internal documents from Stainless, a software company, Claude's performance on 25 questions grew from 13% to 48% of graded criteria as dreaming scaled from 2 sessions to 128. When Claude used both its wiki and a search tool, its aggregate score rose from 54% to 61%, saving about 20,000 tokens per question compared to search alone.

For professionals working with large document sets, this capability matters. On a legal brief benchmark using merger documents, Claude scored 87% on complex questions requiring cross-document reasoning when consulting a wiki, compared with 73% using direct file search. However, the wiki showed no clear gain on tasks where answers could be retrieved from a single document with a text search.

Steering memory without over-engineering it

Anthropic found that telling Claude what memory is for works better than dictating how to use it. When researchers imposed specific rules - such as "record only failures" - much of the performance boost from memory disappeared. For stronger models, preset rules weakened results. Weaker models benefited more from explicit prompting: telling Claude Sonnet 4.6 to read its memory files before answering nearly doubled its benchmark score. Sonnet 5 did this on its own 9 out of 10 times without being prompted.

Dreaming can also shape memory toward specific goals. When building a wiki for contract analysis, agents initially overwrote each other's work in a shared table, producing a wiki missing key facts. After a reflection loop where Claude proposed and tested instruction changes, each contract got its own page quoting terms verbatim. The brief generated from the improved wiki met 100% of grading criteria, up from 72%.

Why this matters for professionals

For anyone managing complex, long-running projects - whether in Generative AI Courses, legal work, software development, or research - agent memory with dreaming changes what AI assistants can reliably handle. Instead of starting fresh each session, an agent can retain lessons from past work, correct its own mistakes during idle time, and surface relevant knowledge without being asked. The practical takeaway: when configuring AI tools for your team, giving the model a memory directory and simple guidance to save what's clearly important will often outperform detailed rules about exactly what to record. The models are getting better at that judgment on their own.

Share