fix: wire onSpawn in runChildProcess call#99
Conversation
runChildProcess was called without onSpawn, so Paperclip never received the child PID via persistRunProcessMetadata. heartbeat_runs.process_pid stayed NULL for every Hermes run, breaking the orphan-process reaper liveness check. Verified on ao-sh-derper: every historical Hermes run (including the 39-second AUT-19 run from 2026-04-23) showed process_pid = NULL. Refs: AIW-185
Rebuilds dist/ after merging 10 upstream PRs: NousResearch#138 gate session persistence on success + drop legacy regex NousResearch#116 session-codec format validation NousResearch#102 unwrap Paperclip {type,value} env entries NousResearch#99 wire onSpawn for PID tracking NousResearch#96 add missing providers + prepare script (skip -Q disable + env dup) NousResearch#139 default model fallback to auto NousResearch#141 read wake metadata from ctx.context not ctx.config NousResearch#135 swap python3 pipes for jq in DEFAULT_PROMPT_TEMPLATE NousResearch#118 use PAPERCLIP_API_URL from adapter env in prompt NousResearch#122 make task closeout conditional on genuine completion Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Independent confirmation of this bug + fix from a separate deployment. We hit this exact issue running We applied the identical one-line change (
Confirmed present in published |
Summary
onSpawn: ctx.onSpawnto therunChildProcesscall inexecute.tsso Paperclip can track the Hermes child PID.Problem
runChildProcesswas called withoutonSpawn, so theopts.onSpawncallback in@paperclipai/adapter-utils/server-utils.jswas never invoked. As a result, Paperclip never calledpersistRunProcessMetadata, andheartbeat_runs.process_pidstayedNULLfor every Hermes run.This broke the orphan-process reaper's liveness check — without a PID, the reaper couldn't verify if the Hermes child was still alive. Combined with the missing
hermes_localentry inSESSIONED_LOCAL_ADAPTERS(separate Paperclip PR), any Hermes run exceeding 5 minutes was falsely declaredprocess_lost.Verified
Live on ao-sh-derper: every historical Hermes run (including the successful 39-second AUT-19 run from 2026-04-23) showed
process_pid = NULL.Related
hermes_localtoSESSIONED_LOCAL_ADAPTERSin paperclipai/paperclip (separate PR)