January 10, 2026
Leak slayed, comments unleashed
Finding and Fixing Ghostty's Largest Memory Leak
Ghostty’s memory meltdown gets patched — cheers, side‑eyes, and new feature requests roll in
TLDR: Ghostty patched a major memory leak and pushed the fix to nightly builds, with a stable release coming in March. Commenters cheered the detective work, debated tone across threads, and pivoted to feature requests like drag-and-drop images in tmux—proof the community’s loud, engaged, and ready for polish.
Ghostty, the buzzy terminal app, just exorcised a massive memory leak that had one user clocking 37 GB after ten days. The fix is merged, live in nightly builds, and headed for the 1.3 release in March. The culprit? A “resize on paper, not in reality” bug where big memory chunks were marked as small and never truly freed. Translation: the app thought it cleaned up; your RAM knew it hadn’t.
The community rolled in like a victory parade with a side of drama. quantummagic cheered, then dropped a spicy note that folks were hitting the issue long before Claude Code (AI coding tool) made it mainstream, with receipts via HN thread. kepano delivered the engineer’s sermon: reproducible reports are gold. Meanwhile, LgWoodenBadger lobbed a vibe check, calling out a tone shift between this lovefest and another thread (link)—cue popcorn. hotpotat went full product manager: complimented the slick memory charts, asked “what’s the stack,” then pivoted to a feature gripe—drag-and-drop images don’t work in tmux (a tool that slices your terminal into panes), which sparked a mini wishlist. Jokes flew about Ghostty “hoarding RAM like a dragon” and Claude Code “being the chaos gremlin,” but the mood was mostly celebratory: bug slain, devs praised, and users already lining up for the next quality-of-life fix.
Key Points
- •A memory leak in Ghostty existed since at least version 1.0 and was recently triggered at scale by workloads like Claude Code.
- •Ghostty’s PageList stores terminal content in pages allocated via mmap, with a pool for standard-sized pages and direct mmap for non-standard pages.
- •An optimization for scrollback pruning resized pages to standard size in metadata without resizing the underlying non-standard mmap allocation.
- •When later freed, misclassified pages were returned to the pool instead of being munmapped, causing unfreed memory and a leak.
- •The fix is merged in tip/nightly builds and will ship in the tagged Ghostty 1.3 release in March.