Skip to content

Anthropic

Claude spent two weeks trying to break Claude Docs

5 min read

Written by an AI model from the linked sources and checked against them by a second model. How we work

All about: Claude Code versions and changes →
Image: claude.dev

Claude Docs opened to the public on September 16. For the two weeks before that, Anthropic had Claude try to break it. A Claude Code session hit a staging copy of the service with more than a million synthetic docs a day, broke parts of it on purpose, read the telemetry and shipped fixes. An engineer had to approve anything hard to undo. By September 22, people had created over 4.6 million docs. Across 2 billion requests the service returned only 60 server errors, and it never had to be rolled back.

The engineer who ran the loop describes it on Anthropic’s Claude developer blog. Claude Docs is the rich-text editor inside Claude, where people and Claude can work on the same doc at the same time. Three weeks before launch it was still a proof of concept running on a single machine, used by a few thousand Anthropic staff. The team’s own estimate said millions of docs would arrive in the first few days, and that small internal trial couldn’t show whether the service would survive them.

How the loop worked

The setup was one Claude Code session left running from September 4. It picked a scenario, ran the test harness, read the telemetry, proposed a fix, shipped it to staging and started again. That session acted as a coordinator and handed most of the work to sub-agents: usually about 11 at a time in the busiest week, and 30 at the peak. The engineer picked scenarios he considered paranoid, such as 10 million new docs in a single day, 22,000 live connections reconnecting at once, a server killed while it was still loading a doc, and the database stalling. Breaking a system on purpose to find its weak spots before a real outage does is a reliability practice known as chaos engineering.

Claude worked within rules set in advance. If a fix was easy to undo, it deployed the change to staging itself and reran the test. If a fix was hard to undo, such as changing the database layout or how a doc is stored, Claude stopped and asked. It usually came with a recommendation, which the engineer usually approved. Two rules held throughout: docs had to open almost instantly, even ones with a long history, and once the server confirmed an edit, the edit had to still be there.

The 3 GB doc

The fix the author dwells on most is about memory. Early in the run, one large doc was using about 3 GB. Claude first shrank one of the service’s caches, but the next run showed the memory was actually going somewhere else, so it dropped that change. With finer measurements it found the real cause: every keystroke copied the doc into several data structures, adding a few MB each time. Claude made those structures share one copy instead. After about three days the doc topped out around 180 MB, and the estimate for launch fell from more than 500 servers to about 50.

The team says this worked because it had made the service easy for Claude to measure. It wrote the service in Rust, which has no garbage collector, the background process some languages use to clean up memory on their own schedule. That meant every bit of memory sat in structures the team had defined. It also kept outside libraries to a minimum. The author says they didn’t compare Rust against Go, and adds that Rust being hard for people to write matters much less now that Claude writes it.

Launch week felt familiar. Seven of the ten scenarios rehearsed on staging actually happened in production, and the fixes were already in place behind switches. When part of the system came under pressure, the team usually just flipped one.

Why now, and what it cost

A few months ago, the author writes, this probably wouldn’t have worked. Ten or twenty rounds into a long loop, older models started forgetting what they were optimizing for, and he had to restate the goal. Anthropic staff call this goal drift. He used an internal research model roughly comparable to Claude Fable 5.2, and it kept the team’s rules in mind through the whole run without being reminded.

At Claude Fable 5.2’s API list price, the run used roughly $125,000 of inference from the end of August to launch day. The author guesses that work on this scale would once have taken a team of engineers about six months. He also thinks the team could have spent about half as much, since a lot of tokens went into working out the process. For a small service, such as a couple of servers and a Postgres database, he puts a similar two-week push at $3,000 to $10,000. He hasn’t actually run that, so it’s only a rough estimate.

His advice for trying it: give Claude access to your monitoring data, have it write a script that throws ten times your real traffic at a staging copy, write down the rules that must never break, and make Claude stop and offer options before anything hard to undo.

No comments yet. Be the first.

Join the conversation

Sign in to leave a comment. It appears after moderation.