You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Phantom 'running' session records persist with PID recycling — risk of false-zombie kills #178
agentctl list -a | grep running shows session ses_3eed with status running, started 96d ago, PID 29098, prompt "Conversation tone and content inquiry reactie". The PID currently belongs to a freshly launched opencode process (Implement ticket ENG-9805, ELAPSED 1m), and agentctl status f0960d0f confirms the new launch is running.
So agentctl has TWO 'running' rows for the same OS process:
f0960d0f PID 29090 (wrapper) — real, just launched
ses_3eed PID 29098 (opencode subprocess) — phantom from 96 days ago
Risk
Patrol SOP step 5/6 instructs killing zombies via agentctl stop ses_3eed --force. That would SIGKILL the ENG-9805 agent because the OS PID has been recycled. Detected during 2026-05-07 patrol; declined to kill.
Likely cause
Stale session record never reaped because the original process exited without the wrapper recording termination. The reaper doesn't validate that PID 29098 still belongs to the same command/start time.
Suggested fix
Verify process_create_time (or argv hash) before reporting status=running for old sessions.
Auto-reap any 'running' record whose PID either (a) doesn't exist, or (b) was started after the session's recorded start time.
Workaround
Manual record cleanup CLI (agentctl prune --stale-records or similar) so patrol can delete phantom rows without risking SIGKILL on recycled PIDs.
Activity