Anthropic agent memory: dreaming repairs wrong notes
Anthropic's research on how Claude writes, prunes and dreams over memory, and what it means for builders running long-lived agents on Claude.
Picture a two-person consultancy that has wired a Claude agent to answer questions about a client's contract archive. Every run starts in a fresh session, so the agent keeps a folder of notes: where the amendments live, which vendor renamed itself, which clause the client always asks about. Three weeks in, the folder is a mess. Notes duplicate each other. One records a contract term wrongly, and the agent trusts it every time because nothing checks it. The fix today is a human opening the folder and pruning it by hand, or wiping it and losing what worked.
Anthropic's Nov 6, 2026 research post, The components of agent memory, is about that drift. It covers how Claude writes notes, how newer models judge what is worth keeping, and a background pass Anthropic calls dreaming, in which Claude checks its notes against the original session transcripts and rewrites them. According to DEV Community's write-up, the post is research, not a launch. It builds on the Dreams endpoint, which is in research preview for Claude Managed Agents.
What it is
Anthropic defines agent memory as knowledge Claude gains from experience and keeps between sessions as context it can read later. That excludes weight changes, in-context learning and compaction (Anthropic). The DEV Community piece summarizes the post's hierarchy as four layers: transcripts, memory notes, representations such as wikis, and injected context loaded into every session (DEV Community). Each finding maps to part of the consultancy's mess.
Bloated folders. In Pokémon Red runs at about 10,000 steps, Sonnet 3.7 wrote 413 memory files across 225 folders and earned one badge. Fable 5 wrote nine files in two folders plus a top-level global.md, and earned four (Anthropic). Sonnet 3.7 stored state it could read off the screen anyway, and at one point spent 17 steps creating and deleting files without taking a game action.
Over-specified memory prompts. Anthropic says it "helps to tell Claude what memory is for, but not how to use it." On CL-Bench 1.0, a rule to "record only failures" cost Opus 5 and Opus 4.7 much of their memory gain. Older models need the opposite. Prompting Sonnet 4.6 to read its memory before answering and to test its theories "nearly doubled its benchmark score" (Anthropic).
Wrong notes that persist. Claude once recorded a Pokémon Center on the wrong side of Mt. Moon. With that note in memory, it walked off a one-way ledge three times and never reached Cerulean City. A dreaming pass checked the note against the transcript, caught the error and rewrote it. The corrected run went on to reach Cerulean City (Anthropic).
Large document piles. Over 128 sessions, Opus 5 agents built a linked wiki over about 350,000 Stainless files, roughly 420M tokens. Each session built on the last through a shared log, so this was Anthropic's own multi-session research setup, not one dream job (the Dreams API reads at most 100 sessions per job, below). Wiki-only performance on 25 questions rose from 13% to 48% of graded criteria as dreaming scaled from two sessions to 128. Search plus the wiki rose from 54% to 61%, against 53% for search alone, and saved about 20,000 tokens per question. On 24 merger questions, the multi-document, judgment and math items scored 87% with the wiki against 73% with search alone (Anthropic).
Losing the facts that matter. On a contract task from the Harvey LAB benchmark, agents writing to one shared table overwrote each other's work, and a brief generated from the wiki included only 41 of 57 facts (72%). Claude then reflected on its failures and rewrote its own wiki-building instructions in two ways: each contract got its own page written by a single agent, and terms were quoted word for word instead of summarized. A brief from the rebuilt wiki met 100% of the criteria, up from 72% (Anthropic). DEV Community's second write-up notes that the one-writer rule and the quoting rule changed together, so the result can't credit either one alone.
Alternatives. None of the sources compares this to other vendors' memory systems, so we can't name outside alternatives. The sources do describe three other approaches:
- Transcript search alone. Anthropic says it's reasonable to consider transcript search as the foundation of Claude's memory, since wikis and other representations take compute to maintain and keep free of errors (Anthropic).
- Claude Code auto memory. Claude maintains its memory during the session, and only the first 200 lines or 25 KB of MEMORY.md load into each session, which keeps the injected layer small (Anthropic).
- A dynamic dreaming workflow cookbook. According to DEV Community, it gives you more control over runs and models. It can also update a store in place, so it loses the Dreams API's guarantee of separate output.
Who it's for
Pick this up if you run long-lived Claude agents on Managed Agents across many sessions, especially over document collections where answers span several files. That is where the post's wiki gains showed up. Claude Code users with a growing MEMORY.md should read it too. The lessons on salience, index size and auditing apply without any new API.
Skip the Dreams API if your tasks fit in one session, or if your answers usually sit in a single document. On one LAB task like that, the wiki showed no clear gain over search (Anthropic). Also skip it if you can't put compute toward memory upkeep with no published cost per run. If you're on another vendor's stack, the design lessons transfer, but this API doesn't.
Before and after
Before:
- The agent writes notes in-session, often guided by a hand-written rule about what to save.
- Notes pile up, duplicate each other and drift as the source material changes.
- A wrong note gets read and trusted in every later session.
- A human audits the folder by hand, or doesn't.
After, as the post describes it:
- Tell the agent what memory is for and let a frontier model judge salience. For older models, explicitly prompt them to read memory first.
- Periodically run a dream over the memory store plus past transcripts. It checks notes against what actually happened, merges duplicates and builds or prunes a wiki.
- Review the output store before attaching it. Per DEV Community, the Dreams docs say the input store is never modified, so you can discard a bad result.
- Keep the injected top layer small: an index that points to detail, not an archive.
Try it
The zero-cost first step is in Claude Code. Per DEV Community's summary of the Claude Code docs, auto memory lives in ~/.claude/projects/<project>/memory/, /memory opens the folder, and messages like "Recalled 2 memories" show Claude reading from it (DEV Community). Open your MEMORY.md, check it against what's actually true, and trim the top.
On Managed Agents, dreaming is an asynchronous API job. It reads a memory store plus 1 to 100 past sessions and writes a new store. It needs the dreaming-2026-04-21 beta header, which the SDK sets, and runs "typically take minutes to a few hours," per DEV Community quoting the Dreams docs (Nov 7, 2026). This is the Python call from that piece, which says it was reflowed from the docs. store_id and the session IDs come from your own runs:
import anthropic
client = anthropic.Anthropic()
dream = client.beta.dreams.create(
inputs=[
{"type": "memory_store",
"memory_store_id": store_id},
{"type": "sessions",
"session_ids": [session_a, session_b]},
],
model="claude-opus-5-5",
# steer what the dream should keep and drop
instructions=(
"Focus on coding-style preferences; "
"ignore one-off debugging notes."
),
)
print(dream.id)
That article's author says they haven't run the API themselves. FourWeekMBA quotes the docs as saying Dreams are "in research preview on select models" and billed at standard API token rates (Nov 8, 2026). Anthropic's post points to its cookbooks for getting started with dreaming and knowledge wikis (Anthropic).
Where it breaks
-
Compute. Anthropic says memory maintenance consumes compute and that too much stored information can overwhelm future sessions, per Interesting Engineering. The post itself says continuously checking every memory "might not be practical" and suggests focusing dreaming on information likely to change.
-
Cost is open. FourWeekMBA notes that the post gives no cost per dream and the docs list nothing beyond standard token rates. DEV Community adds that there's no total build cost for the 128-session wiki. Treat any pricing beyond that as unconfirmed.
-
More memory isn't better. Anthropic's own post includes a no-gain task and a wiki that grew larger than its source documents, as DEV Community points out. Injected notes also cost tokens in every session, and a wrong one is carried into all of them.
-
Vendor-run evals. FourWeekMBA stresses that these are Anthropic's own evaluations, not independent ones, and that the 13% to 48% figure covers 25 questions on one corpus. Per-model CL-Bench numbers also differ between outlets. AI Weekly attributes 0.644 to 0.833 to Opus 5.5, while DEV Community's table gives those figures to Sonnet 5.5. We couldn't verify either against the post's prose.
-
Transcripts as ground truth. Per DEV Community's reading of the cookbook, memory inherits the limits of its transcripts. A dream can't know what changed after the last transcript it saw.
-
Lock-in. In FourWeekMBA's analysis, a memory store curated from your own sessions becomes a switching cost that grows the longer the agent runs on one platform.
-
Unconfirmed. Our research couldn't confirm several points:
- whether dreaming is available beyond the Managed Agents research preview
- when it leaves preview
- the data-retention terms for transcripts that dreams read
- the documentation's guidance on prompt injection, including whether default read-write access lets an injected instruction write content that later sessions trust
The last one is the risk to test before you point a dream at sessions that handled untrusted input.
Sources
- The components of agent memory · Anthropic
- Anthropic's Agent Memory Study: Rules on What to Save Cost Claude Much of the Gain · DEV Community
- Can Claude dream now? Anthropic explores human-like machine memory · Interesting Engineering
- Anthropic: Claude 'Dreams' Took Wiki Scores From 13% to 48% - FourWeekMBA · FourWeekMBA
- Anthropic Research Unveils Three-Part Agent Memory Architecture, Lifts Opus 5.5 CL-Bench From 0.644 to 0.833 | AI Weekly · AI Weekly
- Agent memory: how Claude repairs wrong notes with dreaming · DEV Community