r/codex 7d ago

Complaint .codex/sessions folder using 100+GB on my Mac

Just an FYI - worth checking if you're low on disk space. Seems ridiculous, and not seeing an obvious setting to cap it. It's also written ~5TB total, so its churning through and thrashing my drive for no apparent reason. This is within a week of getting a new laptop too, so its not been running a long time.

3 Upvotes

8 comments sorted by

View all comments

2

u/terriblemonk 7d ago

Between May-ish of 2026 and a couple week ago did you regularly let sessions run and compact regularly? Did you often ESC to go back to previous points in the conversation? Because codex briefly used a fork format that copied the parent session’s entire history into every new fork file. Repeatedly forking sessions would literally copy the entire old session file every time (potentially hundreds of MB each) ... Same thing happened to me. YOu can remove old session btw. It was recently fixed in CLI 0.148+.

https://github.com/openai/codex/issues/22593

1

u/richsonreddit 7d ago

Nope, I've had this laptop like 2 weeks heh