Expand description
Process identity probing, the pid sentinels and the per-side liveness rules.
Structs§
- Sentinel
<pid>:<boot_id>:<starttime>.- System
Probe
Enums§
Constants§
- STARTING_
MS 🔒 - A side with no sentinel yet is
startingfor this long after its clock origin.
Traits§
Functions§
- boot_
matches - Exact on POSIX; within 120 s on Windows.
- boot_
matches_ windows - Windows boot values are epoch seconds truncated to the minute; clock adjustments drift them, a reboot moves them by far more: equal within 120 s.
- days_
from_ 🔒civil - highest_
tui_ 🔒generation - The highest generation that has a
tui-pidfile. - mtime_
ms 🔒 - pair_
file 🔒 - parse_
boot_ output - The PowerShell boot expression’s stdout as a boot value: digits only, else
None. - parse_
kern_ boottime sysctl -n kern.boottime-> epoch seconds (thesec = Nfield).- parse_
lstart ps -o lstart=output (Sun Oct 18 12:34:56 2026, no zone) parsed as UTC to epoch seconds. Callers runpswithTZ=UTC.- parse_
proc_ stat_ starttime - Field 22 of a
/proc/<pid>/statline: the 20th whitespace-separated token after the last)(the comm field may itself contain)and spaces). - rebind_
on_ spawn - An MCP server that starts under
OPENCODE_CTL_PAIR: unlessclaude-pidnames an alive process, dropclaude-exitedanddead-seenand writeclaude-pidfrom the parent process. - remove_
if_ 🔒present - sentinel_
alive - The pid exists, its boot value matches and its start time is exactly the sentinel’s.
- sentinel_
state 🔒 - side_
liveness - One side’s liveness, re-derived from the files on every call (spec Pairing, liveness values).
- starting_
or_ 🔒unknown startingwhile the clock origin is younger than 30 s, elseunknown(also without an origin).- sweep_
stdout_ dirs - Delete
<home>/stdout/<pid>-<starttime>directories whose process is dead or whose start time differs from the live process’s (a reused pid). Names of any other shape are left alone. Returns the directories removed.