Skip to content

The agent that grows with you

fix(scratch): a clock step no longer makes a detached prune disown the launcher shell

Teknium1df275cf63df
diff --git a/hermes_constants_scratch.py b/hermes_constants_scratch.py
index bce8b7cd4c8..dc495718767 100644
--- a/hermes_constants_scratch.py
+++ b/hermes_constants_scratch.py
@@ -205,7 +205,9 @@ def _own_lineage() -> set[int] | None:
pass
for pid, started in _launcher_lineage:
with contextlib.suppress(psutil.Error, OSError):
- if psutil.Process(pid).create_time() == started:
+ # Tolerance, as for the spawn ledger: Linux create_time adds a whole-second boot time
+ # psutil re-reads per call, which moves when the clock steps (NTP, resume, VM sync).
+ if abs(psutil.Process(pid).create_time() - started) < 2.0:
pids.add(pid)
return pids