How to Ship Millions of Lines of Agent-Written Code — Jarred Sumner, Anthropic
Description
Jarred Sumner, creator of Bun, recently merged a PR of several million lines that adds an ahead-of-time compiler to Bun, the runtime behind Claude Code. It went through five rewrites in about a month, and the result uses about 4x less memory and starts about 2x faster. He explains why the team made JavaScript faster instead of rewriting Claude Code in Rust, why tests that predate the project are what make agent-written code trustworthy, and what he actually does all day while 140 agents write code. Speaker info: - https://x.com/jarredsumner - https://bun.sh Timestamps: 0:00 - A multi-million-line PR for Bun 1:42 - Five rewrites in a month 2:27 - Testing decides the approach 3:57 - Why not rewrite Claude Code in Rust 4:42 - 4x less memory, 2x faster startup 6:12 - Types as predictions 6:57 - Tests that predate the project 8:27 - Three versions that must agree 9:12 - Write in batches, then fix 10:46 - When the code was slop 12:21 - 140 agents at once 13:06 - Build times and the fifth rewrite 15:21 - Long-lived subagents 16:51 - Hourly scorecards and fuzzing 19:06 - What you actually do all day 20:36 - Lessons for large agent projects
Summary
Generated by gpt-6.1-terraAt-a-Glance
- Verdict: Watch fully
- Core thesis: Sumner argues that shipping agent-written code at massive scale depends less on generation capacity than on independent verification, continuous measurement, and a human willing to reject or rewrite plausible-looking results.
- Why it matters: The project provides a concrete operating model for coordinating large agent batches and long-lived subagents while preserving an independent basis for trust.
- Best use: Use it as a case study for designing agentic engineering projects around preexisting test oracles, differential testing, scorecards, and explicit human quality gates.
Executive Summary
Bun creator Jarred Sumner describes using Claude agents to build an ahead-of-time JavaScript compiler over a little more than a month. The project went through five versions, and the resulting pull request contained several million lines, much of it tests and rewrite-related code. He reports roughly fourfold lower memory usage and twice-as-fast startup for Claude Code, but these are speaker-reported results rather than independently verified benchmarks.
The decisive project-selection criterion was testability. Instead of rewriting Claude Code in Rust and having to port its TypeScript tests, the team improved the JavaScript runtime, retaining existing Bun, WebKit, Test262, and application tests. It also compared JIT, AOT, and type-stripped execution and used generated fuzz cases to find behavioral differences.
His operating pattern separates a large parallel code-generation burst from a longer validation and repair phase handled by context-rich subagents. A human reviews architectural quality, challenges agent estimates, and tracks an hourly scorecard. Several versions were discarded despite promising runtime results because their code or compile times were unacceptable; the fifth reportedly built the application in under 20 seconds.
Key Takeaways
- Claim: Choose agent projects for the strength and independence of their verification, not merely for how much code agents can produce. | Evidence: The Bun Rust rewrite could reuse TypeScript tests across Zig and Rust; rewriting Claude Code in Rust would require porting its TypeScript tests, making those tests a less independent check. The compiler instead reused Bun, WebKit, Test262, and Claude Code test suites. | Implication: Before scaling agent implementation, identify test assets that remain unchanged and credible across the proposed transformation. | Caveat: Existing tests are not automatically sufficient: Sumner stresses checking that they actually catch defects.
- Claim: Differential execution and fuzzing make this compiler unusually amenable to agent-driven verification. | Evidence: The team compared application behavior under JIT, AOT, and execution without types, while Claude generated code patterns for fuzzing; the existing Fuzzilli JavaScript-engine fuzzer was extended to cover TypeScript types. | Implication: Where possible, build multiple independent execution paths and use generated inputs to turn subjective code review into repeatable behavioral comparison. | Caveat: Agreement establishes consistency only for the applications and cases exercised, not universal correctness.
- Claim: Separate high-parallelism code production from sustained build, repair, and verification work. | Evidence: One compiler iteration used 140 agents concurrently to write code. Sumner recommends avoiding repeated builds during the initial batch, then using individual long-lived subagents that retain relevant code context to fix and validate the result. | Implication: Treat generation throughput and convergence as distinct operating phases, with different concurrency and resource policies. | Caveat: The transcript does not establish that 140 agents is optimal or describe a general-purpose coordination protocol.
- Claim: Good runtime benchmarks do not compensate for poor implementation quality or an unacceptable developer experience. | Evidence: One version incorrectly treated any property named archive as possible use of Bun.archive; a later, cleaner version took about 50 seconds to compile Claude Code. The fifth rewrite reportedly brought build time below 20 seconds. | Implication: Set release gates for code quality and build latency alongside application runtime metrics; retain the option to discard a promising implementation. | Caveat: The project was not yet broadly shipped at the time of the talk, and the claimed improvements are Sumner's own measurements.
- Claim: Agent-generated measurements and prioritization require active human challenge and continuous comparison. | Evidence: Sumner says Claude can incorrectly size up an optimization and talk itself out of trying it. He used hourly Slack scorecards showing previous and current values and repeatedly asked why work was slow or whether a more ambitious approach was possible. | Implication: Give operators both trend visibility and authority to retest rejected ideas, rather than treating an agent's feasibility assessment as final. | Caveat: Encouraging agents to try harder is not a substitute for independently validating their measurements or the resulting changes.
- Claim: The reported AOT gains are substantial but workload-dependent and come with compatibility changes. | Evidence: Sumner reports approximately 4x less memory and 2x faster startup for Claude Code; he also says a single-threaded Bun-compiled TypeScript workload beat the single-threaded Go port, and that Bun won most JetStream 3 comparisons shown. | Implication: Benchmark representative applications and audit dynamic-code and prototype-mutation dependencies before treating AOT as a drop-in optimization. | Caveat: These are speaker-reported results without detailed benchmark methodology in the transcript. UglifyJS and workloads relying heavily on eval or new Function can be slower, and AOT bans assignment to object.prototype as a security-related breaking change.
Detailed Brief
Compiler design and project economics
- Claims: AOT moves compilation ahead of execution rather than paying JIT compilation costs on demand; Sumner estimates that roughly half of CPU time in a typical JavaScript application can be spent compiling on demand.; The compiler treats TypeScript types as predictions, not guarantees; it can use direct field access when it proves a value's type is monomorphic, but otherwise must check dynamically.
- Evidence: The first compiler version produced a roughly one-gigabyte Claude Code artifact while relying heavily on existing JavaScriptCore code.; The team used Claude Code to build the compiler and then used a Claude Code build produced by that compiler, providing an internal dogfooding loop.
- Caveats: The proposed AOT threading support had not yet been added, so the cited TypeScript comparison was explicitly single-threaded.
- Implications: The compiler can reduce pressure to rewrite an application in another language, but its economics depend on runtime savings exceeding added build and compatibility costs.
Additional agent-management failure modes
- Claims: Large planning exercises can produce excessive documentation without corresponding operational value.; For an unshipped project, Sumner found a rewrite easier than refactoring a large flawed implementation.
- Evidence: He cites approximately 1,500 generated Markdown files as an unreasonable planning artifact and questioned why one implementation had grown to about 900,000 lines.
- Caveats: The preference for rewriting is presented as experience with this unshipped compiler, not a general rule for production systems.
- Implications: Generated artifact volume can obscure rather than demonstrate progress, particularly when the implementation is still being redesigned.
Notable Concepts & Terms
- Ahead-of-time compilation (AOT): Compiles code before execution, trading build time for lower runtime compilation overhead.
- Differential testing: Compares behavior across JIT, AOT, and type-stripped execution to reveal inconsistencies.
- Fuzzilli: A JavaScript-engine fuzzer the team extended to exercise TypeScript-type patterns.
- Test262: An existing JavaScript conformance test suite used as part of the compiler's independent verification base.
- Long-lived subagents: Agents retained across ongoing repair work so they can keep relevant code context instead of repeatedly reconstructing it.
- Prototype pollution: A JavaScript security issue involving mutation of shared object prototypes; the AOT compiler's restriction is both a protection and a compatibility change.
Operator Notes / Why Ken Should Care
- For the next agent-built system, inventory independent test oracles before approving a high-concurrency implementation plan.
- Add a test-sensitivity check: deliberately introduce representative defects and confirm the verification suite detects them.
- Define separate budgets for generation concurrency, build frequency, and long-running repair agents; measure total time to a passing release candidate rather than lines produced.
- Set explicit thresholds for build latency, runtime performance, compatibility, and code review quality before agents begin optimization.
- Trial Bun's canary AOT path only on a representative, noncritical workload, and record regressions involving dynamic evaluation or prototype mutation.
Source/Metadata
- Title: How to Ship Millions of Lines of Agent-Written Code — Jarred Sumner, Anthropic
- Transcript words: 4845
- Duration seconds: 1349
- Timestamp note: No timestamps or chapters were provided; the supplied transcript repeats much of the talk.
Transcript
Hello everyone. My name is Jared. I'm the creator of Bun and I work at Anthropic. Bun is the JavaScript runtime that powers cloud code. And recently I merged a several million line of code PR to add an ahead of time compiler to Bun, which is basically the idea is instead of paying the cost of a JIT at runtime, you can compile all the code ahead of time. And it's a really big project. Over the summer, I rewrote Bun in Rust. And this is a project on a larger scale. This ahead of time compiler is a larger project than that. And I think one of the challenges right now with large projects is how do you actually confidently ship millions of lines of code written by agents? So that's what I'm going to talk about. This was the opening prompt after some discussion with it. It was basically, we need to make cloud code use a lot less memory and faster. And we can modify either WebKit or Bun. Bun uses JavaScript Core, which is WebKit, and it's a little bit under the hood. And it's been a little bit over a month. This compiler has gone through five rewrites. You can see the first couple ones were pretty short. And then I almost shipped the blue one. And then I was thinking, this is building way too long. It's taking too long to compile the code. So we wrote it again. And this next one is shipping next week. This is how I think about a project like this. You're really constrained by how you test that the code works. So that's even more important than what you specifically approach you go with for how to build it is entirely driven by how do you verify that it actually will work and not be buggy and that you can trust it. And so a little more background on why this particular project, why the ahead of time compiler. It's because for a typical JavaScript based application, roughly half of the CPU time is just spent compiling code on demand. And a lot of the general thing you've seen in a lot of applications where people are rewriting their code bases in a language like Rust or sometimes Go. It's when coming from JavaScript, it's because there it's really the combination of the JIT and that it's a single threaded application. So that's the difference between a JIT and AOT is that you compile before, whereas with a JIT, you compile as you go along. This is particularly important for something like cloud code where when using the cloud code iOS app, the CPU time is a lot if you have to have every session of cloud code also compiling. So we talked a lot about should we rewrite cloud code in Rust? Because the Bun team, us rewrote Bun in Rust. So we're pretty good at rewrites. And we decided not to. And the reason why is because for Bun's case, it's actually pretty easy to do. Bun is an easy product to do a Rust rewrite because the tests were written in a language that's independent of the one it runs in. So because all the tests were written in TypeScript, we could run the tests on both the Zig version and the Rust version. Whereas for cloud code, cloud code tests are written in TypeScript. So we would have to port cloud code test suite. And as soon as you're rewriting the tests, then you can't really trust the tests anymore. So that seemed too risky. So instead, what if we just make JavaScript faster? So we don't have to rewrite it in Rust. This was another prompt a little bit later. And the result is that it actually reduced JavaScript's memory. It uses about 4x less memory. It starts about 2x faster. And we're dogfooding this internally. And it'll be external soon. Some more benchmarks. And then I'll go into more detail about how we actually did this. It's possible that an interesting thing is TypeScript 7 rewrote their code by hand from JavaScript slash TypeScript to Go. And the single threaded version when compiled via Bun compile is now faster than the single threaded TypeScript Go port. And we will add threads also to the ahead of time compiled version of Bun. But we haven't done that yet. So there is a PR. And a little bit about the actual ahead of time compiler. TypeScript is not the type of types are don't necessarily need to be correct. So it treats types as predictions instead of trusting them. And this kind of problem works really well for models because they're really good at writing compilers. This is more about how should we think about this decision. And a big thing here is there's just so many tests you can run when it's ahead of time. For something like this because we don't need to write any tests pretty much ourselves. We actually do write a lot of tests, but we can largely trust that the tests that predate the project work. And this was the same thing with the Bun Rust rewrite where we had Bun's existing tests we could run. And now with a compiler we have Bun's existing test suite plus WebKit's tests plus Test 262 plus cloud code's tests. And then we also made it so Bun itself, Bun's own test runner could be run in the AOT mode. And we have one breaking change with or really it's two breaking changes with the ahead of time compiler and that's pretty much why these particular tests are failing. But the two breaking changes are actually mostly security things to prevent prototype pollution attacks, but they also end up benefiting performance. So what makes this particular kind of problem pretty good for agents is you run it with. You can run all three versions of an application: one with a JIT, one with ahead of time compiled, and one also without the types. And as long as the three of them behave the same, then you know that it works at least for that specific application. But then you can take that kind of problem and fuzz it a lot and just have Claude churn out code generators to fuzz different patterns. And you can catch a lot of bugs that way. This is a very large project. This is the biggest I think I've worked on in terms of code volume. Most of this is tests. And also because we rewrote it five times. When you're doing this kind of project, how I think about it is you have batches of, OK, we need to write a lot of code at once. And then after that initial batch, then it's OK, let's fix everything, make sure it compiles, make sure it passes a bunch of tests and make sure it really truly works. And the actual logistics of that are when you're in the big batch kind of project stage, then you don't want to run builds. You want to run one build, because otherwise you're going to spend all your time compiling and waiting for build errors, and it's not going to be a good use of anyone's time. And then separately, for longer running, once you've written all the code, you want to have lots of individual agents. This is a little bit of the timeline of this project. The first one was not very good. Cloud code was a gigabyte, which is terrible. And this used as much as possible from JavaScript Core's existing code. So it was basically the ceiling was what is only as good as what it could be from that. So then a little bit after this, we added a TypeScript type checker into Bun itself. These were prompts. And so we added Bun check, and then we're like, hey Claude, please use Bun check. And then after that, startup time got two times faster in Cloud code, and started using about 3x less memory. But the code was sloppy. And this is not good. It should never. Basically, this meant that any object that accessed a property called archive, it would then assume that the Bun.archive API was potentially used. And I looked at this, and I was like, we cannot ship this. This is not good. So then. This is another thing too. When you're doing a large planning, when you're starting to have it do a bunch of design docs and stuff, it just loves writing markdown docs, and it doesn't make sense. Because who's going to. 1500 markdown files is just not reasonable. So for this, it was. This was the third compiler version? Maybe it was the fourth. No, this was the third. It. To get it all out. 140 agents at the same time. Write all the code all at the same time. Then get Cloud Code to run. And then. This is the fourth one. And this one, the code was not sloppy. Pretty good. With basically the same performance as before. However, the compilation time was way too slow. Because people coming from a JavaScript background don't expect any compilation time. So 50 seconds for. Cloud Code is a pretty large code base, but this meant that other projects would take single digit seconds. And people don't want to wait that long. So we're going to rewrite it again. And. Because in older versions of this compiler, it was taking 10 to 20 seconds. And then Cloud does this thing where it'll try to size up everything to judge whether or not it's worth working on, but it's really easy to convince yourself that your measurements are good when they're not good. And part of it was also, why is this 900,000 lines of code? This should be a lot smaller. So then we did it one more time. And the code was good. And the build time was under 20 seconds. It's possible that we end up with a sixth time sometime later, but the fifth one is very shippable. And I've worked on this for enough time that it's time to ship it. A lot of this was just, hey Claude, try this idea. And then see what happens. And then it would size up the idea. And I think this is still not quite right. I think a lot of this are things that we should try again and not let it. What I said earlier about sizing up the impact of a change is it's really easy to under, or to size it up incorrectly and then talk yourself out of it. So I think this probably needs to be revisited more. My old approach, particularly with the Bun Rust rewrite, was very much leaning on cloud code workflows to do things. And pretty much now, with the most recent models, I mostly just rely on sub-agents that are very long-lived. Except for that initial part where you're writing all the code all at once. And this, with the sub-agents, it works pretty well because they keep all the context of the relevant code in their head or in the context window. And that's less wasteful. And they can just keep going. Here's a little more about how the different parts of the compiler works. Generally, there's, if we can confidently prove that the value is, the types are the same, that they're monomorphic, then it can become a field access. Otherwise, it has to check every single time. And it has some inline caching, but not a lot. With a project of this size, you really do need to. It's hard to follow sometimes what everything's happening. So I lean a lot on just having an hourly update. And where it would post a scorecard comparing a bunch of metrics that we were prioritizing. Usually though, when it was posting in Slack, it would show like a previous and this version. That way, it was easy to see if numbers went up or down. But it's not helpful in a slide because the previous one is just the JIT. The important thing is none of these tests for the most part are things that are made up. They're things that predated the project. So that way we know that the agent couldn't have messed with it. Fuzili is a JavaScript engine fuzzer that V8 uses. And we were already using that in Bun, but we also extended it to have to test for TypeScript types as well. And it's also important to check that the tests actually catch things because it's really easy to fool yourself that it's finding bugs when it's not finding bugs. Some more numbers on the ahead of time compiler. It generally, for most projects, outperforms the JIT. Not always. You can see in the UglifyJS case, and that's basically if it has to use the interpreter a lot. So if there's a lot of eval or new function, then it's not faster. But most applications don't do that. And it's a make it, it's as close as possible as you can get to a one-liner to make an application run faster. This is not 100% true because as you can see, UglifyJS and there are other cases as well. But it is often true. So the other thing is object prototype. This is a rare edge case, but basically there's a lot of security vulnerabilities in JavaScript applications called prototype pollution. And this usually works by assigning properties onto object.prototype. And the compiler bans that. So for a large project like this, what do you actually do all day? These are the top messages that I sent saying continue a lot. Also my laptop kept dying. But more concretely, what you actually do is a bunch of leading questions like why are we doing this? Can we do this? Also, I end up saying can you do this faster or what's taking so long? Because it tends to talk itself into making up rules. And also, it tends to not be. It tends to underestimate what it can do. So I often end up saying things like this to Claude to get it to try harder. And the result is that Jetstream 3, which is one of the main benchmarks that JavaScript engines use, Bun outperforms both JavaScript Core's JIT and Node.js in V8 JIT in most of them. And the whole time it's been using Claude code to build the Bun compile, to build Bun compile itself, and then using the build of Claude Code that was compiled with Bun compile. So how I think about this is the testability thing is super important when you're working on a large project with Claude and to make sure that the tests actually test things. And if you're not actively remeasuring, then it's going to get worse because if there's so much stuff going on, it's really easy to lose track. And it's easier for large projects like this that haven't shipped yet to rewrite than it is to refactor. And if you don't act ambitiously, then the models will start having 0.1 percent improvements instead of 10 percent improvements. So you have to constantly nudge it to, hey, you can do really cool things if you try harder. You can try this now if you want by running Bun upgrade dash dash canary if you have Bun installed. And then just Bun compile. Thanks everyone. the tests, then you can't really trust the tests anymore. So that seemed like it'd be too risky. So instead, what if we just make JavaScript faster? So we don't have to rewrite it in Rust. This was another prompt a little bit later. And the result is that it actually did have JavaScript's memory, like the memory usage. It uses about 4x less memory. It starts about 2x faster. And we're dogfooding this internally. And it'll be external soon. Some more benchmarks. And then I'll also go into more detail about how we actually did this. So like it's possible that if an interesting thing is like TypeScript 7 rewrote their code by hand from JavaScript slash TypeScript to Go. And the single threaded version with, when compiled via a bund compile is now faster than the single threaded TypeScript Go port. And we will add threads also to the ahead of time compiled version of bund. But we haven't done that yet. So there is a PR. And so a little bit about like the actual ahead of time compiler. TypeScript is not the type of types are don't necessarily need to be correct. So it treats types as predictions instead of like trusting them. And this kind of problem works really well for models because they're just really good at writing compilers. So this is sort of like more about like how like should we like how we were thinking about this decision. And a big thing here is like there's just so many tests you can run when you're when it's like in ahead of time like for something like this because we don't need to write any tests pretty much ourselves like we actually do write a lot of tests, but we can largely trust that the tests that predate the project work. And this was the same thing with the the bund Rust rewrite where we had bund's existing tests we could run. And now with a compiler we have bund's existing test suite plus web kids tests plus test 262 plus cloud codes test. And then we also made it so that way bund itself the bund's own test runner could be run in the aot mode. And like the we have one breaking change with or really it's two breaking changes with the ahead of time compiler and that's pretty much why these particular tests are failing. But the in the two breaking changes are actually like mostly security things to prevent prototype pollution attacks, but they also end up benefiting for performance. So like what makes this particular kind of problem pretty good for agents is like you run it with you can run all three versions of an application one with a jit one with ahead of time compiled and one also without the types and as long as the three of them behave the same then you know that it works at least for that specific application. But then you can take that kind of problem and fuzz it a lot and just have clogged like churn out code generators to like fuzz different patterns. And you can catch a lot of bugs that way. This is a very large project this is the biggest I think I've worked on in terms of like code volume. Yeah, most of this is tests. And also that because we reroute it five times when you're like doing this kind of project, what how I think about it is like you have like batches of like, OK, we need to write a lot of code at once. And then after that initial batch, then it's OK, let's have let's like fix everything, make sure it compiles, make sure it passes a bunch of tests and make sure it really, truly works. And the actual logistics of that are like, when you're in the big batch kind of project stage, then you don't want to run builds. You want to run one build, because otherwise you're going to spend all your time compiling and waiting for build errors, and it's going to not be a good use of anyone's time. And then separately, for longer running, once you've written all the code, you want to have lots of individual agents. This is a little bit of the timeline of this project. The first one was not very good. Cloud code was a gigabyte, which is terrible. And this used as much as possible from JavaScript Core's existing code. So it was like, basically the ceiling was what is like, only as good as what it could be from that. So then a little bit after this, we added a TypeScript type checker into Bun itself. These were prompts. And so we added Bun check, and then we're like, hey, Claude, please use Bun check. And then after that, startup time got two times faster in Cloud code, and started using about 3x less memory. But the code was slop. And this is not good. It should never... Basically, this meant that any object that accessed a property called archive, it would then assume that the Bun.archive API was potentially used. And I looked at this, and I was like, we cannot ship this. This is not good. So then... This is like, yeah. And this is another thing, too, is like, it just like... Like, when you're doing like a large planning, like when you're starting to like, have it do a bunch of design docs and stuff, it just loves writing markdown docs, and it doesn't make sense. Because who's gonna... Like, 1500 markdown files is just not reasonable. So for this, it was like... This was like, I think, the third compiler version? Maybe it was the fourth. No, this was the third. It... To like... Just to kind of... Get it all out. 140 agents at the same time. Write all the code all at the same time. Then get Cloud Code to run. And then... This is the fourth one. And this one, the code was not SOP. Pretty good. With like, basically the same performance as before. However, the compilation time was way too slow. Because people coming from like, a JavaScript background don't expect any compilation time. So, 50 seconds for... Like, Cloud Code is like, a pretty large code base, but this meant that like, other projects would take like, single digit seconds. And people don't want to wait that long. So, we're going to rewrite it again. And... Because in older versions of this compiler, it was taking like, 10 to 20 seconds. And then Cloud does this thing where like, it'll try to like, size up everything to judge whether or not it's worth working on. but it's really easy to convince yourself that like, your measurements are good when they're not good. And like, part of it was also like, why is this 900,000 lines of code? This should be a lot like, smaller. So, then we did it one more time. And the code was good. And the build time was under 20 seconds. It's possible that we end up with a sixth time sometime later, but the fifth one is like, very shippable. And I've worked on this for enough time that it's like, time to ship it. A lot of this was like, just like, hey Claude, try this idea. And then see what happens. And then it would like, size up the idea. And I think this is like, still kind of not right. Like, I think a lot of this are like, things that we should try again and not let it, like, kind of what I said earlier about like, sizing up the, the impact of a change is like, it's really easy to under, or to like, size it up incorrectly and then talk yourself out of it. So, I think this probably needs to be revisited more. My old approach, particularly with like, the, the Bunn-Russ rewrite, was very much leaning on like, cloud code workflows to do things. And pretty much now, with the most recent models, I mostly just rely on sub-agents that are like, very long-lived. Except for that initial part where you're like, writing all the code all at once. And this, with the sub-agents, it works pretty well because they keep all the context of the relevant code in their head or like, in the context window. And that's like, less wasteful. And like, they can just keep going. Here's a little more about like, how the different parts of the compiler works. Generally, it's like, there's, if we can confidently prove that the value is, like the types are the same, that they're monomorphic, then it can become a field access. Otherwise, it has to check every single time. And it has like, some inline caching, but not like a lot. As, with a project of this size, you really do need to, it's kind of hard to follow sometimes, like what everything, what everything's happening. So, I lean a lot on like, just having an hourly update. And where it would post a scorecard, comparing a bunch of metrics that we were prioritizing. Usually though, when it was posting in Slack, it would show like a previous and this version. that way, it was easy to see if numbers went up or down. But it's like, not helpful in a slide because the previous one is just the JIT. The, the important thing is like, none of these tests for the most part are things that are like, made up. They're things that, like, predated the project. So that way we know that like, the agent couldn't have messed with it. Fusili is like, a JavaScript engine fuzzer that V8 uses. So, and we were already using that in Bunn, but we also extended it to have, to like, test for TypeScript types as well. and it's also important to check that the tests actually catch things because it's really easy to fool yourself that it's finding bugs when it's not finding bugs. Some more numbers on the ahead of time compiler. It generally, for most projects, outperforms the JIT. not always. You can see in the UglifyJS case and that's basically if it has to use the interpreter a lot. So if there's a lot of like, eval or new function, then it's not faster. But most applications don't do that. And it's like, it's like a, make it, like it's as close as possible as you can get to like a one-liner to like make an application run faster. This is not 100% true because as you can see, UglifyJS and there are other cases as well. But it is often true. So like, yeah, the other thing is object prototype. This is like a rare edge case, but basically there's a lot of security vulnerabilities in JavaScript applications called like prototype pollution. And this usually works by assigning properties onto object.prototype. and the compiler bans that. So like for a large project like this, what do you actually do all day? These are like the top messages that I sent saying continue a lot. Also like my laptop kept dying. and then like but like more concretely, what you actually do is like a bunch of leading questions like why are we doing this? Can we do this? Also, I end up saying like can you do this faster or like what's taking so long? Because it kind of like talks itself into making up rules. And also, it tends to not be it tends to like underestimate what it can do. So I often end up saying things like this to Claude to get it to like try harder. and the result is that Jetstream 3 which is one of the main benchmarks that JavaScript engines use the Bun outperforms both JavaScript cores JIT and Node.js in like V8 JIT in most of them. And the whole time like it's been using Claude code to like build the Bun compile like to build Bun compile itself and then using the build of Claude code that was compiled with Bun compile. So sort of how I think about this is like like the testability thing is super important when you're working on a large project with Claude and to make sure that the tests actually test things. Um and if you're not actively remeasuring then it's gonna like get worse because it's just if there's so much stuff going on it's really easy to lose track. Um uh and like it's easier for large projects like this that haven't shipped yet to uh rewrite than it is to refactor. Um and if you don't act ambitiously then the models will like start having like 0.1 percent improvements instead of like 10 percent improvements. So you kind of have to constantly nudge it to like hey you can do really cool things if you try harder. Uh you can try this now if you want uh by running bun upgrade dash dash canary if you have bun installed um and then just bun compile. Thanks everyone. love love love love love love love love love love love love love love