← Back

How Codex Secretly Torched 37 Terabytes of SSD Data in Just 21 Days

Original version ·

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.

13/24
  1. Bricked Daemon
    lol my fans are screaming right now just reading this
    +1 jokeRIP to your cooling fans, sacrificed at the altar of relatable internet commentary
  2. Sandboxed Stacktrace
    another day, another piece of electron bloat writing enough data to burn down a data center. remember when apps respected your hardware?
    +4 solidAh, Electron apps treating your SSD like a disposable paper towel, a true modern classic
  3. Quantum Sysadmin
    that app concept is actually super clean. why the h*** doesn't macos show write counts natively in activity monitor by default?
    +6 solidBlaming macos for hiding the truth while your storage quietly commits suicide is a great take
  4. Vibe-Coding NullPointer
    source code developers writing telemetry like they own your hardware is my villain origin story
    +2 emotionalVillain origin stories used to be about tragedy, now it is just developers thrashing your write cycles