Deep Dive · Context Engineering

Memory, Then Dreaming: An Anthropic Engineer on Context Engineering

A conference talk from Anthropic's applied AI team traces one year of context engineering — CLAUDE.md, memory tools, skills, file-system memory — and then names the next bottleneck honestly: an agent writing memories during a task is splitting its own attention. The answer is an out-of-band process, run in batch, with its own budget, that reads transcripts and rewrites the memory store. Anthropic calls it dreaming.

Context engineering talk — video thumbnail
Talk: Anthropic applied AI, at AI Devcon (re-uploaded as DigitalFoundry) 31:37
context engineering memory dreaming agents

📼 What this recording is 0:00

First, the packaging. The upload is titled "Anthropic Engineer Reveals: Stop Prompting Claude… Build AI Systems That Prompt Themselves", on a channel that is not the speaker's, with 267 views. The recording itself is a straightforward conference talk: Lamis, member of technical staff on Anthropic's applied AI team (the group between research, product and go-to-market, working with startups building agents at the frontier), speaking at AI Devcon about context engineering.

The title misrepresents the content. Nobody in this talk tells you to stop prompting. The argument is narrower and more useful: model intelligence does not compound on its own, because the knowledge your organisation needs is orthogonal to the model — so the durable lever is the context you build around it. Treat the clickbait as packaging, and the transcript as the source.
One more reason to take it seriously: everything described here has since shipped and is documented. The "dreaming" process is in Anthropic's managed-agents platform as a research preview, and the API documentation matches the architecture in this talk closely enough to check line by line — which this article does.

🗓 One year of context engineering 3:22

The recap is the most useful part of the talk, because each step is presented as "what worked, what broke, what came next" rather than as a feature launch.

StepWhat workedWhat broke
CLAUDE.md at session start"Unreasonably effective" — a short markdown file steers an agent towards your conventions and preferencesContext bloat: the file that must hold your most important preferences keeps growing
Memory tools, in-bandAutonomy: the agent decides when to read, write and update memories during a sessionBuilt-in conflict — the session is both the thing being done and the thing being curated
SkillsProgressive disclosure: the agent reads a two-sentence front matter, then loads detail only when relevantStill opinionated by humans about which processes deserve a skill
Memory as a file systemMarkdown files, searched with plain tools; agents are already good at bash and grepNeeds indexing to be searchable at scale
"The way I like to think about it is as if I had a bookshelf in my room and every time someone talks to me, I can scan the titles and pick off the book I need."
The through-line is a single design rule that keeps being rediscovered: markdown, file systems and simple search beat bespoke memory APIs, because the agent already knows how to use them. Every abstraction built on top of plain files has to justify itself against grep.

🎯 Three learnings 8:01

RuleWhy
Markdown is great for memoriesHuman-readable, agent-writable, diffable, tool-friendly
Let memories grow; give agents index and searchRetrieval at use time beats compression at write time
Give agents autonomy when writingThey notice what mattered in a session better than your schema does

And the payoff he promises from those three, if you build only this much: repeat tasks get better, because the agent has notes about what went wrong last time.

🏭 Where the neat idea breaks 8:37

Failure modeWhy it is worse than it sounds
Concurrent writesMany agents, one memory file, no arbiter
One agent edits organisational contextAn incorrect edit propagates to every agent that reads it — a fleet-wide outage from one bad write
Humans and agents co-editingLineage disappears; nobody can say why the memory says what it says
StalenessYesterday's truth, quietly asserted today
Injection into memoryA memory written by a hostile input becomes trusted context forever after
The injection risk is the one to underline. A memory store is not a cache — it is a long-lived influence channel. Anything that reaches it survives the session and shapes every future run. That single property turns "let the agent write what it learns" from a convenience into a security boundary that needs review, provenance and versioning.

🛡 Four guardrails 10:21

GuardrailImplementation he describes
VersioningStore versions so you can roll back; record which session and transcript produced each change, and who made it — agent or human
ConcurrencyHash the memory → draft the edit → re-hash before committing; if the hash moved, re-read, redraft, retry
PermissioningOrganisation-wide context read-only for agents; per-agent scratch pads writable; middle tiers by team or cross-section
PortabilityClean API so curated memory is usable across product surfaces and systems
The hashing scheme is optimistic concurrency control, invented decades ago — the same discipline that lets databases and version-control systems accept parallel writers without locking everything. He does not oversell it: on the "are we reinventing databases" question later, his answer is that after a year of letting agents write freely, they now know which primitives deserve to be deterministic and baked into the harness.

🚧 The in-band bottleneck 15:02

Here is the argument that justifies a new product rather than a new setting, and it is a good one:

