Problem
When a task exits unexpectedly (SIGKILL, permission denial, or sandbox block), the task metadata file is never updated from running to failed/completed. The dashboard then shows a stale "running" status indefinitely.
Steps to reproduce
- Start a task via
openclaw-agent start
- Have the Claude Code process get killed (e.g. SIGKILL from OS, or sandbox permission denial blocking all tool use)
- Check
openclaw-agent list / dashboard — task still shows as running
Expected
Task should transition to failed with an appropriate error when the underlying process exits non-zero or via signal.
Possible fix
- Poll the PID after SSH session ends and update status if process is gone
- Write status on SSH session close / process exit hook
- Add a staleness timeout: mark as failed after N minutes with no output update
Problem
When a task exits unexpectedly (SIGKILL, permission denial, or sandbox block), the task metadata file is never updated from
runningtofailed/completed. The dashboard then shows a stale "running" status indefinitely.Steps to reproduce
openclaw-agent startopenclaw-agent list/ dashboard — task still shows asrunningExpected
Task should transition to
failedwith an appropriate error when the underlying process exits non-zero or via signal.Possible fix