1,000 Claude Agents, Git and a Database: How Fable 5.2 Formalized Fermat Without a Custom Harness

AI Engineer 2026: Anthropic Talks
21 parts- 1Claude for Long-Horizon Tasks: Lance Martin's Four Rules for Agents That Run for Hours
- 2Inside the Claude Managed Agents Workshop: Pets, Cattle, Outcomes and Dreaming
- 3How Anthropic Builds: Mike Krieger on Being Unreasonable With Claude
- 4How Jarred Sumner Ships Millions of Lines of Agent-Written Code
- 5A Field Guide to Fable: Thariq Shihipar on Unhobbling Claude and Finding Your Unknowns
- 6Claude Tag Lands 65% of Anthropic's Product PRs: Takeaways From Cat Wu and Thariq Shihipar
- 71,000 Claude Agents, Git and a Database: How Fable 5.2 Formalized Fermat Without a Custom HarnessCurrent
- 8Your Old Prompts Are Making Claude Worse: Lance Martin's Checklist for Frontier Models
- 9Why One Agent Isn't Enough: Anthropic on Flows, UltraCode and Running 1,000 Agents
- 10Tokens Should Have Jobs: Anthropic's Case for Advisors, Graders and Dreamers
- 11Give the Agent a Budget, Not a Token: Anthropic's CI Team on Safe Agent Permissions
- 12Rethinking Claude Code Best Practices: Lydia Hallie on Getting Out of the Loop Safely
- 13How Anthropic Merges 30,000 Code Changes a Day: Addy Osmani on Verifying the Software Factory
- 14Using LLMs to Secure Source Code: Eugene Yan's Six-Step Pipeline From Anthropic
- 15From Messages API to Managed Agents: Anthropic's Applied AI Team on Harnesses That Go Stale
- 16Forward Deployed Engineering 101: When Your AI Startup Needs FDEs, From Palantir to Anthropic
- 17The Enterprise Tech Stack for AI Agents: Why Your POC Stalls and How to Design Past It
- 18The Claude Certified Architect Exam as a Field Guide to Agentic Engineering
- 19The Future of MCP: David Soria Parra on Connectivity, Progressive Discovery and Skills Over MCP
- 20Gateways Are All You Need: How Anthropic Thinks About MCP in the Enterprise
- 21How to Build Agents That Run for Hours: Anthropic's Planner, Generator and Evaluator Harness
TL;DR
Lance Martin on a 1,000-agent Claude team that formalized Fermat's Last Theorem in Lean with only Git and SQL, plus what Anthropic learned about memory and dreaming.
Lance Martin of Anthropic used this short AI Engineer keynote to tell two stories about Claude's frontier capabilities. The first is a multi-agent result published with the Fable 5.2 launch: a team of 1,000 Claude agents formalizing Fermat's Last Theorem in Lean with almost no scaffolding. The second is about memory, and why agents, like people, need to "dream."
Source: 1,000 Claude Agents Formalized Fermat's Last Theorem, Lance Martin, AI Engineer. All results below are as reported by Anthropic.
Story 1: From a Dozen Agents to a Thousand#
Fermat's Last Theorem says that a^n + b^n = c^n has no solutions in positive integers for n greater than 2. It stood unproven for about 350 years until Andrew Wiles published a proof in the mid-1990s after seven years of work. Since then, a major effort in mathematics has been formalizing that proof: expressing every step in a system like Lean so a computer can check it.
In September 2026 Anthropic reported that Claude had done it (our write-up: Anthropic's Fermat proof is an autoformalization milestone). That first effort used about a dozen agents, a domain-specific platform for orchestrating proofs, and a lot of help from a researcher. Early on, Martin says, the small team did not work well until it had that orchestration platform to manage project state.
For Fable 5.2, the question changed: can a much larger team do the same formalization with no domain-specific harness and no human steering on the solution?
The harness: deliberately boring#
The setup is the most instructive part:
- 1,000 agents, each in its own sandbox with restricted network access.
- Each agent can reach exactly two things: Git and a SQL database.
- Real-time monitoring of every tool call for things like sandbox escapes, plus an offline review of all agents' runs every 10 minutes.
- The prompt names one lead agent and 999 helpers, tells them Git and the database exist, and states the problem. That is all.
Most of the engineering effort went into safety and monitoring, not into telling agents how to collaborate.
%% title: The 1,000-agent Fermat setup
flowchart TD
L[Lead agent]:::emphasis --> DB[(SQL database)]
W[999 helper agents] --> DB
L --> G[Git repo of Lean code]
W --> G
M[Real-time and 10-minute monitors] -.-> WThe agents built their own coordination layer#
About five minutes in, the lead created database tables nobody asked for:
- an announce table for global updates,
- a roles/assignments table to hand statements to workers,
- a notes table where agents shared progress,
- a subtasks table,
- a landed table tracking which Lean code had actually merged.
A visualization of reads and writes over the run shows the pattern: the lead occasionally posts global announcements and assignments, workers read and write notes constantly, and landed proofs accumulate. The run lasted about 30 hours. For the hardest statements, agents built their own task trees with dependencies, and the lead and workers reallocated themselves across the proof's roughly 60 statements as pieces were solved. One note left near the end, roughly: total freeze, magnificent work, all 999 of you.
Martin's conclusion is the line to remember: agents are now good enough to build the primitives they need to coordinate on very long, hard problems, given only general tools. For more on running fleets in practice, see Anthropic's CJ Avilla and Harrison Stall on why one agent is not enough.
What we would take from it#
The temptation when building multi-agent systems is to design the coordination protocol up front: roles, queues, message types. This result suggests that, for frontier models, a shared durable store and version control may be enough, and the protocol can be emergent. The caveat is that Fermat has a perfect oracle: Lean either accepts the proof or it does not. Tasks without a hard verifier will not self-organize this cleanly.
Story 2: Memory Is Lived Forwards, Understood Backwards#
The second half is about memory, drawn from a blog post Martin published. They open with Kierkegaard: life can only be understood backwards, but must be lived forwards.
That is the core paradox of agent memory. Agents write memories during a task, greedily, when something looks important right now. But memory needs to be a globally coherent, non-redundant map that future sessions can rely on. Writing myopically produces a messy map.
Better models know what is salient#
On the open Continued Learning Bench (CLB), Claude answers 40 sequential questions about a database, each in a fresh session, with a memory directory it can write to between sessions. The prompt just says the directory exists and it may use it. No memory-specific prompting.
- Sonnet 4.6 barely benefits. It does not reliably know when to write to memory or think to read from it.
- Sonnet 5 does better, and larger models better still, with the same instruction.
Stronger models write memories that are closer to verified statements and predictions about the database, rather than loose notes.
The Pokemon comparison makes it visual. Claude 3.7 Sonnet's memory directory was huge and indiscriminate. Fable 5's was compact: strategic insights and tactical knowledge you cannot get from game state. Fable 5 also got much further in the game. Better instincts for salience show up as smaller memory.
Dreaming: transcripts, notes, then reflection#
Martin frames memory as layers:
- Transcripts are the foundation. Transcript search alone is a memory system, but transcripts are huge and only a small fraction is salient.
- Notes the agent writes as it goes.
- Dreaming reflects over transcripts and notes to re-represent them: build wikis, fix errors, and promote some memories to context injected into every future session.
Three results from dreaming:
- Fixing a poisoned memory. In Pokemon, Claude wrote down the wrong location of a landmark, then kept mislocating itself, falling through a trapdoor and regressing. Without dreaming it stayed stuck; with dreaming the bad memory was corrected and it moved on.
- Building a wiki from a company corpus. Using an anonymized corpus from Stainless, which Anthropic acquired in May 2026, they wrote 25 questions answerable only from its documents and Slack. Plain semantic search scored about 53%. Letting Claude build a wiki improved as more dreaming tokens were spent, and wiki plus search beat search alone.
- Filling gaps. A wiki Claude built without dreaming had placeholder pages that did not exist; a dreaming pass filled them in and added an index.
The general idea: give agents raw transcripts and let offline compute turn them into better representations. You can read more about the product version in our post on Managed Agents dreaming and outcomes, and the same theme appears in Martin's long-horizon tasks talk.
Our Take#
Both stories argue the same thing: stop over-specifying. Do not design the coordination protocol for a frontier multi-agent team; give it Git, a database and good monitoring. Do not design the memory schema; give it a directory, let it write, then spend offline compute to clean up.
What you should still specify, carefully, is the outside of the box: sandboxing, network limits, monitoring, and a verifier that cannot be argued with. In the Fermat run that verifier was Lean. In your system it might be a test suite or an eval. Without it, emergent coordination is just emergent confusion.
FAQ#
How did 1,000 Claude agents coordinate on Fermat's Last Theorem?#
Each agent had only Git and a SQL database. The lead agent created its own tables for announcements, assignments, notes, subtasks and landed work, and the team coordinated through them over about 30 hours.
What is dreaming for AI agents?#
An offline process where the agent reflects over past transcripts and memory notes to correct mistakes, fill gaps, build representations like wikis, and promote key memories into future context.
Do weaker models benefit from memory?#
In Anthropic's Continued Learning Bench results, Sonnet 4.6 gained little from a memory directory because it did not reliably decide when to write or read. Newer, stronger models gained much more with the same instruction.
Sources#
- 1,000 Claude Agents Formalized Fermat's Last Theorem - video
- Lean theorem prover
- New in Claude Managed Agents: dreaming and outcomes
The Full Series#
This post is part of our coverage of Anthropic's talks at AI Engineer 2026:
- Claude for Long-Horizon Tasks: Lance Martin's Four Rules for Agents That Run for Hours
- Inside the Claude Managed Agents Workshop: Pets, Cattle, Outcomes and Dreaming
- How Anthropic Builds: Mike Krieger on Being Unreasonable With Claude
- How Jarred Sumner Ships Millions of Lines of Agent-Written Code
- A Field Guide to Fable: Thariq Shihipar on Unhobbling Claude and Finding Your Unknowns
- Claude Tag Lands 65% of Anthropic's Product PRs: Takeaways From Cat Wu and Thariq Shihipar
- Your Old Prompts Are Making Claude Worse: Lance Martin's Checklist for Frontier Models
- Why One Agent Isn't Enough: Anthropic on Flows, UltraCode and Running 1,000 Agents
- Tokens Should Have Jobs: Anthropic's Case for Advisors, Graders and Dreamers
- Give the Agent a Budget, Not a Token: Anthropic's CI Team on Safe Agent Permissions
- Rethinking Claude Code Best Practices: Lydia Hallie on Getting Out of the Loop Safely
- How Anthropic Merges 30,000 Code Changes a Day: Addy Osmani on Verifying the Software Factory
- Using LLMs to Secure Source Code: Eugene Yan's Six-Step Pipeline From Anthropic
- From Messages API to Managed Agents: Anthropic's Applied AI Team on Harnesses That Go Stale
- Forward Deployed Engineering 101: When Your AI Startup Needs FDEs, From Palantir to Anthropic
- The Enterprise Tech Stack for AI Agents: Why Your POC Stalls and How to Design Past It
- The Claude Certified Architect Exam as a Field Guide to Agentic Engineering
- The Future of MCP: David Soria Parra on Connectivity, Progressive Discovery and Skills Over MCP
- Gateways Are All You Need: How Anthropic Thinks About MCP in the Enterprise
- How to Build Agents That Run for Hours: Anthropic's Planner, Generator and Evaluator Harness
Continue Reading#
Get the next deep dive like this in your inbox
One email a week on Anthropic and the rest of the AI dev stack. Free.
Read next on Claude Code
Anthropic's Fermat Proof Is an Autoformalization Milestone
Anthropic's Lean formalization of Fermat's Last Theorem, read for developers: what Claude verified in 11 days and the repo patterns worth copying.
7 min readClaude for Long-Horizon Tasks: Lance Martin's Four Rules for Agents That Run for Hours
Lance Martin of Anthropic on building long-horizon agents: decouple the brain from the hands, verify in a separate context, dream to fix memory, and go org-level.
9 min readWhy One Agent Isn't Enough: Anthropic on Flows, UltraCode and Running 1,000 Agents
CJ Avilla and Harrison Stall of Anthropic on multi-agent topologies: lessons from Unix, OS/360 and Linux, Dynamic Workflows in Managed Agents, and when to use Flows vs UltraCode.
9 min readTechnical content at the intersection of AI and development. Building with AI agents, Claude Code, and modern dev tools - then showing you exactly how it works.







