← All articles
AINov 6, 20267 min read

Does your AI helper need a nap to remember things, eh?

Anthropic explains how an AI agent can keep notes between jobs, and why letting it "dream" over those notes afterward fixes mistakes and builds a useful map. Here's the plain-language tour.

Based on: The components of agent memory, by Anthropic Research ↗
Anthropic research, explained 🍁

Bev the Beaver keeps notes between jobs. Then she naps on them. Weirdly, it works.

Think of the cottage binder. Every summer someone scribbles in it: "the pump needs priming," "don't trust the left burner." By August it's forty pages, half of it out of date, and one note about the dock is flat-out wrong. The binder is only useful if somebody tidies it.

That's the problem Anthropic wrote about in a post on agent memory. An AI agent that starts every job from scratch forgets everything. So what should it write down, and how does it keep those notes honest?

Their answer includes a surprising trick called dreaming: after the work is done, the AI goes back over its own records and tidies, corrects and organizes its notes. No actual sleeping beavers involved.

The TL;DR
  • "Agent memory" means what an AI learns from experience and saves as notes it can read in a later session.
  • Newer Claude models got better at deciding what's worth saving. In a Pokémon test, one older model wrote 413 memory files; a newer one wrote 9 and got further.
  • Telling Claude that memory exists helped. Strict rules about what to write could hurt the stronger models.
  • "Dreaming" lets Claude check notes against the original transcript, fix errors, build a linked wiki and keep the most important notes handy.
  • It isn't free: it costs compute, and a wiki can bloat. Anthropic says plenty of questions are still open.

Meet the cast

I'm Bev, the AI agent. I do the work and write notes for next time.
I'm Mo. I'm the person who hands Bev the next job.
Gus. I check whether the notes are actually true. Honk.

Our cartoon stand-ins. The research used Claude models, not woodland creatures.

The problem: you have to decide what matters before you know what's next

Anthropic compares this to the human brain. We form memories quickly, but only some get filed into long-term knowledge, and a lot of that filing seems to happen while we sleep or rest, when the brain replays recent experiences. The post suggests agents can split the job the same way: record work as it happens, then reflect on it later.

Jargon, translated
Agent memory
Notes Claude saves from experience (in a folder, say) so a future session can read them. It doesn't include changing the model's training or its memory within one conversation.
Session
One run of work. Each starts fresh unless there are notes to read.
Dreaming
Claude reviewing its past logs and notes between jobs to fix and reorganize them.
Wiki
Linked pages Claude writes about a subject, which work like a map of what it knows.
Salience
Fancy word for "worth remembering."

Better at knowing what to write down

In one test, Claude answered database questions one at a time, each in a fresh session, with only a memory folder carrying over. After each answer it was told the right one. The post describes the models getting better at turning that into a learning loop: an older model kept a scatter of untested guesses, while Claude Opus 5 was the first of the models described to close the loop, recording rules and how it knew they were true, plus warnings about traps.

Then came Pokémon Red. The researchers compared memory folders from one run each of two models, about 10,000 steps in.

413memory files (225 folders) from Claude Sonnet 3.7, which wrote down nearly everything. It ended with one badge.
VS
9files (two folders, plus one global.md) from Claude Fable 5, which mostly saved things the screen didn't show. It earned four badges.

One run of each model, so treat it as an illustration, not a league table.

In Canadian units An illustration: one cook labels every jar in the pantry and then spends the dinner hour hunting through labels. Another keeps one fridge-door sheet with the plan and the house rules. Same kitchen, very different Tuesday.

The first model's detailed records kept going out of date, since the game changes constantly, and it spent more effort combing through them than playing. The second used memory for things that vanish unless written down: strategies, plans and tested rules. (One of its notes: if three or more Poké Balls fail in a row, vary the timing.)

Tell it what memory is for, not how to use it

On the database test, simply telling Claude a memory folder existed was enough for two of the stronger models to use it well. When the team added the rule "record only failures," both lost much of the boost memory gave them. For the stronger models, freedom to judge beat fixed rules.

