macOS: code_sign_clone grows unbounded (62 GB+) across Codex auto-updates

Resolved 💬 10 comments Opened Jun 11, 2026 by VincentAdamNemessisX Closed Jun 17, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

Summary

On macOS, the Codex desktop app (Electron) accumulates a massive code_sign_clone directory in the system temp folder that is never cleaned up. Over time this can consume 62 GB or more of disk space without the user realizing it.

Environment

  • macOS: 26.6 (25G5028f)
  • Codex version: 26.608.12217 (build 3722)
  • Architecture: Apple Silicon (aarch64)

Location

/private/var/folders/<hash>/X/com.openai.codex.code_sign_clone

Root Cause

macOS creates a code signing clone under /private/var/folders/.../X/ for signed Electron apps. When the app auto-updates frequently (as Codex does), macOS retains old signing data but does not aggressively prune it. Because Codex.app is ~1 GB and updates are frequent, this directory grows to tens of gigabytes over weeks of normal use.

Reproduction

  1. Use Codex desktop for several weeks with auto-update enabled.
  2. Run: du -sh /private/var/folders/*/X/com.openai.codex.code_sign_clone
  3. Observe 10-60+ GB consumed.

Suggested Fix

  • On app startup or after a successful update, remove or invalidate stale entries in the code_sign_clone directory.
  • Alternatively, reduce the frequency of full app binary replacements during updates (e.g., use delta updates or a stable binary wrapper that loads updated JS bundles without replacing the signed executable).

Workaround

Users can safely delete the directory:

rm -rf /private/var/folders/*/X/com.openai.codex.code_sign_clone

macOS will regenerate the current version's signing data on next launch (~few hundred MB).

Impact

This is a silent disk space leak. Users see "Codex: 75 GB" in macOS Storage settings but cannot find where the space is consumed because the path is hidden in system temp folders. Users with smaller SSDs may hit disk-full conditions without understanding the cause.

View original on GitHub ↗

10 Comments

github-actions[bot] contributor · 1 month ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #26797

Powered by Codex Action

singularitti · 1 month ago

This happens to me, too! Can I delete them?

polhenarejos · 1 month ago

Same here. I deleted them manually and nothing weird happened, so it seems safe.

But it is not only on auto-updates, but also by just closing and reopening the app, without any update in between.

VincentAdamNemessisX · 1 month ago
This happens to me, too! Can I delete them?

Yes, you can delete them by codex safety, but only should keep latest.

VincentAdamNemessisX · 1 month ago
Same here. I deleted them manually and nothing weird happened, so it seems safe. But it is not only on auto-updates, but also by just closing and reopening the app, without any update in between.

Got it, I will close it.

jordanade · 1 month ago

Another day, another discovery of a multi-gigabyte shit that Codex took on my drive. Absolutely outrageous.

jakintosh · 24 days ago

I feel like two people reported this issue, @polhenarejos and @VincentAdamNemessisX , and then both of them closed their issues thinking the other issue was live. Is there no longer an active issue tracking this? I just found a 30GB code signing bundle today, so it doesn't seem to be resolved.

singularitti · 24 days ago

Hi @jakintosh, I just found the app hasn't created anything since yesterday. Can you update it to the latest version to see if it's the same for you? Like version 26.623.41415?

jakintosh · 24 days ago

@singularitti Actually, yes, I just opened it now and saw I was on Jun 23rd version, opened/closed twice and it generated the files, then updated, and it stopped. The latest version between 6/23 and today did actually seem to fix this.

singularitti · 24 days ago

So it's not just me, great! I actually saw this since version 26.623.31921, but I was unsure. I appreciate their efforts, since this is not specific to the Codex app; other apps have this issue, too.