LimitationConsequence
Split focus and resourcesOne agent is asked to finish the task and invest capacity in curating memory for a future run — a hard trade-off with no right answer, plus latency
Visibility limited to the sessionIt cannot see patterns across sessions, so "the agent keeps making the same mistake" is invisible to the agent making it
No fleet viewFailures shared by many agents in many environments never get aggregated anywhere
Memories go staleSomething has to check that what is written is still true
The second row is the most relatable failure in agent engineering. A user experiences repetition across sessions; each session has a fresh context window and no memory of the pattern. No amount of better prompting fixes an architecture where the entity that could detect the pattern is not the entity that has the evidence.

💤 Dreaming 17:53

The proposal: a second-order, out-of-band process over memory. It runs in batch, asynchronously, with its own allocated budget, and its job is to make the memory store itself better.

StageWhat happens
InputsAn existing memory store, plus a batch of session transcripts over a period
Fan-outAn orchestrator deploys a fleet of subagents to analyze the transcripts — including tool calls and metadata, not just the conversation
Pattern detectionWhere do agents consistently fail? Is a topic missing? Is a tool misconfigured? Is a convention not written down?
OutputA new memory store proposing changes, with example transcripts and prevalence statistics
Human gateYou accept or reject each proposed change
SteeringYou tell the process what matters in your organisation, so curation is not generic
Everything above matches the shipped documentation, which is rare for a conference talk. The Dreams API takes a pre-existing memory store plus 1 to 100 sessions, runs as an asynchronous job with a chosen model, accepts free-text instructions to steer it, and produces a separate output memory store — a clone of the input — so the original is untouched and you can inspect the result and discard it.

🏫 The school analogy 16:56

SchoolAgent system
Students do the work and hand it inAgents run sessions and write memories
Teachers have dedicated capacity to help students learnOut-of-band curation with its own token budget, focused on improving future runs
A head teacher reviews everything and spots curriculum gapsThe orchestrator aggregates subagent findings and proposes organisation-wide context changes

His three illustrations of a proposed change are worth keeping as test cases: a topic entirely missing from the curriculum (memory gap), every student answering in radians instead of degrees (tool misconfiguration), and a fleet-wide habit you dislike, such as too many em dashes (a style rule to write down once).

Note what the analogy gets right: the head teacher does not do the students' work, and the students do not audit the curriculum. The separation exists in real institutions because the same actor cannot both perform and supervise — which is precisely the in-band limitation described earlier.

💰 Why spend tokens to save tokens 24:27

The obvious objection is cost: you are adding a batch process that burns tokens on transcripts nobody asked about. His answer is that the memory improvements pay for it downstream.

Effect of a good memory storeMechanism
Higher accuracy on repeat tasksThe agent has notes about what went wrong last time
Fewer tokens per taskIt one-shots work it previously explored
Lower latencyFewer turns, less rediscovery
Developer attention freedSelf-curation runs in the background rather than in your backlog
This is a claim you should measure rather than accept. It is plausible and consistent with the rest of the talk, but "the memory process pays for itself" depends entirely on how often your tasks repeat and how expensive a miss is. On one-off work, a batch process that spends tokens to improve future runs improves nothing. The right test is: track cost and accuracy per task type before and after enabling curation, not overall.

🗄 "Are we reinventing databases?" 29:41

An audience member asks the sharpest question of the session: with versioning, concurrency and durability, at what point are you rebuilding a database from first principles? His answer is the most interesting thirty seconds in the recording.

"We were just letting these agents write in markdown files and commit whatever they wanted. Now, having seen which primitives work really well, we're thinking about codifying that in the harness… we are going back to the software engineering principles that we've seen work well in the past, but in a way that autonomous agents can interact with those really effectively."
That answer is the thesis of the whole talk, stated by accident: the boundary between what an agent decides and what the harness enforces moves over time, and it moves in the direction of determinism as evidence accumulates. Hash checks, version records and permission tiers are not exciting; they are what remains after a year of trying the exciting version first.

The other two questions are worth noting: on choosing a memory store for enterprise use, he points to Anthropic's own managed memory and dreaming APIs (having joked that he is not allowed to make product calls to action); on scaling dreaming across users with different permissions, his answer is that you choose which session transcripts to attach, so a dreaming job can mirror whatever permissioning your agents already have.

📚 What the docs add 28:18

Because this shipped, the constraints the talk skips are published — and they are the ones that decide whether you can use it.

DetailFrom the documentation
StatusResearch preview; access by request
InputsOne memory store plus 1–100 prior sessions
OutputA separate memory store; the input is cloned, not modified — inspect and discard if you dislike the result
Steeringinstructions string, e.g. focus on coding-style preferences and ignore one-off debugging notes
ModelChosen per dream from a supported list, so you can spend a strong model on curation
ComplianceNot eligible for zero-data-retention or HIPAA during preview
AlternativeAnthropic publishes a cookbook recipe for building your own with prompts and models you choose
Two consequences worth planning around. The 100-session cap means curation sees a window, not your full history — design the cadence accordingly. And because the output is a separate store, dream-generated memory is proposed, not applied: the review gate he demos is not politeness, it is the mechanism by which a poisoned or mistaken consolidation stays out of production.

