Dreaming — How AI Agents Are Learning to Improve From Their Own Mistakes
An agent that remembers its past sessions is useful. An agent that reviews them, finds its own recurring mistakes, and corrects for them is something else. Anthropic's Dreaming feature adds the missing half of agent memory — and it changes what 'an agent gets better over time' actually means.
Memory was supposed to fix the forgetful agent. For most of 2025, the central complaint about AI agents was that they reset between sessions — every conversation started from zero, every preference had to be re-explained. The fix seemed obvious: give agents persistent memory so they carry knowledge forward.
But persistent memory, on its own, solved a smaller problem than it appeared to. An agent that simply stores everything it has done accumulates a pile of past sessions. It can retrieve them. What it cannot do is learn from them. The difference is the same one between a person who keeps every receipt and a person who reviews their spending. Storage is not insight. A memory store with no process that examines it is just an archive.
Anthropic's Dreaming feature, announced at Code with Claude 2026, adds the missing process. Dreaming is a scheduled routine that reviews an agent's past sessions and memory stores, extracts patterns across them, and curates those memories so the agent improves over time. It is named for what it functionally resembles — the offline consolidation that turns raw experience into something usable. And it changes what the phrase "the agent gets better" actually means.
Why Storing Memory Was Never Enough
To see what Dreaming addresses, it helps to be precise about what plain memory leaves unsolved.
Raw memory grows faster than it gets useful. An agent doing real work generates a large volume of session history. Most of it is routine. Buried inside are the things that matter — a recurring mistake, a preference that shows up repeatedly, a workflow that keeps working. A raw store holds all of it at equal weight. Finding the signal requires someone, or something, to actually look.
No single session can see its own patterns. A mistake made once in a session is, from inside that session, just an event. It becomes a pattern only when you look across many sessions and notice it recurring. An agent operating within one session is structurally unable to see this — it lacks the vantage point. The pattern is real, but it is invisible from where the agent is standing.
Improvement requires curation, not accumulation. Getting better at something is not about remembering more. It is about distilling experience into a smaller set of sharper lessons. A store that only grows makes the agent slower to search and no wiser. The valuable operation is the opposite of accumulation — it is reduction, the deliberate culling of experience down to what should change future behavior.
What Dreaming Actually Does
Dreaming is best understood as the consolidation step that closes the loop between having memory and learning from it.
It runs as a scheduled review, not a live process. Dreaming happens offline, on a schedule, separate from the agent's working sessions. This matters: pattern extraction across a whole history is a different kind of task than executing a current job, and trying to do both at once would degrade both. Separating them — work during sessions, reflection between them — is the structural insight.
It extracts patterns no session could see. Because Dreaming looks across the full body of past sessions at once, it can surface what is invisible from inside any one of them: recurring mistakes that keep happening, workflows that multiple agents independently converged on, preferences that show up again and again. It has the cross-session vantage point that an individual session lacks.
It curates rather than accumulates. Dreaming doesn't just add to the memory store — it shapes it. Patterns worth keeping are sharpened and promoted; routine noise is left behind. The memory the agent carries into its next session is not the raw archive. It is a curated distillation of what the archive actually taught.
It works across a team of agents. Dreaming surfaces preferences and workflows shared across multiple agents, not just one. A lesson one agent learned the hard way can become something the whole fleet knows. That is the difference between one agent improving and an organization's agents improving together.
Where This Changes Things in Practice
Self-improving agents land differently depending on the kind of work, and the differences are worth naming.
Recurring operational workflows. This is where Dreaming pays off most directly. A workflow that runs weekly — a reconciliation, a report, a review cycle — accumulates exactly the kind of repeated experience Dreaming is built to mine. Each run can genuinely inform the next, so the workflow gets measurably better rather than just running again.
Multi-agent systems. In a fleet of specialized agents, Dreaming becomes a shared-learning layer. When one agent discovers a better approach, that discovery can propagate. Without a consolidation step, every agent learns its lessons alone and re-learns the same ones independently — an enormous, invisible waste.
One-off tasks. For genuinely novel, never-to-be-repeated work, Dreaming offers little, because there is no recurring pattern to extract. This is worth saying plainly: self-improvement is valuable in proportion to how repetitive the work is. It is not a universal upgrade.
What to Actually Do About It
Treating Dreaming as a feature you enable misses the point. It is a capability you have to design your work around.
Concentrate agents on recurring work. Dreaming rewards repetition. The way to benefit is to route agents toward workflows that recur, so there is a pattern worth consolidating. An agent sprayed across unrelated one-offs gives Dreaming nothing to learn from.
Audit what the agent is learning. A consolidation process learns from whatever its history contains — including bad patterns. If an agent has been doing something subtly wrong and no one corrected it, Dreaming will faithfully reinforce the mistake. Periodically review the curated memory and confirm the lessons are the right ones.
Seed the memory deliberately. Don't rely solely on the agent discovering everything by trial. Provide known good practices and known pitfalls up front. Dreaming refines from a starting point; a better starting point produces better refinement.
Watch for improvement, and act when it stalls. A self-improving agent should show measurably better outcomes on recurring tasks over time. If it doesn't, that is diagnostic — the work may be too varied to yield patterns, or the memory may be accumulating noise faster than insight. Treat a flat improvement curve as a signal to investigate.
The shift Dreaming represents is subtle but real. For two years, the goal of agent memory was to stop agents from forgetting. Dreaming reframes the goal: the point of remembering is to learn, and learning requires a deliberate process that reviews experience and distills it. An agent that merely stores its past is an archive. An agent that reviews its past, finds where it went wrong, and changes accordingly is something much closer to a colleague who gets better at the job. The organizations that understand the difference will design for the second one.