Skip to Content

Agent code at scale: trust comes from the tests

The creator of Bun had AI agents write millions of lines of code. His lesson: decide how you check first, then build.
November 25, 2026

The creator of Bun had AI agents write millions of lines of code. His lesson for anyone who lets AI do big work: first decide how you will check that it is right. Only then decide what gets built.

What happened

Jarred Sumner created Bun, the software that Claude Code, among others, runs on. He now works at Anthropic. In a video on the AI Engineer channel he talks about a project in which AI agents did most of the work: a change of several million lines of code meant to make Bun faster. At the busiest moment some 140 agents worked on it at once. In about a month the work was rewritten from scratch five times.

According to Sumner, Claude Code now uses about four times less memory and starts twice as fast. Those are his own figures from the presentation, not yet measured by others.

The real lesson

The interesting part is not how fast the code appeared. According to Sumner, checking is now the hard part, not writing. Having code written is quick. Proving that it works still takes time and craft.

That is why he relied on tests that existed before the project started. The agent could not change them to approve its own work. An agent tends to present its result as better than it is. If it can also move the yardstick, a green tick means nothing.

What this means for your organisation

You are not building a compiler, but you may well have AI build an integration, a report, a migration or a change in your ERP. The same lesson applies:

  • Agree up front when it is good. Write down the result you expect and which behaviour must not change, before anything is built.
  • Keep the check out of the AI's reach. Whoever does the work should not also decide how it is tested.
  • Compare with what already exists. The same input in the old and the new system should give the same answer.
  • Measure again after every round and do not rely on the agent's own report.

Our view: this is exactly why we set the acceptance criteria first for any custom work and only build after that. With AI this matters more, not less.

This news touches chapter 14 and 22 and 23 of the course AI(l) or nothing by Newway. If you follow the course, this subject returns there at a calmer pace.

What you can do with this

Want to know what this means for your business? Plan an introduction: half an hour, no sales pitch, but an honest answer to the question where to begin. Rather read on first? The course AI(l) or nothing is free and starts with the basics.

Written in response to a publication by AI Engineer (YouTube): https://www.youtube.com/watch?v=TvsF67C2F54