Sumner runs Claude Code on a Bun AOT build at 267 MB
The Bun author is dogfooding ahead-of-time compiled JavaScript inside his own agent harness, and reporting the memory numbers from Activity Monitor.
Jarred Sumner says he spent about four hours working on Bun AOT inside a Claude Code build compiled with Bun AOT. His reading from Activity Monitor: 267 MB of RAM, with 67 active subagents, 66 shells, remote control and a big session transcript all live in that one process tree.
That is one developer, on one machine, reading one tool. It is not a benchmark, and Sumner does not publish a before number for the same session on a normal JIT build. What makes it worth a look is who is taking the measurement and on what. Sumner is the author of Bun, the runtime he is changing, and he picked an agent harness as the test case rather than a toy HTTP server.
What AOT is doing here
AOT means ahead-of-time compilation, emitting native code when the program is built rather than compiling hot paths at runtime. Sumner had already said he planned to merge Bun AOT and then test it on Claude Code, and that he expected 2 to 3 times less memory and CPU plus a slightly smaller binary.
Instead of you rewriting in Rust, we rewrote JavaScript's compiler to emit native code ahead of time
His explanation for why identical code gets cheaper is twofold. A JIT, he says, runs something like three threads compiling and freeing code while your app runs, and that costs both CPU and RAM. The rest is a list of tricks that are practical without lazy parsing: 32 bit object references, flat object layouts, skipping function object creation where possible, thin closures. He also claims the classic JavaScript leak where a scope is kept alive by child functions, which happens in both JSC and V8, does not happen under AOT.
Why the agent is the test case
A coding agent spawning dozens of subagents and shells is close to the worst shape for a JIT. Lots of short-lived processes, each paying warm-up cost, each carrying its own compiler threads, none of them running long enough to amortize the work. If AOT pays off anywhere outside long-lived servers, this is the shape where it should show.
Sumner has been the one correcting claims about Bun before, including an earlier claim about a Claude rewrite of Bun avoiding security bugs. Treat the 267 MB the same way he treats other people's numbers. It is a single observation from the person with the strongest reason to want the change to work, and the expected 2 to 3x is still a prediction, not a result.
Have the good opinion, not the loud one
One email a day. Under three minutes. What working engineers found out about coding with AI.
