• Sources: primary
  • Summary: Sumner, now at Anthropic, describes an ahead-of-time compiler for Bun that treats TypeScript types as predictions, which he says makes Claude Code use about 4x less memory and start about 2x faster. Agents wrote it through five rewrites in about a month, with one round running 140 agents in parallel, and it was checked against Bun's, WebKit's and test262's existing suites, differential runs of JIT, AOT and type-stripped builds, and a JavaScript engine fuzzer extended for types. The compiler bans assignments to Object.prototype to block prototype pollution, and it is available through bun upgrade --canary.
  • Why it matters: Trusting a large agent-written change depends on tests that existed before the project and on differential runs the agent cannot edit, more than on review of the code.
  • Background: A JIT compiler turns JavaScript into machine code while the program runs, so every process pays compile time and memory again. An AOT compiler does that work at build time, which matters for many short sessions on constrained devices. Sumner says the team rejected a Rust rewrite of Claude Code because its tests are in TypeScript, and porting them would remove the independent check.