---
name: project_psyche_wrapper_liveness
description: "psyche perch liveness = wrapper alive, not inner-poll pid; poll survives /clear intact"
metadata: 
  node_type: memory
  type: project
  originSessionId: 7be4ce85-768a-4b0d-81af-a624657640f4
---

Two recurring live-agent post-/clear misbehaviors — debug/post-clear-poll-psyche-misread.

**P1 (real code bug, fixed):** A wrapper-owned psyche perch carries a numeric `pid` (the
INNER poll subprocess) and NO `parent_pid` (types.rs:182-186). While the wrapper is blocked
ingesting a commune (running a `claude` resume), the inner poll has exited → pid reads dead,
no parent fallback → liveness checks fail → the Psyche DISAPPEARS from `$OWL list`, and
`$LIVE list-psyches` soft-cleans its `ready` sentinel → wrapper exits on next poll ("ready
file gone before poll, exiting") → Psyche dead for good. **Fix:** the WRAPPER is the liveness
authority — `is_wrapper_alive(<id minus -psyche>)` now forces ONLINE and skips the
destructive soft-clean in both `list_filter::collect` and `list_psyches`. Regression:
`live_wrapper_keeps_busy_psyche_online_and_ready_intact`.

**P2 (instructional, fixed in resume.rs reorientation):** the poll listener survives `/clear`
INTACT and keeps delivering — the agent should do NOTHING (no kill, no re-arm, no new
listener). A DUPLICATE/COLLISION on a re-arm attempt is PROOF it's alive, not "stale". Never
`$LIVE stop` to clear a "stale" listener — that tears down the Psyche. Also: `pid:"BUSY"` =
ONLINE (mid-delivery), not dead — every liveness check in the binary treats BUSY as alive.

**Why:** both were me (the agent) misreading my own healthy state and tearing things down.
**How to apply:** when a live agent reports its Psyche "offline/missing" or its poll "stale"
after /clear, suspect the reading, not the system; do not stop/revive reflexively. NOTE: this
corrects an earlier deleted memory that wrongly claimed the post-/clear listener is
"orphaned" and must be killed+re-armed — that was the /self-clear path, not plain /clear.
Related: [[project_self_clear_wake_typed_prompt]].
