A significant flaw has been discovered in OpenAI's AI programming tool, Codex: its logging system is set to output TRACE debug information at the highest level by default. This results in a continuous stream of low-value logs being written to a local SQLite database (~/.codex/logs_2.sqlite) during active usage. According to tests conducted by developers, Codex generated a staggering 37TB of data over just 21 days, with the potential to reach an annual write volume of 640TB. This far surpasses the write lifespan limit of typical consumer-grade solid-state drives (SSDs), considering that the rated write lifespan for mainstream 1TB SSDs is approximately 600TB. The root cause of this issue lies in a misconfiguration within the logging framework. Even when the log level is adjusted, the writing process is not disabled, and a staggering 96% of the log content consists of irrelevant TRACE noise. Although OpenAI has implemented filters to reduce the writing of some high-frequency events, the default log level remains set to TRACE, and SSD writing has not been completely eliminated.
