[Bug] macOS app leaves code_sign_clone directories after quit (~965MB per launch)
What version of the Codex App are you using (From “About Codex” dialog)?
Codex App 26.527.60818 (ChromiumBaseVersion 148.0.7778.179)
What subscription do you have?
Unknown / not relevant to this issue
What platform is your computer?
Darwin 24.6.0 arm64 arm
What issue are you seeing?
Every time I launch and quit the Codex macOS app, a new directory is left under:
/private/var/folders/.../X/com.openai.codex.code_sign_clone/code_sign_clone.*
Each clone is about 965 MB. After launching/quitting Codex multiple times, these directories keep accumulating. On my machine after several app restarts:
clone dirs: 7
6.5G /private/var/folders/.../X/com.openai.codex.code_sign_clone
The directories disappear after reboot because macOS cleans the /var/folders/.../X temp area.
This looks related to Chromium's MacAppCodeSignClone / code_sign_clone mechanism. Clone creation itself may be expected, but inactive clone dirs are not cleaned up after the app quits. I also observed orphaned helper processes after quitting Codex, including multiple browser_crashpad_handler processes and SkyComputerUseService processes with PPID=1.
What steps can reproduce the bug?
- Launch
/Applications/Codex.app. - Quit Codex.app.
- Check the clone directory:
find /private/var/folders/*/*/X/com.openai.codex.code_sign_clone -maxdepth 1 -type d -name 'code_sign_clone.*' 2>/dev/null | wc -l
du -sh /private/var/folders/*/*/X/com.openai.codex.code_sign_clone 2>/dev/null
pgrep -fl 'Codex|node_repl|SkyComputerUse|app-server|browser_crashpad_handler'
- Repeat launch/quit several times.
Observed: each launch creates another code_sign_clone.* directory, and old inactive clone dirs remain after quitting.
What is the expected behavior?
After Codex quits, inactive code_sign_clone.* directories should be removed by the code-sign-clone cleanup helper. Repeated launch/quit cycles should not keep adding ~965 MB per launch until reboot.
Additional information
I checked that this does not appear to be caused by my Codex config.toml. The issue appears to be in the macOS app / Chromium app lifecycle cleanup.
The active clone may be held by the running Codex process, but old clone directories were not held by open file handles when checked with lsof +D. This suggests cleanup is not being triggered or is not completing for inactive clones.
13 Comments
Additional sanitized confirmation from another macOS machine:
26.602.4072415.7.x/private/var/folders/<redacted>/<redacted>/X/com.openai.codex.code_sign_clone/code_sign_clone.<suffix>/Codex.app.bundle76.5G943M-962M, roughly matching the installedCodex.appbundle size26.527.*,26.601.*,26.602.*) and Chromium framework versions (148.0.7778.179,149.0.7827.54)com.openai.codex.code_sign_clonewere found withlsofat the time of inspectionThis supports the existing diagnosis that inactive macOS Chromium code-sign clone directories are accumulating across launches/updates and are only reclaimed when macOS clears
/var/folders/.../Xon reboot. The impact can be material on low-free-space machines: in this case the stale Codex clone directory was several GB and large enough to contribute to unrelated Docker failures from low disk headroom.No machine-specific temp token, username, workspace path, process ID, or session identifier is included here.
Additional confirmation from another macOS machine:
Clone path pattern:
In my case, the stale clone directory grew to about 16GB:
The output of
dushows multiplecode_sign_clone.*directories, each containing a copiedCodex.app.bundle:/private/var/folderswas taking about 17GB, and almost all of it came fromcom.openai.codex.code_sign_clone.I also checked with
lsof, and no open file handles were found undercom.openai.codex.code_sign_cloneat the time of inspection.This seems to support the existing diagnosis that inactive macOS code-sign clone directories are accumulating across launches/updates and are not being cleaned up promptly.
The impact can be significant on low-free-space machines, since the stale Codex clone directory alone took about 16GB in my case.
No machine-specific temp token, username, workspace path, process ID, or session identifier is included here.
my file has grown up to 125GB!!!
<img width="400" height="96" alt="Image" src="https://github.com/user-attachments/assets/373e609a-cf46-40d6-af40-b40dbfc7215d" />
Additional confirmation from another macOS machine, this time with a much larger accumulation on a current Codex build.
Observed path pattern:
Disk usage before manual cleanup:
App Cleaner also attributed the Codex app removal set to roughly
153G/42.5Kitems. The bulk was not~/Library/Application Support/Codex,~/.codex, or the app bundle itself; it was theX/com.openai.codex.code_sign_clonetree.A size-ranked scan showed the stale clone tree dominating all Codex/OpenAI-named paths:
lsof +Dshowed only one currently active clone held by the running Codex process:I then removed the inactive clone directories while keeping the one active clone. After cleanup:
So in this case,
103stale clones accounted for roughly128Gof reclaimable space. The current running process needed only one clone. This strongly suggests the cleanup path for inactive macOS code-sign clones is still not running reliably after Codex launches/updates/quits.This is especially painful because GUI uninstall/cleaner tools surface it as Codex taking 150GB+, and using those tools risks deleting unrelated Codex data/projects unless the user manually inspects the paths.
No machine-specific temp token, username, workspace path, or session identifier is included here.
Same issue here on macOS 26.5.1 ... 13GB wasted in just a few days just for this issue.
<img width="615" height="318" alt="Image" src="https://github.com/user-attachments/assets/ef1e549c-472f-489b-af7d-8cff2f45db7c" />
Vibe coding is terrible 😆 this is yet another way for Codex to waste disk space... See https://github.com/openai/codex/issues/25921
I added a local macOS cron workaround for this.
The workaround runs hourly and cleans up leaked Codex code-sign clone directories under:
/private/var/folders/*/*/X/com.openai.codex.code_sign_clone/code_sign_clone.*It keeps the newest birth-time group in each Codex temp parent and deletes only strictly older
code_sign_clone.*directories. If multiple clone dirs have the same newest birth time, I keep all of them instead of guessing which one is safest to remove.Cron entry:
Script:
I tested it against the real leaked directories on my machine. With three clone dirs present, it kept the newest one and removed the older two. A later dry run with one remaining clone dir reported that it would keep it.
Thanks for this issue opening. I finally know where my disk space gone.
<img width="399" height="141" alt="Image" src="https://github.com/user-attachments/assets/677474a5-f7cb-4a17-b0ff-f70ff523dc8c" />
Same issue here:
<img width="274" height="94" alt="Image" src="https://github.com/user-attachments/assets/c1a6d253-aaa1-4a92-b35d-c151590bb3a0" />
It took up over 23GB
Please someone fix this, had to make a LaunchAgent that looks for old clones in order to clean them
PS: This wouldn't happen if the app is open source :D
I can reproduce this on another Mac, and the impact is larger after several days of normal use.
Environment:
Current Codex clone usage:
Codex clone count:
The Codex clone directories have mtimes across June 16-24, 2026, with several created on June 22-24. This matches the report: repeated app launches leave inactive
code_sign_clone.*directories behind instead of cleaning them up, and it can consume tens of GB without the user installing anything.Can confirm this issue as well, I've had to clean up space on my Mac multiple times, and the Codex app is always one of the biggest offenders, taking up gigabytes due to this.
Can confirm. I started to cleanup my 512GB macbook constantly because of this. I delete these directories and they come back as 30-50-sometimes even 70 GB.
This file takes up over 70 GB of disk space.