# Agent identity bound to parent_pid, not session_id

When a perch is registered, `info.json` records the pid of the Claude Code session that launched it as `parent_pid`. On SessionStart, `session-resume` walks perch info.json files and matches the current process's parent pid against `info.parent_pid`; a match restores the agent's identity (e.g. "you are `ling`").

We chose parent_pid over Claude Code's `session_id` because session_id rotates on `/clear` and across CC crashes, but the CC process — and therefore its pid — survives those events. A background Monitor or Bash task running across a `/clear` outlives the session_id change, so the process tree is the stable handle on "the same logical agent seat." Binding identity to session_id would force the user to manually re-attach SPT every time they cleared context.

Known unhandled edge case: pid reuse on long-running machines could cause a fresh CC session to inherit a parent pid that matches a defunct perch. Not observed in practice and not currently mitigated.
