Codex logging bug may write TBs to local SSDs A bug in OpenAI's Codex CLI causes SQLite feedback logs to write approximately 640 TB of data per year, potentially consuming the full write endurance of a 1 TB SSD in under a year. The issue, reported on GitHub, shows that TRACE-level logs account for 70.7% of retained bytes, with websocket and telemetry logs contributing an additional 25.3%. - Notifications /login?return to=%2Fopenai%2Fcodex You must be signed in to change notification settings - Fork 13.7k /login?return to=%2Fopenai%2Fcodex Codex SQLite feedback logs can write ~640 TB/year and rapidly consume SSD endurance 28224 CLIIssues related to the Codex CLI https://github.com/openai/codex/issues?q=state%3Aopen%20label%3A%22CLI%22 Issues related to the Codex CLI bugSomething isn't working https://github.com/openai/codex/issues?q=state%3Aopen%20label%3A%22bug%22 Something isn't working performance https://github.com/openai/codex/issues?q=state%3Aopen%20label%3A%22performance%22 Description Codex SQLite feedback logs can write ~640 TB/year and rapidly consume SSD endurance Issue Codex is continuously writing a large amount of data to the local SQLite feedback log database: ~/.codex/logs 2.sqlite ~/.codex/logs 2.sqlite-wal ~/.codex/logs 2.sqlite-shm On my machine, after about 21 days of uptime , the main SSD has written about 37 TB . Process/file-level checks show Codex SQLite logs are the main continuous writer. That extrapolates to roughly 640 TB/year . On a 1 TB SSD , that is about 640 full-drive writes per year . Some consumer SSDs are rated around 600 TBW , so this could consume roughly a full drive's warranted write endurance in less than a year. Evidence Current retained rows in logs 2.sqlite : | metric | value | |---|---| | retained rows | 681,774 | | estimated retained log content | 1,035.6 MiB | Level distribution: | level | estimated MiB | byte % | |---|---|---| | TRACE | 732.5 | 70.7% | | INFO | 266.5 | 25.7% | | DEBUG | 30.6 | 3.0% | | WARN | 5.9 | 0.6% | Largest target+level pairs: | target | level | estimated MiB | |---|---|---| codex api::endpoint::responses websocket | TRACE | 527.4 | codex otel.log only | INFO | 141.2 | codex otel.trace safe | INFO | 121.2 | log | TRACE | 97.4 | codex client::transport | TRACE | 60.1 | codex core::stream events utils | DEBUG | 27.5 | codex api::sse::responses | TRACE | 19.1 | The top sources are mostly global TRACE logs, mirrored telemetry logs, and raw websocket/SSE payload logging. TRACE alone is about 70.7% of retained bytes. codex otel.log only + codex otel.trace safe add another 25.3% . Filtering these categories should remove roughly 96% of retained log bytes in this sample without fully disabling feedback logs. Sanitized examples from the most frequent TRACE source: target=log These are high-frequency retained samples. Raw websocket/SSE payload bodies are intentionally not included because they may contain private conversation content. 128,764x TRACE log: inotify event: ... mask: OPEN, name: Some "ld.so.cache" 37,982x TRACE log: inotify event: ... mask: OPEN, name: Some "locale.alias" 23,843x TRACE log: inotify event: ... mask: OPEN, name: Some "passwd" 3,639x TRACE log: