OpenAI's Codex CLI Has a Serious Problem: It's Destroying SSDs
OpenAI's Codex command-line tool is continuously writing enormous volumes of data to local storage, threatening the lifespan of consumer solid-state drives (SSDs) used by developers. A GitHub issue filed on June 14, 2026, revealed that the Codex CLI generates approximately 37 terabytes of writes over just 21 days of normal use, extrapolating to roughly 640 terabytes per year. For context, most consumer SSDs are rated for around 600 terabytes of total writes before failure, meaning a developer running Codex CLI continuously could theoretically wear out their drive in a single year.
What's Causing This Massive Data Write Problem?
The culprit is a logging system that runs at maximum verbosity by default. The Codex CLI uses SQLite databases to store feedback logs, specifically writing to files like ~/.codex/logs_2.sqlite, ~/.codex/logs_2.sqlite-wal, and ~/.codex/logs_2.sqlite-shm. The root cause is a global TRACE-level default setting that captures everything: dependency internals, raw WebSocket and server-sent event (SSE) payloads, and OpenTelemetry mirror events.
In a 15-second sample measurement, the system inserted approximately 36,211 rows into the database while the retained row count stayed flat, confirming a continuous write-and-prune cycle. This pattern generates ongoing disk I/O regardless of the final database size. TRACE-level entries alone account for roughly 70.7% of retained bytes in logs, and when OpenTelemetry mirror targets are included, that share climbs to around 96% of all logged data that could theoretically be eliminated without disabling feedback collection entirely.
How Widespread Is This Issue?
This is not an isolated bug affecting a single user. At least eight related issues on the OpenAI Codex GitHub repository document the same logging behavior across both Codex Desktop and CLI builds. These include reports of excessive write-amplification during streaming, SQLite growth during normal use, and write amplification rates reaching approximately 11 megabytes per second in some cases. The pattern is systemic, affecting any developer running Codex CLI long-term on consumer hardware.
Steps to Protect Your Hardware from Codex Logging Damage
- Monitor Your SSD Health: Regularly check your drive's total bytes written using tools like CrystalDiskInfo or manufacturer utilities. Compare your drive's rated TBW (terabytes written) endurance against your actual write volume to estimate remaining lifespan.
- Disable Codex Logs if Possible: Look for configuration options to disable SQLite logging entirely, such as an sqlite_logs_enabled = false flag, though this workaround may not yet be available in all versions.
- Use External Storage: If your system supports it, redirect the ~/.codex/logs directory to an external drive or network storage to offload write wear from your main SSD.
- Track GitHub Updates: Monitor the openai/codex repository for official fixes addressing configurable log levels, retention limits, or reduced-write telemetry backends that OpenAI may implement.
- Consider Upgrade Timing: If you rely heavily on Codex CLI, factor potential SSD replacement costs into your tool evaluation, or delay adoption until the logging issue is resolved.
The issue highlights a broader risk pattern in long-running developer tooling and client-side AI agents. Client-side telemetry and feedback collection, while valuable for product improvement, can carry real hardware costs on consumer SSDs with finite write endurance ratings. For practitioners relying on Codex CLI for daily coding work, this represents a tangible infrastructure concern that extends beyond typical software performance considerations.
OpenAI has not yet released an official fix, but the recommended solutions focus on narrowing what gets logged by default. These include dropping the global TRACE-level default, suppressing low-value dependency noise, avoiding storage of full raw WebSocket and SSE payloads, and implementing a global logs database size or write-rate cap. Until such fixes are deployed, developers should be aware that running Codex CLI continuously on consumer hardware carries measurable wear costs that may accelerate SSD replacement timelines.