[macOS] Bundled latex.png ships as 0600, causing repeated 100 MiB staging leaks
What version of the Codex App are you using (From “About Codex” dialog)?
26.715.61943 (bundle 5628), installed as /Applications/ChatGPT.app
What subscription do you have?
Paid ChatGPT plan (the issue occurs before authentication and appears unrelated to plan tier)
What platform is your computer?
Darwin 25.5.0 arm64 arm — macOS 26.5.2 (25F84)
What issue are you seeing?
The official macOS app bundle shipped one bundled-plugin resource with mode 0600 and ownership root:wheel:
/Applications/ChatGPT.app/Contents/Resources/plugins/openai-bundled/plugins/latex/assets/latex.png
-rw------- root wheel 14707 bytes
Codex runs as the logged-in user, so every attempt to materialize the bundled plugin marketplace fails while copying the LaTeX plugin:
[BundledPluginsMarketplace] plugin_marketplace_folder_write_failed
ditto: .../plugins/latex/assets/latex.png: Permission denied
folderWritePhase=copy_plugins
Cleanup then fails and leaves the full staging copy behind:
[BundledPluginsMarketplace] plugin_marketplace_folder_remove_failed
errorCode=ENOTEMPTY
removePhase=cleanup_staging_after_write
[BundledPluginsMarketplace] bundled_plugins_marketplace_resolve_failed
errorCode=ENOTEMPTY
Each leaked directory is approximately 101 MiB:
~/.codex/.tmp/bundled-marketplaces/openai-bundled.staging-<UUID>
I observed 376 copies consuming about 37 GiB. After deleting them, I reproduced 14 new copies (about 1.4 GiB) in roughly 27 minutes. The same retry/leak pattern can grow to hundreds of GiB over time.
Only latex.png had the unreadable mode; other files under the bundled marketplace had normal readable permissions.
What steps can reproduce the bug?
- Install/update the official macOS app to 26.715.61943 (5628).
- Check the resource mode:
``bash``
stat -f 'mode=%Sp owner=%Su group=%Sg' \
'/Applications/ChatGPT.app/Contents/Resources/plugins/openai-bundled/plugins/latex/assets/latex.png'
- Start Codex and monitor:
``bash``
watch -n 5 'du -sh ~/.codex/.tmp/bundled-marketplaces; find ~/.codex/.tmp/bundled-marketplaces -maxdepth 1 -name "*.staging-*" | wc -l'
- Inspect the Codex Desktop log for
plugin_marketplace_folder_write_failedandcleanup_staging_after_write. - Observe a new approximately 101 MiB staging directory after each failed retry.
Locally changing only the resource mode fixed the issue:
sudo chmod 0644 '/Applications/ChatGPT.app/Contents/Resources/plugins/openai-bundled/plugins/latex/assets/latex.png'
After that change, the exact ditto --noqtn copy succeeded and the app logged:
plugin_marketplace_folder_write_succeeded
bundled_plugins_runtime_marketplace_written pluginCount=7
plugin_marketplace_sync_completed
No additional staging directories were created after the successful sync.
What is the expected behavior?
- Every bundled marketplace resource should be readable by the user running Codex (for example, regular resource files should ship as
0644). - Marketplace materialization should succeed without requiring local changes inside the signed app bundle.
- Failed materialization should recursively clean its staging directory, or garbage-collect stale staging directories on the next startup.
- Repeated failures should use bounded retries/backoff and must not consume unbounded disk space.
Additional information
This is related to the staging cleanup class reported in openai/codex#21005, but has a concrete macOS packaging trigger: a single unreadable bundled resource. It is also adjacent to bundled marketplace issues such as openai/codex#25758, but this report is not about plugin filtering or configuration overwrite.
Suggested safeguards:
- Normalize/validate permissions for all regular resources during macOS packaging.
- Add a release check that copies the bundled marketplace as a non-root user.
- Make staging cleanup recursive and resilient to partial copies.
- Garbage-collect stale
openai-bundled.staging-*directories before a new attempt.
4 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
I can confirm this issue on Codex desktop 26.715.72359 (build 5718) in a multi-user macOS setup.
Additional trigger details:
/Applications/ChatGPT.appwas owned by local account A while Codex was run by local account B.0600. Reconciliation consistently stopped atContents/Resources/plugins/openai-bundled/plugins/latex/assets/latex.png.Permission denied, then staging cleanup failed withENOTEMPTY.$HOME/.codex/.tmp/bundled-marketplaces/openai-bundled.staging-*directory was about 100 MB. They accumulated to roughly 48 GB in this case.Workaround verification:
Changing only those 11 unreadable static resources from
0600to0644immediately fixed reconciliation. The next focus-triggered reconcile completed without either error, and no new staging directories appeared.This suggests a multi-user installation/update permission trigger in addition to the staging-cleanup leak. Expected behavior would be that app-bundle resources remain readable to other local macOS users, and that failed reconciliation removes staging directories or backs off instead of leaking disk space.
I also submitted the private in-app
/feedbackreport. I can provide sanitized diagnostics or test a future build if useful.This is not a minor cleanup bug. A desktop app must not be able to consume an entire disk because one bundled 14 KB PNG shipped with the wrong mode.
I hit the exact same failure on macOS:
plugin_marketplace_folder_write_failedlatex.png: Permission deniedplugin_marketplace_folder_remove_failedwithENOTEMPTYopenai-bundled.staging-*directories, roughly 100 MB eachThe result on my machine was 1,500 leaked staging directories consuming about 140 GB, leaving only about 400 MB free and pushing the disk to 100%. After manually deleting them, free space jumped to 147 GiB. This caused serious system disruption and could easily lead to corrupted databases, failed builds, or loss of unsaved work.
An unbounded retry loop plus broken cleanup is unacceptable for a desktop application, especially for a background plugin sync that the user did not initiate. The implementation needs more than a packaging permission fix:
openai-bundled.staging-*directories on startup.The current app on my machine is now
26.721.31836, andlatex.pngis0644; no new staging directories have appeared after cleanup so far. But the missing cleanup and unbounded-growth safeguards still need to be fixed, because the next unrelated copy failure can trigger the same disaster again.I had the same issue, and looks like the latest ChatGPT Desktop version fixed it?
Your machine has exactly the reported symptoms:
The affected Codex/ChatGPT build shipped latex.png with permissions that prevented the logged-in user from reading it. Your older logs confirm this exact failure.
Good news: your currently installed version is newer (26.727.51351) and its latex.png now has correct readable permissions. The directory count remained at 405 during my latest check. This suggests the active cause has been fixed by the update, but the update did not garbage-collect the 28 GB already leaked.
With ChatGPT/Codex completely quit, the 405 openai-bundled.staging-* directories can be removed. Do not delete the whole ~/.codex directory—only the abandoned staging directories under .tmp/bundled-marketplaces.