macOS code_sign_clone directories leak ~1GB per launch, never cleaned up

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

Bug description

Every time Codex launches on macOS, the system's codesign tool creates a temporary clone of the entire .app bundle under /private/var/folders/.../X/com.openai.codex.code_sign_clone/ with a random suffix (e.g., code_sign_clone.fk1vAZ). Each clone is ~1GB.

These directories are never cleaned up. After a few days of regular use, I had 35 stale clones consuming 35GB of disk space.

Steps to reproduce

  1. Launch Codex on macOS
  2. Check ls /private/var/folders/*/X/com.openai.codex.code_sign_clone/
  3. Observe a new \code_sign_clone.XXXXXX` directory is created each launch
  4. Previous directories are never removed

Expected behavior

Old code_sign_clone directories should be cleaned up on exit or at startup (before creating a new one).

Environment

  • macOS (Apple Silicon)
  • Codex desktop app

Workaround

Manual cleanup: rm -rf /private/var/folders/*/X/com.openai.codex.code_sign_clone/code_sign_clone.* (keep the newest one if Codex is running).

Note

Chrome has the same issue with com.google.Chrome.code_sign_clone, so this may be a Chromium/Electron-level behavior. If so, consider adding a startup cleanup hook to remove stale clones from previous sessions.

View original on GitHub ↗

4 Comments

github-actions[bot] contributor · 2 months ago

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

  • #26797
  • #27536

Powered by Codex Action

lssuzie · 2 months ago

Closing as duplicate of #26797 and #27536. Confirmed this is a known issue - 35GB leaked after just a few days of use. Looking forward to a fix!

polhenarejos · 2 months ago

Still happening with Version 26.609.71450 • Released Jun 16, 2026

lssuzie · 2 months ago

Thanks for confirming! Reopening this since the fix hasn't landed yet.