✅ Claims checked

ClaimVerdictEvidence
The upload's title reflects the talkNoThe talk is about context engineering and memory; nobody advises abandoning prompts
Speaker is on Anthropic's applied AI team, working with startupsAs introduced on stageOpening remarks; unverified beyond the recording
CLAUDE.md was "unreasonably effective"Consistent with public guidanceAnthropic has documented memory files in Claude Code since launch
Skills use progressive disclosure — front matter first, body on demandCorrectThis is exactly how Agent Skills are specified
Best practice is to model memory as a file system and let agents search itTheir stated positionMatches Anthropic's memory-tool approach: plain files, agent-run search
Concurrency via hash-draft-rehashCoherent designOptimistic concurrency control; the published memory API documents stores and stores' versions but not this internals detail
In-band memory has a split-attention and a visibility problemWell arguedStructural: one context window cannot see cross-session patterns
Dreaming is out-of-band, batch, with its own budgetCorrectDreams run as asynchronous jobs with a chosen model
Dreaming reads a store plus recent transcripts and proposes a new storeCorrectDocs: 1–100 sessions in, separate output store out
You can steer the process and accept or reject changesCorrectinstructions parameter; cloned output store you can discard
It is a shipped product, not a research ideaCorrect — with caveatsResearch preview in the managed-agents platform, access by request, not ZDR/HIPAA eligible
Dreaming pays for itself by cutting downstream tokensPlausible, unmeasured hereDepends on task repetition and cost of errors; measure before assuming
"Dreaming" appeared first in a Claude Code leakAudience claimMoot now that it is documented publicly; no primary source examined

Basis note. Built from the full 31:37 recording and checked against the published Dreams and memory documentation for the managed-agents platform. The sourcing itself required correction: this is a conference talk re-uploaded under a misleading title by a channel that is not the speaker's, so the article attributes the content to the speaker and treats the upload as a transcript carrier. Timings and API specifics in the docs win wherever they differ from the stage.

🔑 Key takeaways

  • Intelligence does not compound on its own. The context an organisation needs is orthogonal to the model, so context engineering multiplies whatever intelligence you buy.
  • Do the simple thing that works. A markdown file at session start was "unreasonably effective" before anything more elaborate existed.
  • Plain files beat bespoke memory APIs, because agents already know how to use bash and grep.
  • Let memory grow; retrieve at use time. Indexing beats pre-emptive compression.
  • Autonomy in writing, guardrails in editing: the split is the whole design.
  • A memory store is a long-lived influence channel. Inject once, influence every future session — treat it as a security boundary.
  • Four guardrails for production memory: versioning with provenance, optimistic hashing for concurrency, tiered permissions, and a portable API.
  • In-band curation is structurally handicapped: split attention, and no visibility across sessions or fleets.
  • Dreaming is a second-order process: batch, asynchronous, budgeted, reading transcripts and proposing a new memory store.
  • Propose, don't apply. The output is a separate store; the human gate is what keeps a bad consolidation out of production.
  • The 100-session window is a design constraint. Choose cadence deliberately, not by default.
  • Steer curation with instructions — generic dreaming produces generic memory.
  • The Q&A is the most valuable minute: "are we reinventing databases?" and the honest yes, deliberately.
  • Boundaries move toward determinism. What starts as agent freedom ends as harness code once evidence accumulates.
  • Measure the economics. "Dreaming pays for itself" holds only where tasks repeat and misses are expensive.

🔗 Resources

Basis note. Everything technical here was cross-checked against Anthropic's own documentation rather than accepted from the stage, and the two places where the talk is looser than the docs — the review gate being mandatory for safety, and the cost claim — are called out above rather than smoothed over.

⏱ Timestamp index

0:02Introductions: applied AI, working with startups
1:40Why context engineering is the lever
3:22Recap: CLAUDE.md and its context bloat
4:21Memory tools and in-band autonomy
5:09Skills and progressive disclosure
7:16Memory as a file system
8:01The three learnings
8:37Production problems: concurrency, poisoning, staleness
10:21Versioning
10:51Hashing and optimistic concurrency
11:51Permissioning across organisational and personal memory
12:52Portability and the clean API
13:40What large-scale memory buys you
15:02The in-band limitation: split focus
16:12The visibility limitation across sessions and fleets
16:56The school analogy
17:53Dreaming introduced
18:55How a dream runs
21:13What the review catches: missing topics, bad tool config
22:33Designing it in production: orchestrator and subagents
24:27In-band and out-of-band running in parallel
24:57Summary of practice
26:12Closing: keep dreaming
27:03Q&A: which memory store to use
28:36Q&A: permissions when scaling dreaming
29:41Q&A: are we reinventing databases?
☰ View all