`happy daemon install` appears to generate a macOS plist for a non-existent `happy-daemon` entrypoint
Summary
happy daemon install appears to generate a macOS launchd plist that targets a happy-daemon entrypoint, but the installed happy-coder package does not expose a matching executable or CLI subcommand.
This makes the built-in daemon installation path look inconsistent and likely non-functional in happy-coder 0.13.0.
This is separate from feature request #434. That issue asks for launchd/systemd support in general. This issue is about the current built-in macOS install implementation appearing to generate an invalid service definition.
Environment
- Happy CLI version: 0.13.0
- Install method: global install via Homebrew/npm package
happy-coder - OS: macOS darwin arm64
- Node.js: v25.9.0
What I Observed
In the installed 0.13.0 package:
-
happy daemon installexists and requiressudo -
the macOS install implementation writes a plist under
/Library/LaunchDaemons/com.happy-cli.daemon.plist -
that plist uses
ProgramArgumentsending in:<string>happy-daemon</string> -
the same implementation also sets:
<key>HAPPY_DAEMON_MODE</key> <string>true</string> -
however, the installed package only exposes these binaries:
happyhappy-mcp
-
I could not find a separate
happy-daemonexecutable in the installed package -
I also verified that running
happy happy-daemondoes not enter daemon mode; it behaves like an unknown/default CLI path rather thandaemon start-sync -
the installed bundle appears to identify daemon mode from argv matching
daemon start-sync, not fromhappy-daemonorHAPPY_DAEMON_MODE
Expected Behavior
One of the following should be true:
-
happy daemon installshould generate a launchd plist that invokes a real daemon entrypoint, such as:happy daemon start-sync -
or the package should expose a real
happy-daemonexecutable/subcommand that enters daemon mode correctly
Actual Behavior
The built-in macOS install path appears to generate a plist that references an entrypoint that is not present in the installed package.
As a result, happy daemon install looks unsafe to rely on as the official persistent-daemon setup path.
Why This Matters
- users may assume the built-in install command is the recommended production path
- if the generated plist targets a non-existent or non-daemon entrypoint, persistent daemon setup will fail or behave unpredictably
- this is especially confusing because there is already an open request for official launchd support, and 0.13.0 appears to ship an implementation that may not actually match the runtime entrypoints
Workaround
A manual LaunchAgent / launchd setup that runs:
happy daemon start-sync
seems more consistent with the runtime behavior than relying on happy daemon install.
Additional Notes
If maintainers investigate this area, there may also be a second macOS-specific concern:
- the generated plist is written to
/Library/LaunchDaemons - its stdout/stderr paths are derived from
os.homedir()
Depending on how the service runs under launchd, that may resolve to a system/root home rather than the intended user home. I did not verify this separately, so I am mentioning it only as a possible follow-up concern, not as the primary bug in this issue.
Related issue: #967
I opened that separately because it looks like a different user-facing bug in the session startup path:
happy codexcan start a usable session without ensuring the daemon is already running- as a result, the session is not daemon-tracked unless the daemon was started manually first
Keeping them separate should make triage easier:
- #967:
happy codexmissing daemon bootstrap - this issue:
happy daemon installmay generate a macOS service definition that points at a non-existent daemon entrypoint
I can reproduce this on Windows and the behavior looks consistent with a CLI-side daemon startup gap rather than only a web UI issue.
Environment
- OS: Windows
- Shell:
cmd - Happy CLI:
0.12.0 - Node.js:
v22.15.1
Repro
- Run
happy codex - Open
https://app.happy.engineering/new - Web app shows
No active sessions - Send button is disabled/greyed out
Diagnostics
happy doctor reports:
Authenticated (credentials found)
Daemon is not running
No happy processes found
Codex log shows the session starts, but reporting to daemon fails:
[START] Reporting session ...
[CONTROL CLIENT] No daemon running, no state file found
[START] Failed to report to daemon (may not be running): No daemon running, no state file found
In another run I also saw:
[CONTROL CLIENT] Daemon is not running, file is stale
[START] Failed to report to daemon (may not be running): Daemon is not running, file is stale
Additional investigation
From the installed CLI code, the default happy / Claude path ensures the daemon is running before launching the session, but the happy codex path appears to call runCodex(...) directly without the same daemon startup step.
That matches what I am seeing locally:
- Codex session starts
- daemon is not started
- session cannot be reported
- Web/App shows no active session
If useful, I can also open a PR for the codex entrypoint to reuse the same daemon ensure/start logic as the Claude path.