A thousand Claude agents formalized Fermat's Last Theorem in Lean using only Git and a SQL database, without a domain-specific harness or human steering of the solution.
2
The lead agent created database tables for announcements, worker assignments, notes, and landed code, then the team reassigned itself across 60 proof statements during a roughly 30-hour run.
3
Claude's memory improves when models decide what to save and retrieve, while dreaming can correct false memories, fill gaps, and turn raw transcripts into useful wikis.
Summary
Lance Martin presents two examples of Claude handling long-horizon work. In the first, 1,000 agents formalized Fermat's Last Theorem in Lean over about 30 hours. Each agent had a sandbox and access only to Git and a SQL database. A lead agent created its own coordination tables, and the group assigned and reassigned work across the proof without a domain-specific harness or human direction. Martin then discusses memory. Agents write useful memories during tasks, but those notes need later consolidation. Stronger models are better at deciding what to remember and when to retrieve it. In Pokémon, older Claude produced a large, indiscriminate memory directory, while Fable 5 kept strategic notes. Martin calls the later consolidation process dreaming. It can repair a false location memory, build a wiki from company documents, and fill missing pages in an existing wiki.
Lean turns a mathematical proof into machine-checkable steps
Martin begins with Fermat's Last Theorem, the claim that A to the power of n plus B to the power of n cannot equal C to the power of n for positive whole numbers when n is greater than two. Andrew Wiles proved it in the 1990s after seven years of work. Formalization means checking every step computationally. Lean is the system used here: it verifies each step in the proof. Martin describes the process as painstaking because a long mathematical argument must be translated into a chain of statements that Lean can check.
The experiment removed the specialized proof harness and human steering
An earlier effort used about a dozen agents, the Prove2Me platform, and substantial researcher support. Martin's newer experiment increased the team to 1,000 agents and removed both the domain-specific harness and human steering of the solution. Each agent ran in its own sandbox with restricted network access. The only shared tools were Git and a SQL database. Monitoring checked every tool call for escapes, while offline monitoring examined agent runs every 10 minutes. The prompt established one lead agent, 999 helpers, the problem statement, and instructions for using Git and the database.
The lead agent built the coordination system it needed
Five minutes into the run, the lead agent created database tables without being told to do so. One table let the lead make announcements and assign roles. Another let agents post notes about subtasks. A further table recorded whether work had landed. Agents then used these tables to announce changes, assign helpers to statements, share progress, and submit Lean code. Martin presents this as evidence that the agents can create useful working primitives for a hard task instead of receiving every part of their coordination system in advance.
The thousand-agent team redistributed work across the proof
The run lasted around 30 hours. For difficult parts, including the Langlands-Tunnell statement, the agents developed abstractions and represented dependencies in task trees. The proof contained 60 statements, and the lead and helpers moved between tasks as statements changed from in progress to done. Martin says the team progressively allocated itself across the proof using Git and the database. The result was a formalization that earlier work had expected to take many years, although the earlier version had used a smaller team, a specialized harness, and researcher support.
Useful memory requires both immediate notes and later consolidation
Martin frames agent memory with Kierkegaard's idea that life can only be understood backwards but must be lived forwards. During a task, an agent writes notes based on what seems important at that moment. A useful memory store needs a coherent, nonredundant view of what the agent knows. Martin compares this with human memory: daily experiences are fragmented, then a later process consolidates important parts into long-term knowledge. Agents can use the same separation between memories written during work and knowledge organized afterward.
Stronger models are better at choosing what to remember
On the CL Bench continual-learning benchmark, Claude answers 40 questions about a database in separate sessions and can write to a memory directory between questions. Sonnet 4.6 gains little from the memory store because it does not reliably know when to write or read. Later models use the same simple instruction more effectively. Martin says stronger models write more verified statements and predictions, and they retrieve memories when needed. The difference is not a special memory prompt. It comes from the model's own judgment about salience and retrieval.
Fable 5 keeps strategic Pokémon memories while Sonnet 3.7 records too much
Martin compares memory directories created while Claude plays Pokémon. Sonnet 3.7 writes a very large amount of material, including experiences that are not relevant to gameplay. The result is an unwieldy directory and worse game progress. Fable 5 produces a much tighter set of memories containing strategic insights and tactical knowledge that are not easy to recover from the current game state. Martin uses the comparison to show that newer models have better instincts about what deserves a place in memory.
Dreaming can repair bad memories and build reusable knowledge structures
Dreaming means reflecting over transcripts and written notes after or during work. It can turn them into representations such as wikis, promote selected memories into context for future sessions, and make information easier to use. In Pokémon, Claude once saved the wrong location for a landmark. That false memory trapped it in a loop, sending it through a trap door and back to an earlier level. Without dreaming, the error persisted. With dreaming, Claude corrected the memory and continued to the next level. Martin also describes company documents from Stainless, where additional dreaming improved a wiki built from the corpus and helped fill missing pages and create an index.