[macOS] Bundled plugin reconciliation causes 30-40s startup delay due to content variant mismatch
[macOS] Bundled plugin reconciliation causes 30-40s startup delay due to content variant mismatch
Summary
The Codex desktop app on macOS experiences a 30-40 second delay on every launch before the Projects sidebar becomes usable. Investigation reveals that browser and chrome bundled plugins are repeatedly classified as outdated and reinstalled on each startup, despite having the correct version number. This occurs because the reconciliation logic compares the transformed unified content variant in the cache against the untransformed source files in the application bundle.
Environment
- App: ChatGPT/Codex desktop
26.721.81911(build5973) - Platform: macOS
25.5.0(Darwin Kernel Version 25.5.0), Apple Silicon (arm64) - Plugins affected:
browser@openai-bundled,chrome@openai-bundled
Reproduction
- Quit Codex completely
- Launch
/Applications/ChatGPT.appnormally - Observe the left sidebar remains in "Loading chats" state
- Projects sidebar becomes usable only after ~30-40 seconds
Consistent reproduction: This happens on every clean launch, not just after updates.
Root Cause
Content Variant Mismatch
The installed plugin cache contains manifests with an added bundledContentVariant field:
Cached manifest (~/.codex/plugins/cache/openai-bundled/browser/26.721.81911/.codex-plugin/plugin.json):
{
"name": "browser",
"version": "26.721.81911",
...
"bundledContentVariant": "unified"
}
Source manifest in application bundle (/Applications/ChatGPT.app/Contents/Resources/plugins/openai-bundled/plugins/browser/.codex-plugin/plugin.json):
{
"name": "browser",
"version": "26.721.81911",
...
// No bundledContentVariant field
}
Why This Causes Repeated Installation
- On installation, the plugin is transformed to the
unifiedcontent variant - The manifest is updated with
"bundledContentVariant": "unified" - Skill files are rewritten to unified content
- On next startup, the reconciliation logic compares:
- Cache: transformed manifest + unified skills
- Bundle: untransformed manifest + original skills
- Same version (
26.721.81911) but different content → classified asoutdated - Plugin is reinstalled, and the cycle repeats
Evidence
File Comparison
# Cached manifest (has bundledContentVariant)
$ cat ~/.codex/plugins/cache/openai-bundled/browser/26.721.81911/.codex-plugin/plugin.json | tail -5
"screenshots": []
},
"bundledContentVariant": "unified"
}
# Source manifest (no bundledContentVariant)
$ cat /Applications/ChatGPT.app/Contents/Resources/plugins/openai-bundled/plugins/browser/.codex-plugin/plugin.json | tail -5
"screenshots": []
}
}
The chrome plugin exhibits the same pattern.
Startup Trace Pattern
From sanitized startup logs (reproduced from original bug report):
window ready-to-show startupElapsedMs=1165
thread/list durationMs=31
bundled_plugins_reconcile_started reason=startup
bundled_plugin_install_requested pluginName=browser reason=outdated
bundled_plugin_install_requested pluginName=chrome reason=outdated
plugin/list durationMs=2484 queueWaitMs=1051
bundled_plugins_reconcile_started queued=true reason=startup
plugin/list durationMs=2319 queueWaitMs=1250
plugin/list durationMs=2343 queueWaitMs=1437
bundled_plugin_install_requested pluginName=browser reason=outdated
bundled_plugin_install_requested pluginName=chrome reason=outdated
plugin/list durationMs=7135 queueWaitMs=0
thread/list durationMs=16
The sidebar populates immediately after the second reconciliation completes, indicating that plugin reconciliation blocks the initial UI render.
Attempted Workarounds
❌ Clearing Plugin Cache
rm -rf ~/.codex/plugins/cache/openai-bundled/browser
rm -rf ~/.codex/plugins/cache/openai-bundled/chrome
Result: Ineffective. Plugins are reinstalled with unified variant on next launch, recreating the same mismatch.
✅ Disabling Plugins (Issue #23277 approach)
[features]
apps = false
plugins = false
Result: Eliminates the startup delay but disables all plugin functionality. Not a viable long-term solution.
Expected Behavior
- Bundled plugin reconciliation should be variant-aware: compare the materialization key/content variant against the installed cache, not raw bundle files
- A plugin with the correct version and current content variant should not be reinstalled
- Plugin reconciliation should not block the initial Projects/thread list render
- Deduplication: the two consecutive reconciliation passes should be consolidated
Suggested Fix
- Make bundled-plugin freshness comparison variant-aware:
- Compare the post-transformation content (unified) against the cache
- OR store and compare the intended content variant key
- Do not classify a plugin as
outdatedsolely because the cached unified manifest/skills differ from raw bundled source when version and variant are current - Decouple the initial
thread/list/Projects sidebar render from bundled-plugin reconciliation - Deduplicate the two startup reconciliation passes
Related Issues
- Issue #23277: Similar plugin initialization delay (18-20s
app/listtime) in Windows/WSL environment
Additional Context
Secondary Performance Issue
During investigation, a secondary bottleneck was discovered: large session history also impacts UI responsiveness.
- Active sessions: 2 sessions, 103MB
- Archived sessions: 277 sessions, 184MB
- Total: 279 sessions, 287MB
While this contributes to slow session list rendering within Projects, it is a separate issue from the plugin reconciliation startup delay.
Desktop vs CLI
This issue is specific to the Codex desktop app. The CLI does not exhibit this startup delay because it does not perform the same bundled plugin reconciliation on every launch.
---
Impact: Every user with Codex desktop 26.721.81911 experiences this 30-40 second startup delay, significantly degrading the launch experience and initial productivity.
1 Comment
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action