Agent Upstart

Cool things people are building with agents — and practical help getting the most out of them.

Playbooks · Coding

Claude agents now dream: memory that consolidates

Written November 9, 2026

A coding agent that forgets everything between sessions has to relearn your project every morning. Anthropic's November 6 post lays out the four-layer memory system its agents run, and the offline "dreaming" pass that tidies it up. The one part you control is a single file.

What agent memory means here

Anthropic's post, by Lance Martin, defines agent memory narrowly: knowledge Claude gains from experience — interactions with users and tasks it has been assigned — that it retains between sessions, saved as context it can read later. It excludes three other things: changes to the model's weights, in-context learning inside a single conversation, and compaction, the summaries Claude writes to replace older turns so it can continue in a new context window.

The idea behind "dreaming" comes from sleep-time compute, proposed by researchers at Letta and UC Berkeley: models use idle time between interactions to reorganize their existing context. Anthropic applies it to memory — the agent reflects on its logs to fix mistakes or produce new notes and representations, with the original transcripts as ground truth to check those notes against.

The four layers

LayerWhat it keepsIts weakness
TranscriptsA searchable log of everything that happened in a sessionIt records events but does not put the right information in front of Claude on its own
Memory notesSalient observations, rules, failure diagnoses and next steps that Claude writes itself, during the work or into a memory directoryQuality depends on Claude's judgment about what deserves to survive
RepresentationsHigher-level structures such as a wiki — linked pages about one subject that map a growing body of knowledgeCan grow larger than the documents it summarizes, and then abstracts nothing
Injected contextA small amount of material loaded at the start of every session, so Claude does not need to search for itCosts tokens in every session, and a wrong note is carried into every session

Dreaming works across all four: it checks notes against transcripts and corrects them, builds representations such as wikis, promotes useful notes up to the injected layer, and prunes what no longer earns its place. A memory note is, in Anthropic's framing, a prediction — writing down a rule predicts the pattern will matter again, and writing down a verified fact predicts a future session will want to trust it without double-checking.

What the tests showed

All figures in this section are Anthropic's own test results, from the post. They are not independent measurements.

The part you control

For Claude Code users, the practical point is one file. Claude Code's auto memory loads only the first 200 lines or 25 KB of MEMORY.md, whichever comes first. That header serves as an index, showing Claude what it knows and where to find it. What sits at the top of that file is what gets loaded into every session — so the top of the file should hold the current goal, the rules that have been tested, and pointers to the rest, not a running diary. Longer instruction files reduce adherence, Anthropic's own documentation warns, so the injected layer has to stay small — and much of dreaming's work is keeping it that way by moving details down the hierarchy and leaving links behind.

Dreaming itself is not a feature switched on in Claude Code. The post points to dreaming in Claude Managed Agents, where the Dreams API is a research preview, and to cookbooks for getting started with dreaming and building knowledge wikis. Do not expect a dreaming pass to run on your Claude Code sessions.

Limits

Related playbooks

Sources

Back to: Coding playbooks hub · Also: Pick a memory server for your coding agent · Codex memory v2: import memories from other agents · Run claude-mem on your own plan, redaction on