What version of Codex CLI is running?
0.145.0
What subscription do you have?
Pro 20x
Which model were you using?
gpt-5.6-sol
What platform is your computer?
Microsoft Windows NT 10.0.26220.0 x64
What terminal emulator and version are you using (if applicable)?
Windows Terminal (PowerShell)
Codex doctor report
What issue are you seeing?
Codex Base64-encodes every image sent by the user and stores the encoded data in the session’s JSONL file. Whenever context compaction occurs, previously uploaded images are stored again in the JSONL file as part of the compacted output. When a subagent is invoked, it copies the contents of the main session’s JSONL file.
In one session, I sent 57 images totaling approximately 3.5 MiB. The session underwent 1,052 context compactions, resulting in as many as 1,049 copies of these images within a single JSONL file. The file contained 483,017 image-data entries in total, occupying more than 2.8 GB. The session also created 169 subagents, causing those 1,049 copies to be duplicated up to another 142 times.
As a result of context compaction and subagent duplication, the earliest image I sent had approximately 150,000 copies under .codex/sessions, and the entire .codex/sessions directory consumed more than 400 GB of disk space.
What steps can reproduce the bug?
- Open the Codex CLI/App.
- Send an image.
- Continue the session.
- Watch the
.codex folder keep growing until it consumes the entire disk.
What is the expected behavior?
No response
Additional information
No response
What version of Codex CLI is running?
0.145.0
What subscription do you have?
Pro 20x
Which model were you using?
gpt-5.6-sol
What platform is your computer?
Microsoft Windows NT 10.0.26220.0 x64
What terminal emulator and version are you using (if applicable)?
Windows Terminal (PowerShell)
Codex doctor report
What issue are you seeing?
Codex Base64-encodes every image sent by the user and stores the encoded data in the session’s JSONL file. Whenever context compaction occurs, previously uploaded images are stored again in the JSONL file as part of the compacted output. When a subagent is invoked, it copies the contents of the main session’s JSONL file.
In one session, I sent 57 images totaling approximately 3.5 MiB. The session underwent 1,052 context compactions, resulting in as many as 1,049 copies of these images within a single JSONL file. The file contained 483,017 image-data entries in total, occupying more than 2.8 GB. The session also created 169 subagents, causing those 1,049 copies to be duplicated up to another 142 times.
As a result of context compaction and subagent duplication, the earliest image I sent had approximately 150,000 copies under
.codex/sessions, and the entire.codex/sessionsdirectory consumed more than 400 GB of disk space.What steps can reproduce the bug?
.codexfolder keep growing until it consumes the entire disk.What is the expected behavior?
No response
Additional information
No response