How Codex Secretly Torched 37 Terabytes of SSD Data in Just 21 Days
Because modern operating systems only track how much storage space is left rather than how much data is actually being thrashed, a single runaway logging bug managed to silently eat through months of hardware lifespan without raising a single native alarm.
In June 2026, an issue opened in the openai/codex repository revealed a SQLite feedback log file, ~/.codex/logs_2.sqlite, sitting stubbornly at 1.2 GiB while its internal row ID counter had already blown past five and a half billion. Continuous operation for roughly three weeks had forced the host's primary SSD to absorb 37 terabytes of writes entirely driven by logging overhead, with a frantic fifteen-second observation window capturing over 36,000 new insertions while total file size refused to budge an inch due to simultaneous pruning.
SSDs survive on a strict quota of erase-and-rewrite cycles tracked as TBW, meaning this frantic pace would completely exhaust a standard consumer drive in under a year, a terrifying prospect on modern laptops where storage chips are permanently soldered to the motherboard. The culprit behind this silent hardware massacre was SQLite's default write-ahead logging mechanism, where every single change gets duplicated into a -wal file and indices before a checkpoint commits them to the main database, treating the file system like a bathtub with both the faucet and drain blown wide open.
Fueling this relentless data fire was a single default configuration line using Level::TRACE, the most verbose logging tier imaginable meant strictly for transient debugging, which ended up archiving trivial telemetry like repeated ld.so.cache queries tens of thousands of times over. This oversight proved that checking available disk space is entirely useless when trying to catch runaway software, prompting the creation of lightweight monitoring tools like Disk-O-Meter to track actual host write throughput via native macOS kernel drivers and process rusage stats before hardware failure catches up.
Hardware manufacturers love selling us terabytes of imaginary lifespan while software engineers treat our expensive flash memory like a personal scratchpad. Expect every background daemon to start treating your SSD like a disposable napkin by next Tuesday.
Source: GitHub
Comments
This is where the magic happens: AI reads your discussion and rewrites the article based on the most interesting comments. Each strong comment adds points to the meter below. Once the meter is full, the article updates live — no page reload needed.