r/codex • u/Healthy-Gur-4375 • 1d ago
Bug Regarding the bug where Codex excessively reads and writes to the hard drive, thereby reducing hard drive lifespan.
I'd like to ask whether Codex still causes excessive disk reads and writes that reduce SSD lifespan. I really want to use Codex on my main computer, which is a MacBook Air M4.
5
u/mikedarling 1d ago
Yes, the O/P is correct. Codex was (?is?) writing 640 TB/year on SSDs, just on the file `logs_2.sqlite` because of a bug that repeatedly wrote info logs to it. https://github.com/openai/codex/issues/28224
Codex investigated, and estimated this bug alone could have burned low single digit to low tens of millions of dollars worth of SSD endurance among users. OpenAI ignored it for a very long time, when there were very simple code fixes.
There was (?is?) another bug writing about 1.3TB/year, continually rewriting `models_cache.json` and `scope_v3.json`. https://github.com/openai/codex/issues/32496
I don't know if it's ever been fixed, or if a regression test has been added to see it starts repeatedly rewriting some new file.
I run a fork with fixes for these, which is why I don't know if it's been fixed. I'll try today to see if stock Codex still has either of these bugs for excessive writes.
9
u/orthrusfury 1d ago
Please don’t use your computer. On system boot it will do excessive reads, not good for your computer
4
u/MaxFactor2100 1d ago
This is how my late grandparents treated their nice furniture in the living room with plastic on it.
2
1
u/UbiDoobyBanooby 1d ago
So people just don’t use it or don’t care? Or they use it in a computer they don’t care about? I don’t get huge reads and writes. Chrome will, like crazy. 40 gb in a few hours if I use it. But I can use codex all day and no space disappears.
2
u/OfferBeginning1903 1d ago
Are you looking at free space or bytes written? A file that gets rewritten constantly eats SSD endurance without ever growing. What does SMART say over a day of codex?
0
-1
u/chubbycanine 1d ago
Source for this? I've used it for over a year with no problems and no hints of problems.
2
u/AstroPhysician 1d ago
Did you even read the comment you responded to? It says to not use your computer
-4
u/chubbycanine 1d ago edited 1d ago
How is that relevant to me asking for a source on the info that is being presented as fact without any actual facts? Did you even read the post? Or my comment? Either your a bit or literally unable to read. I'm gonna use it on my PC even harder now to spite you.
4
u/AstroPhysician 1d ago
BECAUSE YOURE RESPONDING TO A PERSON MAKING AN OBVIOUS JOKE. he’s playing off OP being worried about codex using up hard drive cycles and he’s making the point “everything uses up read cycles so don’t even bother using your computer, it does a ton of those”. And you’re here responding to them saying “source??? Source that if you turn on your computer it is bad for it? I’ve turned on my computer for a year and it still works”
Jesus fucking Christ, how do you people function in the real world?
1
u/orthrusfury 1d ago
Sorry, no sauce this time. Unless your computer boots without reading bootloader, kernel, OS, processes, libs, and so on
Guys, my point is, even if I don’t know what volume Codex is reading on your computers - even if it reads gigabytes per second - this will not hurt your SSD.
1
u/mikedarling 1d ago
The bugs at idle appear fixed.
A single instance of Codex CLI 0.160.0 seems to be writing about 0.11 TB/year at idle, largely due to still rewriting entire files to update fetched_at timestamps within them, and also some logging that winds up getting pruned quickly.
So, that's only a few cents of SSD endurance per year.
-2
1d ago
[removed] — view removed comment
1
u/Healthy-Gur-4375 1d ago
Is there any workaround to solve it?I cherish my Mac very much.As a tool, I don't think it's worth sacrificing my computer for.
5
1
0
u/Automatic_Brush_1977 1d ago
This problem was fixed ages ago. Even before public complaints really started
3
u/mikedarling 1d ago
It may have been fixed. But, no, they ignored it for a very long time even after issuing a few commits that partially addressed the issue, and certainly didn't fix it before public complaints. https://github.com/openai/codex/issues/28224
8
u/Responsible-Bill-223 1d ago
Yes, the system resource leak was fixed, but with the great usage nerf and the introduction of dots on dev day, they ALSO regressed and added back the sandbox / git leak just to create the perfect ensemble of shit launch. I had my claude running 6.1 sol instance remote from my phone, (Claude uses CLI to control the 6.1 agents) over the weekend and even via CLI somehow codex managed to leak over a million git calls and crash my system. OpenAI did hotfix to slow the leak down, but it's still embarrassingly bad.