Skip to content

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

Closed as duplicate

Description

@lssuzie

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.

Activity

  1. added
    bug
    app
    on Jun 12, 2026
  2. github-actions commented on Jun 12, 2026

    @github-actions
    Contributor
  3. lssuzie commented on Jun 12, 2026

    @lssuzie
    Author

    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!

  4. polhenarejos commented on Jun 16, 2026

    @polhenarejos

    Still happening with Version 26.609.71450 • Released Jun 16, 2026

  5. lssuzie commented on Jun 17, 2026

    @lssuzie
    Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appbugperformance

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions