Netfox
HomeQ&AAnti-ScamNotifications
© 2026 Netfox. All rights reserved.
Terms of ServicePrivacy PolicyAbout UsEditorial Policy
Comment
Technology

Ghostty 1.3 Fixes Massive Memory Leak Caused by "Claude Code"

Galvin Prescott
Galvin Prescott
Jan 11, 20264 min
0
0
0
448
Mitchell Hashimoto details the fix for Ghostty's largest memory leak. A desync between metadata and mmap caused 37GB spikes, now resolved for version 1.3.

Ghostty Developer Fixes "Absurd" 37GB Memory Leak Triggered by AI Tools

Mitchell Hashimoto, creator of the Ghostty terminal emulator, has announced a definitive fix for the most significant memory leak in the project’s history. The bug, which remained dormant since version 1.0, was recently brought to light by the intensive output patterns of AI command-line tools like Claude Code.

In some extreme cases, users reported Ghostty consuming up to 37 GB of RAM after several days of uptime. The fix has been merged into the nightly builds and is scheduled for the stable 1.3 release in March 2026.

The Anatomy of the Leak: Metadata Desync

Ghostty manages terminal history using a "PageList," a doubly-linked list of memory pages allocated via mmap. To maintain high performance, Ghostty uses two types of allocations:

  1. Standard Pages: Fixed-size blocks managed by a memory pool for fast reuse.

  2. Non-Standard Pages: Larger, direct mmap allocations used for lines with heavy emoji usage, complex styles, or deep hyperlinks.

The leak occurred during a "scrollback optimization" where the terminal reuses the oldest page in history as the newest page to avoid new allocations.


The "Claude Code" Catalyst

While the bug existed for years, it was rarely triggered because non-standard pages are typically uncommon. However, the rise of Claude Code—Anthropic’s CLI tool for AI-driven coding—created a "perfect storm."

Claude Code produces high volumes of multi-codepoint graphemes and rapid scrollback updates. This forced Ghostty to allocate non-standard pages at an unprecedented rate, which were then incorrectly recycled and leaked.

Allocation TypeManagement MethodCleanup Logic
Standard PageMemory PoolReturned to pool (No syscall)
Non-StandardDirect mmapMust call munmap
Leaked PageMetadata DesyncIgnored by munmap

Visualizing the Impact: Memory Consumption

Before the fix, the memory footprint grew linearly with the number of non-standard pages generated by high-intensity CLI tools.


Diagnostic Breakthrough with VM Tags

To confirm the fix, Hashimoto implemented Virtual Memory (VM) Tags on macOS. This allows the Mach kernel to label specific memory allocations, making them visible in system diagnostic tools. By tagging the PageList allocations, the developers could distinguish Ghostty's internal terminal memory from general application overhead, proving that the leaked memory was indeed tied to the scrollback buffer.


The AI Stress-Test for Legacy Software

The Ghostty memory leak is a prime example of how the next generation of AI tools is stressing existing software infrastructure. Tools like Claude Code do not just change how we code; they change the workload of the tools we use to code.

By pushing terminal emulators to handle complex, high-bandwidth data streams that were previously the exception rather than the rule, AI is inadvertently acting as a massive, real-world fuzzing suite for edge cases. This fix ensures Ghostty remains a viable high-performance option as "agentic" workflows become the industry standard.

References

  • Mitchell Hashimoto (Official Blog)

  • Zig Programming Language Documentation

Comments (0)

Sort by

Please login to comment

Sign in to share your thoughts and connect with the community

Loading...

Related news

Xiaomi's MiMo V2.5 Pro tops the GDPval-AA agentic benchmark with a score of 1578, outperforming Kimi K2.6 and DeepSeek V4 Pro in real-world work tasks.

Xiaomi MiMo V2.5 Pro Leads GDPval-AA Agentic Benchmarks

82 views•5 min
Google celebrates 20 years of Translate with a new interactive AI pronunciation tool and launches an experimental "Ask YouTube" conversational search feature.

Google Translate Adds AI Pronunciation Practice Tool

580 views•4 min
Turtle Beach's new Command Series peripherals feature customizable touchscreens for macro management and system monitoring. Discover the technical specs and release details.

Turtle Beach Command Series Touchscreen Peripheral Specs

