Client or integration
Codex CLI
Area
Service lifecycle
Summary
After updating OpenCodex (e.g. ocx update to v2.48.0 and v2.49.0) on macOS, the background service fails to automatically restart, leaving the proxy inactive. The operator has to manually run ocx start each time.
Root cause analysis:
- Legacy
launchctl unload <plist> in src/service.ts:installLaunchd() fails to unregister the service from the modern macOS gui/<uid> domain.
- Subsequent
launchctl load -w <plist> emits Load failed: 5: Input/output error to stderr because the job is still bootstrapped.
- The strict
launchctlLoadFailed check (/\b(?:Load|Bootstrap) failed\b/i.test(stderr)) catches this stderr output and throws an uncaught error, aborting ocx service repair with exit code 1.
- The update fallback
startProxyDirectly() fails to bind or exits due to the existing process/lock.
- In addition,
statusLaunchd() uses un-scoped launchctl list | grep ${LABEL}, which returns empty in modern macOS subshells, leading ocx status to falsely report installed, not loaded (launchd).
Reproduction
- On macOS, install and register the background service:
ocx service install.
- Run
ocx update (or upgrade from v2.48.0 to v2.49.0).
- Notice:
opencodex: service refresh failed — starting the proxy directly instead.
Run 'ocx service repair' to see why the background service could not restart.
- Check proxy status or try to connect: no proxy is listening.
- Running
ocx service repair manually fails with:
launchctl could not load /Users/.../Library/LaunchAgents/com.opencodex.proxy.plist: Load failed: 5: Input/output error
A previous job may still be bootstrapped. Try:
launchctl bootout gui/501/com.opencodex.proxy
then re-run 'ocx service repair'.
Version
2.49.0
Operating system
macOS 15.5
Provider and model
Not provider-specific
Logs or error output
launchctl could not load /Users/.../Library/LaunchAgents/com.opencodex.proxy.plist: Load failed: 5: Input/output error
A previous job may still be bootstrapped. Try:
launchctl bootout gui/501/com.opencodex.proxy
then re-run 'ocx service repair'.
Checks
Client or integration
Codex CLI
Area
Service lifecycle
Summary
After updating OpenCodex (e.g.
ocx updateto v2.48.0 and v2.49.0) on macOS, the background service fails to automatically restart, leaving the proxy inactive. The operator has to manually runocx starteach time.Root cause analysis:
launchctl unload <plist>insrc/service.ts:installLaunchd()fails to unregister the service from the modern macOSgui/<uid>domain.launchctl load -w <plist>emitsLoad failed: 5: Input/output errorto stderr because the job is still bootstrapped.launchctlLoadFailedcheck (/\b(?:Load|Bootstrap) failed\b/i.test(stderr)) catches this stderr output and throws an uncaught error, abortingocx service repairwith exit code 1.startProxyDirectly()fails to bind or exits due to the existing process/lock.statusLaunchd()uses un-scopedlaunchctl list | grep ${LABEL}, which returns empty in modern macOS subshells, leadingocx statusto falsely reportinstalled, not loaded (launchd).Reproduction
ocx service install.ocx update(or upgrade from v2.48.0 to v2.49.0).ocx service repairmanually fails with:Version
2.49.0
Operating system
macOS 15.5
Provider and model
Not provider-specific
Logs or error output
Checks