Codex tui logs keeps growing and not getting rotated
Open 💬 12 comments Opened Apr 6, 2026 by saril009
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex CLI is running?
0.118.0
What subscription do you have?
OPENAI
Which model were you using?
multiple models
What platform is your computer?
mac
What terminal emulator and version are you using (if applicable)?
iTerm2
What issue are you seeing?
Codex tui log file in location ~/.codex/log/codex-tui.log is growing beyond GBs and causing the cli slowing down. The logs are not getting truncated/rotated . in codex desktop app, the logs are rotated every day but not in cli . With multiple agents running its causing issues with the codex cli slowing down and crashes
What steps can reproduce the bug?
just keep using codex for long or use multi agentic workflows to keep the log file growing
What is the expected behavior?
need to truncate or rotate logs to keep log file under threshold
Additional information
_No response_
12 Comments
Thanks for the bug report.
Why do you think this is slowing down the CLI? It's simply appending to the end of the log file.
+1 in my case it has grown to over 120GB in the course of just a few days.
I'm on windows.
<img width="341" height="84" alt="Image" src="https://github.com/user-attachments/assets/e9d8691d-880e-4441-a1cc-55ab765be069" />
Edit:
In a test run, the codex-tui.log file was 983,554 bytes at the time I measured it. In that same window, I saw 49 repeated
403 Forbidden"tool suggestion" errors, and those entries (including the full HTML body being logged) accounted for 545,464 bytes, which is 55.46% of the file.That comes out to about 1.79 of those events per minute over a 27.37 minute span.
If it helps, I can share another sample with exact timestamps
Couple of issues which may be causing the slowdown @etraut-openai
I found that codex-tui.log had grown to about 9 GB under WSL.
After truncating that file, my memory usage dropped from around 90% to 70%.
In a few days, my codex-tui.log has grown to 204GB, and filled my hard disk space, which resulted in "disk full" errors.
Deleting the log or truncating it manually fixes the "disk full" issue. This appears to be a codex CLI issue
my codex-tui.log is 50+ gb this is insane , should not be allowed to grow like this
@sterlingcrispin, it sounds like you're hitting some condition that's generating a lot of log content. Could you
tailthat file and see if you can figure out what's generating the noise? If we can figure out what's causing this, I can look at suppressing it. Thanks!@etraut-openai sure, some info from codex
seems like I could probably safely delete the whole thing but I might try to prune out these info/warn logs
Hey @etraut-openai, I opened a PR that should address the log growth issue. It fixes the tracing span nesting that was making repeated log events balloon into huge lines.
There’s a separate core skills loader issue too (which was spamming the logs): some plugin skill configs reference shared plugin icons via
../../assets/logo.svg, which the loader currently rejects. I put that in a separate fix since it seems out of scope for the logging PR.Logging fix: https://github.com/openai/codex/compare/main...b-nnett:fix-root-turn-spans
Core skills fix: https://github.com/openai/codex/compare/main...b-nnett:fix-plugin-shared-skill-icons
Logging issue write-up: https://gist.github.com/b-nnett/be3c669166b320ea70df5cac36ce13dc
Core skills issue write-up: https://gist.github.com/b-nnett/a390c227c22333206caee0061dea8509
@b-nnett thank you this is great, going to write a script that prunes this rather than needing to delete the whole file on my end @etraut-openai if possible it would be great to land a fix to this asap
my codex-tui.log grew another 30gb in the last 5 days
Additional datapoint from
codex-cli 0.133.0on macOS 26.1 / arm64 via Homebrew:~/.codex/log/codex-tui.loghad grown to71,357,455,830bytes (~66.5 GiB)doctor/ resume were badly degraded until the file was truncated2,937files /3.43 GB) and~/.codex/logs_2.sqliteat844,046,336bytes, but the TUI log was by far the single biggest fileSo this is not just cosmetic disk growth; once the log gets large enough it appears to contribute materially to CLI slowness.
Having this problem as well. I have mine in a different location due to a custom
~/.ai/setup I use to have a more homogenous Codex + Claude Code cooperation, but I still suffer from a log that is several tens of gb.