A bug in Codex's logging system can silently write terabytes of log data to your local SSD, filling disk space and degrading performance. The issue, tracked on GitHub as issue #28224, affects users running Codex in agent mode or with verbose logging enabled. This post explains the root cause, shows you how to check if you're affected, and provides concrete steps to fix and prevent it.
The Bug: What Happens
Codex's logging subsystem, when configured with certain verbosity levels or when running long-lived agent sessions, can enter a loop that writes log entries at an extremely high rate. In some cases, users reported log files growing by 100 GB per hour, eventually consuming terabytes. The logs are written to the default log directory, typically ~/.codex/logs/ on Linux/macOS or %USERPROFILE%\.codex\logs\ on Windows.
How to Check If You Are Affected
-
Check disk usage on the drive where your home directory resides:
du -sh ~/.codex/logs/If this shows tens of gigabytes or more, you are likely affected.
-
Inspect log file sizes:
ls -lh ~/.codex/logs/Look for files like
codex.log,codex-agent.log, or rotated archives. If any file exceeds 1 GB, that's a red flag. -
Monitor log growth over a short period:
watch -n 10 'du -sh ~/.codex/logs/'If the size increases by more than a few MB per minute, you have the bug.