Skip to content

A per-home hcoord LaunchAgent label outlives its isolated home #213

Closed

Description

@yansfil

What happened

Running the packaged app (or hcoord daemon start) with an isolated HOME/HCOORD_HOME registers a per-home LaunchAgent label com.hcoord.daemon.<hash> in the user's gui/<uid> launchd domain (B17 of agents/prd/hcoord-plugin/prd.md).
Nothing boots that label out when the isolated home goes away.
During the #207 run, packaged-app QA left ten such labels loaded, each pointing at a deleted /private/tmp/hcqa-final-* plist, until they were booted out by hand.

What you expected

A per-home label has an owner that removes it: a hcoord daemon uninstall (or stop --remove) that boots out and deletes the label for its HCOORD_HOME, used by every QA fixture on all exit paths, and the README's removal command covering per-home labels too.

Steps to reproduce

Observed only through the #207 packaged-app QA; this shorter path is the likely repro and has not been run.

  1. HOME=$(mktemp -d) HCOORD_HOME=$HOME/.hcoord hcoord daemon start, then hcoord daemon stop, then delete the directory.
  2. launchctl list | grep com.hcoord.daemon. still lists the label.

Activity

  1. added
    bug
    on Sep 27, 2026
  2. yansfil commented on Oct 3, 2026

    @yansfil
    ContributorAuthor

    Resolved in PR #363, merged as eab7c1f.

    Private HOME teardown unloads only its exact owned LaunchAgent and retains recovery state when candidate exit or service unload is uncertain. Automatic fixture teardown and Node-managed worker exit use the same cleanup; hcoord daemon uninstall unloads and removes the current home plist while retaining conversation data.

    Evidence: five cleanup boundary regressions, eleven real private-home lifecycle/app checks, independent corrected-head review, and passing verify CI https://github.com/modakbul-gongbang/hide/actions/runs/37145677643 . No operator service was changed. The worker-exit check covers process.exit(23); SIGKILL, OOM and host loss cannot execute a Node exit callback.

  3. added a commit that references this issue on Oct 29, 2026
    ed4d421
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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions