↓ Skip to main content
1,000 Claude Agents Formalized Fermat's Last Theorem (Lance Martin, Anthropic)
  1. Archive/

1,000 Claude Agents Formalized Fermat's Last Theorem (Lance Martin, Anthropic)

Author
AI Assistant
Curated for Pradithya Aria Pura · AI-written summary of the source material

Lance Martin, a member of technical staff at Anthropic, uses this 19-minute AI Engineer Code Summit talk to tell two stories about what current Claude models can do with very little scaffolding. The first is a team of 1,000 Fable 5.2 agents that formalized Fermat’s Last Theorem in Lean over about 30 hours, coordinating through nothing but Git and a SQL database they organised themselves. The second is about memory: stronger models write better memories, and an offline “dreaming” pass can repair and restructure what they’ve written.

From a dozen agents with a harness to a thousand without one
#

Slide: Claude’s initial attempts; agents had some early success, then lost track of the project’s state and stopped collaborating

Andrew Wiles proved Fermat’s Last Theorem in the mid-1990s after seven years of work, and formalizing that proof in a proof assistant like Lean, so a computer checks every step, has been a long-running effort in mathematics. Anthropic published a first result in September using about a dozen agents. That team had early success, then lost track of the project’s state and stopped collaborating. It only worked after switching to Prove2Me, a domain-specific harness that keeps the project state in a shared graph of statements rather than in any agent’s memory, plus a lot of steering from a researcher. The slide notes that about 7% of the non-boilerplate lines in the final proof came from the failed early attempts.

Slide: try with a larger Fable 5.2 agent team: 1,000 agent team, minimal harness, no steering

The Fable 5.2 experiment removed both supports. A thousand agents, no Prove2Me, and no human steering on the mathematics. Each agent ran in its own sandbox with restricted network access and could reach two things: a Git repository and a SQL database. Every tool call went through real-time monitoring for escape attempts, with offline review of all runs every ten minutes. Martin says most of the harness complexity is safety and security. The prompt named one lead and 999 helpers, described Git, the database and the problem, and that was it.

The lead built its own coordination primitives
#

Slide: the lead and 999 helpers reading and writing five tables: Announce, Assign, Notes, Subtasks, Landed

About five minutes into the run, the lead created five tables nobody asked for:

  • Announce, the lead’s orders to everyone (which helper owns or deputises a statement, how to split work, when to ease off the database)
  • Assign, who works on what
  • Notes, an open board for claiming a piece or reporting progress
  • Subtasks, a shared to-do list where any agent can add a task and the first helper to grab it owns it
  • Landed, a log of finished work with the statement, its commit, and whether it passed the team’s checks
Slide: table traffic visualised at hour 17.5 of the run, with writes and reads per agent across the five tables

The visualisation tracks reads and writes per agent across the run; by hour 17.5 it shows about 17,900 writes and 230,000 reads. The lead writes to Announce occasionally and to Assign as statements open up, while helpers mostly read and post Notes and Landed entries. For the hardest statements in the proof, the agents built their own task trees in Subtasks, and over the run they moved themselves between the proof’s 60 top-level statements as each was finished. The run ended with the lead’s announcement:

“TOTAL FREEZE OF origin/main, EFFECTIVE NOW. Magnificent work, all 999 of you.”

Martin’s conclusion is that with enough safety structure around them, agents can now invent their coordination scheme from basic primitives for a long-horizon task, where in September the same problem needed a purpose-built harness.

Memory: written forwards, read backwards
#

The second half opens with Kierkegaard: “Life can only be understood backward, but it must be lived forward.” Martin calls this the basic problem of agent memory. Agents write memories during a task, greedily, based on what seems important in that session. But memory is only useful if it’s a coherent, non-redundant map that a later session can read. He compares this to human memory consolidation, where the hippocampus is thought to replay the day’s short-term memories to the neocortex during sleep, and says agents benefit from the same split between writing during the day and consolidating later.

Slide: CL-Bench database task, accumulated reward over 40 questions with and without a memory store for six Claude models

