An Anthropic engineer explains how AI agents learn while they sleep

From a notes file to memory to dreaming: the system that lets Claude agents learn from their mistakes, step by step. Two quotes going around on X are not in the talk.

Paylaş
An Anthropic engineer explains how AI agents learn while they sleep

Anyone who works with an AI agent knows the feeling: you explain something today that you already taught it yesterday, and it repeats the same mistake in the next session. Lamis Mukta of Anthropic’s applied AI team spent 32 minutes at AI Native DevCon in London in June explaining how that gets solved. The title says it all: “Learning while you sleep: Beyond memory to dreaming”. The recording went viral again on X on 2 November. We listened to the whole talk and put the steps together in order.

Lamis Mukta at AI Native DevCon
Lamis Mukta, AI Native DevCon London 2026. Image: AI Native Dev, YouTube

What this is about

Mukta’s starting point: models get smarter every month, but intelligence alone does not compound. An agent does not know your codebase, your team’s preferences or your company’s rules; that context is orthogonal to the model’s intelligence and has to be supplied. Agents not learning from their mistakes is part of the same problem. She sums up Anthropic’s approach in one line: “do the simple thing that works.”

Five steps from memory to dreaming
A summary of the steps in the talk. Image: globalfeed.ai

Step by step: building memory

1. Start with a notes file. Step one is CLAUDE.md, a plain Markdown file read into every session. Mukta calls it “kind of unreasonably effective”. Both the human and the agent can write to it. Its only problem is that a long file bloats the context every session.

2. Hand memory to the agent. Next, the agent gets memory tools and decides for itself, mid-task, when to read and write. Giving the agent autonomy here works well, she says.

3. Keep knowledge on the shelf. Step three is skills and progressive disclosure. The agent reads only a few lines of front matter for each skill and loads the full body when needed. She compares it to a bookshelf: you don’t pull down the French dictionary until someone speaks French. The bottleneck is that humans still decide what deserves to become a skill.

4. Model memory as a file system. Current best practice is to treat memory as a file system. Agents use the bash and grep they already know instead of special tools. Her summary: keep memories in Markdown, let them grow, index them for fast search, and give agents freedom when writing.

Four guardrails for many agents

At scale, new problems appear: many agents writing to the same file at once, one agent corrupting context the whole organisation reads, stale memories, and prompt injection trying to write bad things into memory. Mukta lists four guardrails. Versioning: every change is kept, with which session and who made it, so it can be rolled back. Concurrency through hashing: the agent takes a hash, drafts its edit and checks the hash again before writing; if someone changed the file in between, the write is refused and the agent re-reads and retries. Permissions: organisation-wide memory is read-only, each agent’s scratchpad is writable. Portability: a clean API so memory works across products.

The result: the second time an agent does a task, it does it better. Mukta says agents spend fewer tokens and one-shot tasks more often; she gives no numbers.

What dreaming means

In-band memory has two limits. The agent has to split its attention between the task and curating memory, “a very difficult optimization problem” that also adds latency. And each agent only sees its own session, so patterns across the fleet stay invisible.

The answer is “dreaming”. Mukta explains it with a school: students do their work, while teachers and a head teacher look across classes and fix the curriculum. A dream is a separate process that runs in batch and asynchronously with its own resources. Its input is an existing memory store plus a set of session transcripts. An agent looks for places where agents consistently fail and proposes a new or changed memory store.

The examples are concrete. Geography: a whole topic is missing from the curriculum, so memory lacks it. Maths: answers come back in radians instead of degrees, meaning a tool is misconfigured; dreaming looks at tool calls and metadata, not just the dialogue. And organisation-wide style: in her example, “everybody is using too many dashes.”

In production, memories are Markdown files in a directory. An orchestrator sends a fleet of sub-agents through the transcripts. You can steer what counts as important, and the orchestrator keeps only patterns that are prevalent enough. Each proposed change comes with example transcripts and stats on how common the issue is, and a human makes the final call. Dreaming costs extra tokens, but she argues total cost falls because agents finish more tasks on the first try.

Where it lives in the product

In the Q&A, Mukta says these features are available in the memory and dreaming API of Claude Managed Agents, and Anthropic’s docs confirm it. According to the memory docs, stores mount at /mnt/memory/, every change creates an immutable version, a content_sha256 precondition blocks conflicting writes, and up to 8 stores can attach to a session as read-only or read-write. According to the dreams docs, a dream takes a memory store and 1 to 100 sessions and produces a new store without touching the input, and can be steered with instructions such as “Focus on coding-style preferences; ignore one-off debugging notes.” The feature is in research preview, with access by request.

Are the claims on X in the talk?

The post that spread the video attributes two lines to the speaker: “You don’t need to run Opus 5.5, you need to build a system that runs itself” and “90% of our engineers at Anthropic have already built these systems.” Neither appears in the talk; no model is named and no percentage is given. If anything, Mukta stresses human review and calls the topic “very much an open area of research”. The post’s summary of the content is accurate, though: the talk really is about agents with memory that learn from mistakes and improve with each run.

What you can do tomorrow morning

Her closing advice works for anyone: start simple, with CLAUDE.md and skills. As you scale, make memory safe, verifiable and auditable. None of this is specific to coding; she uses memory for her own presentations. Add dreaming to cut what is no longer relevant. The full talk is on YouTube and an edited transcript is on GitHub.

Sources: Talk recording (YouTube), Talk transcript, Dreams docs, Memory docs, Managed Agents announcement, X post