Summary
1,000 Claude agents with only Git and a SQL database, and why agent memory needs "dreaming"
Lance Martin of Anthropic tells two stories about Claude's newest capabilities. In the first, a thousand agents formalized a famous proof with almost no scaffolding. In the second, agent memory gets much better when an offline "dreaming" pass rereads notes and transcripts and fixes them. Both describe patterns you can reuse; the results are Anthropic's.
"1,000 Claude Agents Formalized Fermat's Last Theorem — Lance Martin, Anthropic" by AI Engineer — Watch on YouTube → Conference talk.
Pattern 1: a large team on simple primitives
- The setup. One lead agent and 999 helpers. Each runs in its own sandbox with restricted network access and can reach only two things: a Git repository and a SQL database. The prompt gives them the problem statement and tells them those two exist. No domain-specific harness and no human steering on the solution. An earlier run with about a dozen agents had needed a specialised proof-orchestration tool and a researcher's help.
- The agents built their own coordination. About five minutes in, the lead created database tables on its own: an announcements table for global messages, a role-assignment table for workers, a notes table for sharing progress, a subtask table, and a "landed" table for finished proof code.
- It ran about 30 hours. Agents reassigned themselves as the 60 statements in the proof were solved, and built task trees for the hardest parts.
- Safety wrapped around it: real-time monitoring of every tool call for sandbox escapes, plus offline review of all runs every 10 minutes.
The takeaway for your own multi-agent work: try a shared database and Git with a lead agent before building a bespoke orchestration layer.
Pattern 2: memory with a dreaming pass
- The problem. Agents write memory during a task, greedily and for that task. Memory has to be a coherent, non-redundant map read later. Mistakes written early get trusted forever.
- Stronger models use memory better without special prompting. On an open continual-learning benchmark (40 database questions, a fresh session for each, a memory directory in between), memory barely helped older Sonnet models but helped newer models increasingly. The only instruction was that the directory exists. In Pokémon, an older model wrote a huge, indiscriminate memory folder; a newer one wrote a small set of strategic notes and got much further.
- Dreaming is an offline pass that rereads transcripts and memory notes and rewrites them: correcting wrong notes, building representations such as a wiki, filling gaps and indexes, and promoting key memories into context loaded at the start of every session.
- Evidence. A wrong note about a landmark trapped Claude in a loop in Pokémon; one dreaming pass fixed it and Claude reached the next city. On 25 questions about an acquired company's documents, search alone scored about 53%; a Claude-built wiki improved with more dreaming compute, and wiki plus search scored highest. Dreaming also filled placeholder pages in an incomplete wiki.
To try the idea on your own agent: give it a memory directory, then schedule a separate session that reviews recent transcripts against the notes, corrects anything contradicted, merges duplicates and updates an index. Related: Hermes memory guide.
What you can actually set up from this
Extracted from the video's own transcript — the specifics the original summary left out.
Reproducible steps
- Sandbox every agent
Each of the 1,000 agents ran in its own sandbox with restricted network access, able to reach only a Git repository and a SQL database.
- One lead, many helpers
The prompt named one lead agent and 999 helpers and told them the problem statement and that Git and the database exist. Nothing else.
- Let the lead design the coordination
About five minutes in, the lead created its own tables for announcements, worker assignments, notes, subtasks and landed work.
- Monitor continuously
Real-time monitoring checked every tool call for escapes, and offline review looked at all runs every 10 minutes. The run lasted about 30 hours.
- Add a dreaming pass to memory
Between sessions, have an agent reread transcripts and memory notes, correct notes that turned out wrong, fill gaps, build an index or wiki, and promote key memories into context loaded at the start of every session.
Gotchas
- Memory written during a task is greedy and task-local; without a later reflection pass, a wrong note gets trusted forever (the talk's Pokemon example looped on one bad landmark note until a dreaming pass fixed it).
- Older models used a memory directory poorly even when told it exists; the benefit appeared with newer models and the same one-line instruction.
- The earlier dozen-agent run needed a domain-specific orchestration tool and a researcher's help; the simple Git-plus-database setup is the newer, stronger-model result.