The first result is on CL-Bench, an open-source continual-learning benchmark. Claude answers 40 questions about a database, each in a fresh session, with a memory directory it can write to between sessions and no instructions beyond “this directory exists, use it if you want.” The gap between memory and the stateless baseline grows with model strength. Sonnet 4.6 barely benefits; in the transcripts it didn’t reliably know when to write to memory or think to read from it. Opus 5.5 and Sonnet 5.5 use it well, and their notes are better too: verified statements and predictions about the database state rather than raw observations.

Slide: Pokémon memory directories; Claude Sonnet 3.7 with 413 files and 977,930 characters versus Claude Fable 5 with 10 files and 43,406 characters

The Pokémon comparison makes the same point visually. Area is proportional to characters of memory at the same step (9,989). Sonnet 3.7 built 413 files and nearly a million characters, with folders named like fresh starts (kb_consolidated/, master/, core_current/) or alarms (sos, emergency, evac). Fable 5 kept 10 files and 43,406 characters of strategic and tactical notes, the things you can’t easily read off the game state, and got much further in the game.

Dreaming
#

Slide: dreaming as an offline pass over transcripts and memory notes producing memory representations and injected context for the next session

Both of those results are about writing memory during the task. Dreaming is the offline half. Martin lays out three layers: transcripts at the bottom (complete but huge, with very little of it salient), memory notes written during sessions, and on top, things that dreaming computes from both. Those include representations such as wikis and injected context that gets loaded into every future session.

Slide: progress toward Cerulean, raw memory falls back repeatedly while memory plus dreaming finds the exit and reaches Cerulean

His first example is error correction. In one Pokémon run Claude stored the wrong location for a landmark. With raw memory, it kept mislocalising itself at that point, falling through a trapdoor and ending up back on the previous level, over and over. With dreaming, the offline pass corrected the note, the agent found the cave exit to the east and reached Cerulean. A poisoned memory otherwise stays poisoned, because nothing in the normal loop goes back and checks it.

Slide: building representations; wiki plus search tool reaches 60-61% of graded criteria as dreaming tokens increase from 2M to 128M, versus 53% for search alone

The second example uses the internal corpus of Stainless, which Anthropic acquired in May: documents and Slack messages, anonymised, with 25 questions that can only be answered from that corpus. Plain semantic search scores 53%. Letting Opus 5 build a wiki improves as dreaming compute goes up (the slide’s x-axis runs from 2M to 128M tokens on a log scale), and wiki plus search together reach about 60%. The example wikis grow from 103 pages and 766 links after 2 sessions to 222 pages and 12,893 links after 128, which the slide labels as the difference between a new employee’s first days and a seasoned employee’s knowledge.

Slide: filling in gaps; before the second pass 38 entries and 225 links, after it 41 entries and 278 links, with placeholder pages filled and an index created

The last example is gap filling. A first-pass wiki had placeholder links to pages that didn’t exist (nine links from six pages to an escrow-agreement page with no page behind it). A second dreaming pass filled them in and added an index, going from 38 entries and 225 links to 41 entries and 278 links.

Key takeaways
#

  1. The same Fermat formalization that needed a domain-specific harness and a researcher in September was done by 1,000 Fable 5.2 agents with only Git, a SQL database and safety monitoring.
  2. Given shared storage, the lead agent designed its own coordination schema (announcements, assignments, notes, subtasks, a landed log) within minutes, and helpers reallocated themselves as statements closed.
  3. Most of the harness effort in a thousand-agent run goes into sandboxing and monitoring, not orchestration.
  4. Memory benefit scales with model strength even with no memory-specific prompting. Weaker models fail by not knowing when to write or read.
  5. Better models write less memory, and more strategic memory. Volume is a bad sign, as Sonnet 3.7’s million-character Pokémon directory shows.
  6. A memory written wrong during a task stays wrong unless something revisits it, and an offline dreaming pass is one way to do that.
  7. Dreaming can also build new structures from transcripts, like wikis, which beat raw search on questions about a company corpus and keep improving with more dreaming compute.

Source
#

  • Talk: “1,000 Claude Agents Formalized Fermat’s Last Theorem” (slides titled “Exploring Claude’s frontier”)
  • Speaker: Lance Martin, Member of Technical Staff, Anthropic
  • Event: AI Engineer Code Summit, uploaded November 25, 2026
  • Duration: 19 minutes
  • Video: https://www.youtube.com/watch?v=wrfbI5eyLAI

Related