79 views•3 min
Apple announces John Ternus will become CEO on September 1, 2026, while Tim Cook moves to Executive Chairman. An analysis of Apple's hardware-led future.

John Ternus Named Apple CEO as Tim Cook Shifts to Chairman

153 views•4 min
Anthropic Labs debuts Claude Design, a tool using Claude Opus 4.7 to generate interactive prototypes and design systems directly from existing codebases.

Anthropic Claude Design: Prototyping and Code Handoff Analysis

117 views•4 min
The DJI Osmo Pocket 4 introduces 4K/240p slow-motion and improved dynamic range. Here is how the hardware changes impact real-world vlogging and production.

DJI Osmo Pocket 4 Specs: 4K/240p and Improved Dynamic Range

89 views•3 min
Porsche reveals the 2027 911 GT3 S/C, combining the 510 PS naturally aspirated engine with a magnesium-ribbed automatic roof and 6-speed manual transmission.

2027 Porsche 911 GT3 S/C: Specs, Weight, and Analysis

135 views•5 min
Leaks suggest Apple will introduce a Deep Red finish for the iPhone 18 Pro, while Android manufacturers reportedly prepare similar shades for 2026.

iPhone 18 Pro Deep Red Color Leak and Android Response

90 views•3 min
US Treasury Secretary Scott Bessent convenes bank CEOs as Anthropic's Claude Mythos model demonstrates autonomous discovery of critical zero-day vulnerabilities.

Anthropic Mythos Prompts Treasury Meeting with Bank CEOs

276 views•5 min
GitButler, co-founded by GitHub’s Scott Chacon, raises $17M Series A to move software development beyond 20-year-old Git workflows and support AI collaboration.

GitButler Raises $17M to Redesign Version Control for AI

223 views•3 min
As Apple's M5 and Intel's Panther Lake arrive in 2026, the CPU is no longer the center of the chip. Discover how NPUs and specialized accelerators are taking over.

CPU vs NPU: The Shift to Specialized Silicon in 2026

162 views•4 min
Leaked specs for the MediaTek Dimensity 9600 reveal a 5GHz clock speed target, Arm Magni GPU, and TSMC N2p process for 2027 flagship smartphones.

MediaTek Dimensity 9600 Leaks: 5GHz and N2p Architecture

157 views•3 min
Apfel v0.7.2 wraps Apple’s FoundationModels framework in a Swift-based CLI and OpenAI-compatible server for private, 100% on-device AI inference on macOS.

Apfel: Accessing Local Apple Intelligence via CLI and API

151 views•5 min
Google launches Gemma 4, a new generation of open-source models built on Gemini technology. Learn about the technical specs, performance, and how to run it locally.

Google Gemma 4 Launch: Open-Source Models and Local Access

115 views•3 min
The Vivo X300 Ultra's Chinese launch reveals a significant price gap for international buyers. Explore the specs, import costs, and software limitations.

Importing the Vivo X300 Ultra: Costs, Specs, and Risks

128 views•4 min
Recent data reveals a surprising winner in vehicle durability. Learn why standard hybrids are outperforming both electric and gasoline cars in long-term reliability.

Hybrid vs. Electric vs. Gas Car Reliability Explained

130 views•4 min
Technical deep dive into the Axios npm compromise (v1.14.1 and v0.30.4). Analysis of the plain-crypto-js RAT dropper, OIDC bypass, and anti-forensic cleanup.

Technical Analysis: Axios npm Supply Chain Attack

161 views•5 min
As Apple marks 50 years, we examine the cultural and technical shifts that turned a garage startup into a $3.5 trillion titan through eight core product leaps.

Apple at 50: From Garage Startup to $3.5 Trillion Technology Pillar

222 views•3 min
A technical narrative of a 320GB production server failure, focusing on Samsung LRDIMM errors, kernel RAS logs, and the operational cost of technical negligence.

From Morning Crash to Evening Demolition: Proving a 320GB Production Server Failure When Management Derailed

123 views•6 min
Sony increases PlayStation 5 prices by $100, citing AI-driven memory demand and geopolitical instability. The hike affects PS5, PS5 Pro, and PlayStation Portal.

Sony Hikes PlayStation 5 Prices by $100 Amid Surging Memory Costs

135 views•3 min