Nothing here yet.
Nothing here yet.
Thanks, glad that detail was useful. The generation counter guards against one specific thing: after a restart, a late frame or termination callback from the previous core process could otherwise land on the new session, for example failing its pending requests or resolving one with a stale reply. Everything carries the generation it was created under, so anything from an old process is just dropped. On your question: the core does a bit of both, though nothing as thorough as restoring state at boot. When the host disappears, the watchdog cancels the shared shutdown token first, so in-flight tasks get about a second to stop before the process exits. Language servers are started in their own process group, so stopping a language session takes their children down with it. For session files, the store doesn't try to finish a half-done write. On the next open, it trims an incomplete trailing JSONL line back to the last complete record, and the files that get rewritten whole are written to a temp file and renamed into place. I'm curious about your restore-at-boot path: how does the root helper know what it changed before it was killed? Do you keep a journal on disk, or recompute it from the system state?