chenhg5/cc-connect · error

restart kickstart: %w

Error message

restart kickstart: %w

What it means

Restart completed the bootout/bootstrap cycle but the final launchctl kickstart -kp (kill and restart the service) failed. Wraps the exec error so callers know the service may still be running the old binary or be stopped.

Source

Thrown at daemon/launchd.go:157

	// launchd bootout is asynchronous; retry bootstrap with backoff
	// to avoid "Bootstrap failed: 5" race condition.
	var out string
	var err error
	for i := 0; i < 3; i++ {
		if i > 0 {
			time.Sleep(500 * time.Millisecond)
		}
		out, err = runLaunchctl("bootstrap", domain, plistPath)
		if err == nil {
			break
		}
	}
	if err != nil {
		return fmt.Errorf("restart: %s (%w)", out, err)
	}
	if _, err := runLaunchctl("kickstart", "-kp", target); err != nil {
		return fmt.Errorf("restart kickstart: %w", err)
	}
	return nil
}

func (*launchdManager) Status() (*Status, error) {
	st := &Status{Platform: "launchd"}

	plistPath := launchdPlistPath()
	if _, err := os.Stat(plistPath); err != nil {
		return st, nil
	}
	st.Installed = true

	_, _, out, ok := loadedLaunchdTarget()
	if !ok {
		return st, nil
	}

View on GitHub (pinned to 4000b2338a)

Solutions

  1. Check the service's log files for the startup failure
  2. Verify plist program/program-arguments are still valid
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at daemon/launchd.go:157 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of chenhg5/cc-connect@4000b2338a (2026-09-06). Data as JSON: /api/errors/6ca3f065de46ed16. Report an issue: GitHub.