Older models were different. Claude Sonnet 4.6 often didn't read its memory folder, and prompting it to read notes and test its theories nearly doubled its benchmark score. Sonnet 5 read its memory before answering 9 times out of 10, compared with less than half the time for Sonnet 4.6.

Dreaming fixes the notes

A wrong note is dangerous because a later session will trust it. In a Pokémon cave, Claude wrote down that a landmark building was on the wrong side of the mountain, announced that the cave was behind it, and then walked off a one-way ledge back to where it started. With the bad note, it dropped back onto that route three times and never reached the next city.

The note says the cave is behind me. Onward!
The transcript says otherwise. Fix the note.

Our cartoon of the idea. In the post, dreaming checked the note against the session transcript and rewrote it.

When dreaming ran on the memory first, Claude caught the error, rewrote the note, went straight back into the cave and eventually reached the next city.

Dreaming builds a map, and a map can get too big

Next, wikis. The team used about 350,000 internal files (roughly 420M tokens) from Stainless, a software company Anthropic acquired in May, plus 25 test questions. They had Claude build a wiki over many dreaming sessions.

Score as dreaming sessions grew

Share of graded criteria met, on 25 questions.

2 sessions13%
128 sessions48%

Source: Anthropic.

Wiki plus search beat search alone

Aggregate score on the same questions.

Search only53%
Search + wiki (once the wiki had grown)61%

Source: Anthropic. With search and wiki the score rose from 54% to 61% as the wiki grew; using both also saved about 20,000 tokens per question.

On a set of 24 questions about a merger, the harder items (needing several documents, judgment or maths) scored 87% with the wiki, against 73% with search alone. But the wiki wasn't always worth it: on a task where each answer sat in a single document, it showed no clear gain, and on another the wiki ended up larger than the documents themselves. The post compares that to a map as big as the territory.

Steering what the notes focus on

On a contract task, several agents writing to one shared table overwrote each other, and a brief built from the wiki included only 41 of 57 contract facts. After Claude reflected on its failures and rewrote the building instructions (one page per contract, one agent each, terms quoted word for word), all 57 made it in.

72%of contract facts (41 of 57) with one shared table
VS
100%(57 of 57) with one page per contract

Dreaming can also promote the most important notes to the top, so they load at the start of every session. The post warns that this top layer has to stay small: loaded notes cost space, and a wrong note would travel into every session. Claude Code's auto memory, for example, loads only the first 200 lines or 25 KB of its index file.

Gus reads the fine print
  • The Pokémon file comparison covers one run per model, and dreaming's Mt. Moon fix is a single worked example.
  • Wikis weren't always useful: no clear gain on single-document tasks, and one wiki outgrew its source files.
  • Dreaming needs compute, and the post says checking every memory all the time may not be practical.
  • Dreaming's outputs may not be available to Claude right away, and wikis must be maintained so they don't pile up errors.
  • Anthropic says there are many open questions about designing memory for agents.
Honk responsibly.

Why this matters in Canada

This research isn't Canada-specific. The tests were Pokémon, a software company's files and merger documents. But Canada's privacy regulators have already said something relevant about keeping things. Their principles for generative AI (from the Office of the Privacy Commissioner of Canada, December 2023) call for retention schedules, accuracy of information and being open about how AI is used.

Anthropic's post doesn't discuss privacy law, so take this as our connection, not theirs. But if an AI helper at your clinic, shop or town office keeps notes between sessions, the same everyday questions apply: what is it saving, how long, who checks that it's right, and will anyone tell you?

What you can do tomorrow

  • Say that notes exist. If your AI tool has a memory or notes feature, tell it what the notes are for and let it judge what's worth saving, rather than writing a rulebook.
  • Read the binder. Skim what your tool has saved now and then, and delete what's wrong or stale. A wrong note gets trusted.
  • Keep the front page short. If you maintain shared instructions for AI, trim them. The post notes that long instruction files can lower how well they're followed.
Pop quiz: why might 413 memory files be worse than 9?

In that Pokémon run, much of what was saved went stale or could be read off the screen anyway, so Claude burned effort sifting its own notes. Fewer, better notes helped.

This is our plain-language take on Anthropic's research, with our own analogies and cartoons. For the full details and methods, read the original.