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
Launched Claude Code via agentctl launch claude-code --cwd ~/personal/agentctl. agentctl reports the session as stopped within seconds, but the actual Claude Code process (PID) is still alive and working.
Expected
Session status should reflect the actual Claude Code process state, not the wrapper's lifecycle.
Root cause
agentctl's launch wrapper gets SIGTERM'd by the parent process (OpenClaw's exec timeout). When the wrapper dies, agentctl marks the session stopped — but Claude Code was spawned as a child process that survives the wrapper's death (reparented to init/launchd).
Impact
Misleading status leads to unnecessary relaunches (wasted API calls)
No way to distinguish 'actually stopped' from 'wrapper died but agent is running'
Supervision can't work if status is wrong
Observed
$ agentctl status pending-24490
Status: stopped # FALSE — PID 24490 is still running
$ ps aux | grep 24490
ms 24490 ... /Users/ms/.local/share/claude/versions/2.1.63 --dangerously-skip-permissions --print ...
Possible fixes
PID check: agentctl status should check if the PID is still alive before reporting stopped
Process group: Launch Claude Code in the same process group so wrapper death doesn't orphan it
What happened
Launched Claude Code via
agentctl launch claude-code --cwd ~/personal/agentctl. agentctl reports the session asstoppedwithin seconds, but the actual Claude Code process (PID) is still alive and working.Expected
Session status should reflect the actual Claude Code process state, not the wrapper's lifecycle.
Root cause
agentctl's launch wrapper gets SIGTERM'd by the parent process (OpenClaw's exec timeout). When the wrapper dies, agentctl marks the session
stopped— but Claude Code was spawned as a child process that survives the wrapper's death (reparented to init/launchd).Impact
Observed
Possible fixes
agentctl statusshould check if the PID is still alive before reportingstoppedRelated