The generation counter is the detail I would have missed. I went the XPC route for a small root helper in one of my Mac apps, and what bit me there was the mirror of your HOST_PID check: the helper has to notice when the app goes away and undo what it changed, so it restores state when the client drops and again at boot. Does your core only exit when the host dies, or does it also tidy up work it left half done, like a session file mid-write or LSP children still running?
Massimo Yang