Skip to content

[Bug]: ocx status says Desktop Start at Login "could not be verified" when the LaunchAgent is registered but not yet loaded #6948

Closed

Description

@lidge-jun

Client or integration

Other

Area

Service lifecycle

Summary

ocx status on a Desktop-supervised macOS install reports Restart safety: AT RISK after restart (OpenCodex Desktop runs this proxy, but its Start at Login could not be verified; turn it on in the OpenCodex menu), although ~/Library/LaunchAgents/OpenCodex.plist exists with exactly the expected contents (Label OpenCodex, ProgramArguments [/Applications/OpenCodex.app/Contents/MacOS/opencodex-desktop, --autostart], RunAtLoad true).

macLoginRegistration in src/service/desktop-startup.ts also requires launchctl print gui/<uid>/OpenCodex to succeed. A LaunchAgent written after the current login (for example, the app was installed or Start at Login was turned on during this session) is not loaded until the next login, so launchctl print answers Could not find service "OpenCodex". The registration is valid and will start the app at the next login, but status tells the user to turn on a setting that is already on.

Reproduction

  1. On macOS, install OpenCodex.app during a login session and let it register Start at Login (or toggle it on).
  2. plutil -p ~/Library/LaunchAgents/OpenCodex.plist shows the expected agent.
  3. launchctl print gui/$(id -u)/OpenCodex → Could not find service "OpenCodex" in domain for user gui: 501.
  4. ocx status → "Start at Login could not be verified; turn it on in the OpenCodex menu".

Expected: distinguish "registered, takes effect at next login" from "not registered", and do not tell the user to turn on a setting that is already on.

Version

2.83.0 (OpenCodex Desktop, macOS)

Operating system

macOS 26.6 arm64 and macOS 27 arm64

Provider and model

No response

Logs or error output

Restart safety: AT RISK after restart (OpenCodex Desktop runs this proxy, but its Start at Login could not be verified; turn it on in the OpenCodex menu)

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

  1. added
    cliCLI, config inject, packaging flags
    serviceService lifecycle (WinSW/launchd/scheduler)
    on Oct 11, 2026
  2. lidge-jun commented on Oct 11, 2026

    @lidge-jun
    OwnerAuthor

    Fixed on dev by #6954 (squash 862b8f1). Exact-head CI on 55f665e was green (PR CI and Cross-platform CI lane=all 38147206772); an independent review passed on that head.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcliCLI, config inject, packaging flagsserviceService lifecycle (WinSW/launchd/scheduler)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions