---
name: v0240-stale-seed-hostpid-fix
description: 2026-07-18 gaki-n RCA (relayed by hertz) — STALE_SEED live-relay fail-closed root-caused to dead inherited SPT_HOST_PID; fixed adapter v0.24.0 via Win32 Toolhelp process-tree resolution
metadata: 
  node_type: memory
  type: project
  originSessionId: 01a548be-ed5c-45bf-a7c7-2da0bacbd94c
  modified: 2026-07-18T07:16:36.772Z
---

**RCA (gaki-n, relayed via hertz 2026-07-18, resent after an earlier delivery was lost to a dead SessionStart):** live relay failing closed with `STALE_SEED` was NOT a stale `OWL_SESSION_ID` and NOT an spt-core seed/listen defect. Root cause: a **dead inherited `SPT_HOST_PID` anchor** — a numeric-but-dead PID (env var inherited from a parent/prior process) makes the live relay treat the seed as stale and refuse.

This is the same failure class as the [[v0182-sptc-live-bringup-f034]] tracked follow-up (msys `$PPID`=1 under headless git-bash mis-anchoring both `SPT_HOST_PID` and the SessionStart seed) — v0.18.3 only guarded the `>1` numeric case; a numeric-but-dead (stale, inherited-but-defunct) PID slipped through.

**FIX shipped: adapter v0.24.0** (commit ddc1334, tag 58110a4) — Win32 Toolhelp process-tree resolution replaces the `$PPID`/env-var anchor guess: walks the real process tree to resolve and export the actual `claude.exe` PID.

**Operational recovery is NOT hot-patchable:** updating the adapter alone does not repair an already-running process's environment (the bad `SPT_HOST_PID` is already exported into that shell). Requires a **full Claude process exit + fresh relaunch** after updating to v0.24.0+.

**Residual hardening still open (noted by gaki-n, not yet shipped):** if native Toolhelp anchor resolution fails, the adapter should (1) clear any inherited `SPT_HOST_PID` rather than trust it, and (2) validate anchor **liveness + Claude ancestry** — not just "numeric and >1" (v0.18.3's guard). A dead-but-plausible PID is exactly the gap that caused this.

Related: [[v0182-sptc-live-bringup-f034]] (the earlier, narrower `$PPID`=1 case this generalizes/fixes), [[live-delivery-model-and-dupmsg]].
