How to (not) Destroy Your SSD
37 TeraBytes in three weeks In June 2026 a Codex user opened an issue on the openai/codex repository with a set of numbers that did not seem to belong together. The SQLite database in which Codex keeps its feedback logs, ~/.codex/logs_2.sqlite , took up about 1.2 GiB and held 506,149 rows, an unremarkable size for a log, and yet the counter that hands every new row its ID had already passed five…
In June 2026, a Codex user discovered an unusual surge in write activity to their SSD, which had resulted in 37 terabytes (TB) of writes in just three weeks. The SQLite database responsible for logging feedback had reached an astounding 5.06 million rows, with each new row being matched by an equal number of deletions. Despite the large volume of writes, the database remained at the same size due to a balancing act between insert and delete operations.
The incident was reported in June but went unnoticed for months. After its discovery, the reporter developed a small menu bar app called Disk-O-Meter to track the amount of data written to each disk daily and identify the processes responsible for it. By using this tool, the reporter was able to uncover the hidden cause of the SSD wear.
SSDs operate using flash cells that have a finite number of erase-and-rewrite cycles, and manufacturers typically state an SSD's endurance as TBW (terabytes-written). In the case of the Codex user, the 37 TB of writes in 21 days equated to roughly 640 TB over a year, which could potentially exhaust the SSD's endurance rating in less than a year, assuming a 1 TB drive rating of 600 TBW.
A single SQLite database file can consume substantial write operations due to its internal logging mechanism. When changes occur, they are first appended to a write-ahead log (WAL), then eventually incorporated into the main database file during a checkpoint. Each new log row is written twice, once in the WAL and again in the database, and every index on the table must also be updated. This process contributes to the overall write activity on the SSD.
The severity of the issue is exacerbated by the fact that Apple does not publish endurance ratings for their SSDs, particularly in MacBooks where the flash storage is soldered to the logic board. This means that users are unaware of their SSD's endurance limits until something goes wrong. The TRACE level logging level used in the Codex case was responsible for the overwhelming majority of write operations, making it difficult for standard tools to detect the issue.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.