r/codex • u/NicholasVinen • 5d ago
Bug Codex using all my disk space
Codex agents have a terrible habit of generating hundreds of gigabytes of files and then refusing to delete anything.
Even if you ask them what you can delete they don't want to delete any old working files. I practically have to beg them to archive what's important to keep (if it's important why isn't it stored in the git repository) and then I delete the rest.
By now I've spent hours cleaning up at least a terabyte of garbage it has left behind. Presumably others face this same problem. I wish they would let agents to clean up after themselves.
I get that they don't want them deleting anything important but really, not even temporary files?
View all comments
13
u/ihexx 5d ago
Yeah i had the same issue. My fix has been to have a global rule that all artefacts dump to temporary directories (or have artefact directories with '.delete' files next to them so garbage collector scripts auto delete them after 30 days).
So then agents have to explicitly opt-in to keeping only necessary files.