Load app-bundled internal hooks from Codex Desktop
Summary
- load hooks for every
openai-bundledplugin exclusively from the matching plugin in Codex Desktop resources - make app-bundled hooks forced and trusted, hide them from ordinary hook review UI, and suppress normal started/completed notifications while retaining telemetry
- share a small Desktop resource locator with
codex appso standalone CLI use can find an installed distribution too
Trust boundary
Trusted hooks load only from the installed Codex Desktop distribution or the Resources path provided by the Desktop launcher.
The openai-bundled marketplace selects this fail-closed path, it does not make cached files trusted. Codex requires a matching marketplace entry, local plugin source, and manifest within the canonicalized Desktop Resources root. If discovery or validation fails, the plugin contributes no hooks. Cached hook declarations are never used as a fallback.
For standalone use, macOS locates the stable Codex app through LaunchServices, while Windows resolves supported MSIX identities through InstallLocation without assuming a WindowsApps path. codex app now reuses this discovery path instead of maintaining its own weaker heuristic.
Local E2E verification
Verified locally with a temporary openai-bundled plugin:
- Desktop: hook loaded from the app’s
Resourcesdirectory, ran silently, remained forced on and hidden from Hooks settings, and emitted no started/completed notifications - Standalone CLI: the plugin appeared in the
@picker and its hook fired from Resources exactly as it did in Desktop - Trust boundary: a spoofed hook in the writable plugin cache never ran
- Fail closed: after temporarily corrupting the hook configuration in the app’s Resources directory, Codex reported
app_bundled_internal_hook_load_failedand did not fall back to the cached spoof