Skip to content

fix(installer): silence cosmetic launchd boot-out error on fresh install - #570

Merged
jlong merged 1 commit into
mainfrom
jlong/installer-suppress-cosmetic-launchd-boot-out-no-such-process-error-on-fresh-install
Aug 16, 2026
Merged

fix(installer): silence cosmetic launchd boot-out error on fresh install#570
jlong merged 1 commit into
mainfrom
jlong/installer-suppress-cosmetic-launchd-boot-out-no-such-process-error-on-fresh-install

Conversation

@jlong

@jlong jlong commented Aug 16, 2026

Copy link
Copy Markdown
Owner

Task

The installer runs launchctl bootout to unload any previously-running daemon before it bootstraps the new one, so upgrades replace cleanly. On a fresh install (or any time the daemon isn't currently loaded) bootout has nothing to unload and exits with Boot-out failed: 3: No such process. This looks like a real error to the user even though it's benign: the install proceeds correctly and the daemon ends up running.

Current Behavior

Fresh install prints a scary-looking line mid-run:

==> registering daemon with platform supervisor
Boot-out failed: 3: No such process
✓ installed launchd agent at /Users/<u>/Library/LaunchAgents/dev.shelbi.daemon.plist
  ...
  daemon should now be running — verify with `shelbi daemon status`

launchctl bootout returns exit code 3 ("No such process") because there was no loaded daemon to boot out. The install still succeeds and shelbi daemon status reports the daemon running.

Expected Behavior

On a fresh install (nothing loaded), the boot-out step is a no-op with no error line — optionally an informational note like no existing daemon to stop. On an upgrade (daemon already loaded), the old daemon is still stopped before the new one is bootstrapped, exactly as today.

Technical Details

The fix is in scripts/install.sh around the daemon-registration step. Tolerate the "no such process" case rather than letting it surface as an error, e.g. guard the bootout (launchctl bootout ... 2>/dev/null || true) or check the load state first (launchctl print / list) and only boot out when a daemon is actually loaded. Keep the upgrade path (stop-then-bootstrap) working.

Note: scripts/install.sh is a Zen danger path, so this will not auto-merge — it will be surfaced for John's review at handoff.

Acceptance Criteria

  • A fresh install (no daemon currently loaded) does not print Boot-out failed: 3: No such process (or any error-looking line) for the boot-out step.
  • The boot-out step optionally prints a clear informational note when there is nothing to stop, instead of an error.
  • The upgrade path (daemon already running) still stops the old daemon before bootstrapping the new one — no stale daemon left loaded.
  • After install, shelbi daemon status reports the daemon running in both the fresh-install and upgrade cases.

Auto-opened by Shelbi — review at: /Users/jlong/.shelbi/projects/shelbi/tasks/installer-suppress-cosmetic-launchd-boot-out-no-such-process-error-on-fresh-install.md

The daemon-registration step printed "Boot-out failed: 3: No such
process" mid-install, which looks like a real error even though the
install proceeds correctly and the daemon ends up running.

Key decision — the fix is NOT in scripts/install.sh (as the task
suggested), because install.sh only calls `shelbi daemon install`; it
never runs launchctl directly and can't selectively suppress one line
of that subcommand's stderr without hiding genuine errors. The scary
line comes from Rust: the primary bootout in `bootstrap_launchd`
already nulls stdout/stderr, but `migrate_legacy_launchd` ran
`launchctl bootout` with `.status()`, inheriting stderr. When no
legacy-labeled daemon is loaded — every fresh install, and every
upgrade that isn't from a pre-rename version — that bootout exits 3
and prints the "No such process" noise. Fixed at the source by nulling
its stdout/stderr, matching `bootstrap_launchd`.

Upgrade path is unchanged: the bootout still runs (now silently), so a
loaded legacy daemon is still retired before the new one bootstraps.
`shelbi daemon status` reports the daemon running in both cases.

Note: this lands in crates/, not the scripts/install.sh Zen danger
path the task anticipated — so the danger-path review gate won't fire.
Flagging here so the reviewer knows the root cause moved.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
shelbi Ready Ready Preview Aug 16, 2026 7:09pm

Request Review

@jlong
jlong merged commit 192cf32 into main Aug 16, 2026
3 checks passed
@jlong
jlong deleted the jlong/installer-suppress-cosmetic-launchd-boot-out-no-such-process-error-on-fresh-install branch August 16, 2026 19:55
@jlong
jlong restored the jlong/installer-suppress-cosmetic-launchd-boot-out-no-such-process-error-on-fresh-install branch August 16, 2026 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant