Repository navigation
[Bug][Linux] doctor flags a desktop-owned runtime with Start at Login as AT RISK and recommends the refused 'ocx service repair' #6667
Description
Client or integration
Codex App
Area
Platform (Windows / macOS / Linux)
Summary
On Linux, when the OpenCodex desktop app owns the runtime and "Start at Login" is on, ocx doctor still reports Codex restart safety: AT RISK and tells the user to run ocx service repair, a command that is refused while the desktop app owns the runtime.
Desktop startup detection is macOS-only:
src/service/desktop-startup.ts:desktopStartupOwnership()anddiagnoseMacDesktopStartup()both returnundefinedwhenplatform !== "darwin".src/codex/autostart-health.ts:desktopEffectiverequiresinputs.platform === "darwin", soprotectioncan never be"desktop"on Linux.
Because desktop is undefined, the classifier also skips the health.desktop?.owned branch ("reopen OpenCodex and check Start at Login"). It falls through to the generic service message, and recommendedCommand becomes ocx service repair instead of null.
The Linux desktop app already registers a login item: tauri-plugin-autostart writes ~/.config/autostart/OpenCodex.desktop with --autostart. After a reboot, the app started ocx start --port 10100 at login, and that proxy served Codex normally.
Expected: on Linux, a desktop-owned runtime with a valid XDG autostart entry for this install is reported as protected by desktop app at login, as it is on macOS. If that can't be verified, doctor should at least show the desktop-owned hint ("reopen OpenCodex and check Start at Login") instead of recommending ocx service repair.
Reproduction
- Linux (GNOME),
.debinstall, withopencodex-proxy.serviceinstalled. - Open the OpenCodex desktop app and approve the runtime takeover. Leave "Start at Login" on (
~/.config/autostart/OpenCodex.desktopexists). - Reboot and log in. The app starts the proxy. The service unit starts, then stands down with "the desktop app owns the runtime".
- Run
ocx doctor. - Restart safety shows AT RISK and recommends
ocx service repair. Running it is refused with "Background service repair stopped: the desktop app owns the runtime".
Version
2.78.0 (.deb); code paths above are unchanged on dev at 2.79.0
Operating system
Ubuntu 26.04.1 LTS, GNOME Shell 50.1 (Wayland)
Provider and model
No response
Logs or error output
Codex restart safety
!! AT RISK after restart (installed service is disabled, stopped, or unhealthy; run 'ocx service repair')
routing=opencodex-local, service=installed-but-unhealthy, shim=absent
Hints
- Codex is pinned to the local proxy without persistent startup protection. After restart, requests can reconnect indefinitely. Run 'ocx service repair'.
# ~/.opencodex/service.log at boot
❌ Background service start stopped: the desktop app owns the runtime (install <id>, consent generation 2).
The service registration was left exactly as it is — not re-enabled, not rewritten and not restarted.
Quit the desktop app and run 'ocx service install' to hand the runtime back to this CLI.Screenshots and supporting files
No response
Redacted configuration
No response
Checks
- I searched existing issues and documentation.
- I removed secrets, tokens, account details, request credentials, and personal data.
Activity
lidge-jun commentedon Oct 6, 2026
Fixed on dev by #6679 (merge 66a5c9f): ocx doctor now credits a Linux desktop-owned runtime with Start at Login as restart protection when the autostart entry is unambiguous, and no longer recommends the refused ocx service repair. Ships with the next release cut from dev.