A GitHub user’s recent investigation exposed a hidden drain on consumer SSDs that could, over time, erase the life of a typical drive.

The issue surfaced on June 14 when the researcher noticed an alarming spike in disk activity on their machine. Log analysis revealed that the Codex command‑line interface (CLI) was persistently writing to a local SQLite database located at ~/.codex/logs_2.sqlite. Over a continuous 21‑day period, the database accumulated roughly 37 TB of data. If the same pattern continued for a full year, the write volume would reach about 640 TB—well beyond the endurance rating of a 1 TB consumer SSD, which is generally limited to around 600 TBW.

At the heart of the problem is the CLI’s default logging configuration. The SQLite feedback sink operates at the global TRACE level, the most verbose setting, recording everything from raw WebSocket payloads to routine filesystem events such as opening system files. Because this configuration ignores the standard RUST_LOG environment variable, users cannot lower the log level through conventional means. The investigation found that about 71 % of the logged entries are TRACE‑level noise that offers little diagnostic value.

Beyond the sheer volume, the database’s frequent insert‑and‑delete operations create write amplification, meaning the physical amount of data written to the drive exceeds the apparent file size. The bug has been documented in multiple GitHub issue threads since at least April, and several users have reported similar symptoms. OpenAI’s recent changelog notes some SQLite reliability fixes but does not address the high write rate, leaving the problem unresolved as of the latest public information.

A temporary mitigation is available for Linux and macOS users. By creating a symbolic link from ~/.codex/logs_2.sqlite to a temporary directory such as /tmp/, the database writes are redirected to RAM. Because the file does not contain conversation data, losing it on reboot is acceptable and protects the SSD from excessive write load.

The Codex CLI is an open‑source tool built in Rust that lets developers run the Codex agent locally from a terminal. It is part of OpenAI’s broader suite of coding products, which also includes a desktop application and a Visual Studio Code extension. This bug underscores the importance of careful logging configuration in software that writes frequently to local storage, especially when end users may run the tool for extended periods.

The issue highlights a broader challenge: balancing diagnostic data collection with hardware endurance. Consumer SSDs are designed with a finite number of write cycles, measured in terabytes written (TBW). A 1 TB drive with a 600 TBW rating can theoretically sustain 600 TB of writes before the warranty period ends. Writing 640 TB per year would exceed that limit, potentially causing the drive to fail prematurely.

OpenAI has not issued an official statement regarding the bug, and no patch has been released to date. Users who encounter the problem are advised to monitor disk usage and consider the temporary symlink workaround until a permanent fix becomes available.