← Back to digest
Tools & Demos

Claude Code CLI: 2x less CPU, thanks to a garbage collector

What's this about?

Claude Code's CLI now uses half the CPU at p99. The cause was specific and satisfying: Bun's garbage collector ran on a fixed timer, so it fired mid-turn — stealing CPU at exactly the moment Claude Code was busiest. It now waits until the process is idle. Boris Cherny added that small quality-of-life improvements like this add up, with more coming.

What exactly is "p99," and what is garbage collection?

Garbage collection is the runtime automatically reclaiming memory your program no longer uses. It's convenient but it pauses your work while it runs — so *when* it runs matters enormously. Firing on a fixed timer means it interrupts whatever is happening, including your most intensive moment. And "p99" means the 99th percentile: the worst 1% of cases. Average CPU usage can look fine while the tail is terrible, and the tail is what users actually feel — the freeze, the stutter, the fan spinning up. Halving p99 is a bigger deal than halving the average.

Why is this worth noticing?

2,801 likes for a performance note — unusually high for this kind of post
  1. It's a reminder that agent tooling is ordinary software with ordinary performance bugs, and that a large share of perceived "AI slowness" can be plumbing rather than the model.
  2. The specific lesson generalizes: scheduling background work on a timer rather than on idle is a mistake any interactive application can make.
  3. The engagement suggests users have been feeling this. A performance fix drawing thousands of likes usually means the problem was widely experienced but not widely diagnosed.
← MiniMax H3: local open-weights videoCumora: agents as first-class teammates →