codex cli non interactive mode output very large text file, 500mb to 1.8gb

Resolved 💬 5 comments Opened Jan 10, 2026 by mlion8 Closed Jan 11, 2026

What version of Codex is running?

0.80.0

What subscription do you have?

chatgpt plus

Which model were you using?

gpt-5.1-codex-max high and gpt-5.2-codex-max high both have this issue

What platform is your computer?

Linux 6.6.87.2-microsoft-standard-WSL2 x86_64 x86_64

What issue are you seeing?

<img width="2497" height="1089" alt="Image" src="https://github.com/user-attachments/assets/6b1f8c24-706f-473c-abb1-ee1920089e19" />

As the title and the image suggests,
I was using codex cli non interactive mode mostly and use codex exec "$prompt" --json 2>&1 command to output the result to a local file.
Everything was normal yesterday, but then it starts to output this very large text file and stuck there (I assume the file was too big).
It does not happen every time I run, and happens to both gpt-5.1-codex-max high and gpt-5.2-codex high model.
I downgraded to my previous codex cli version such as 0.78.0 also tried gpt-5.1-codex-max high as well, but the issue happens still from time to time.
If anyone can take a look, that will be very appreciated.

What steps can reproduce the bug?

I just let codex to review the code I write, and provide audit report in a markdown format using table.

What is the expected behavior?

It should just be a normal text file like around 20kb

Additional information

_No response_

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