Bug description
A run can remain marked running in AutoLoop's registry after its parent process is killed or disappears. autoloop doctor detects this but does not reconcile it, and queued control requests cannot be consumed because no parent process remains.
Reproduction
- Start a long-running loop.
- Terminate the AutoLoop parent process externally (for example, process-manager kill/SIGTERM).
- Run:
autoloop doctor /path/to/project --json
Observed doctor warning:
1 run(s) marked running but the process is gone
autoloop loops show <id> --json can continue reporting status: running and health: active even though the PID no longer exists.
Expected behavior
There should be an explicit, safe reconciliation path that durably marks orphaned runs interrupted/failed, such as:
autoloop runs reconcile [project-dir]
Doctor/triage could either perform this only behind an explicit flag or return the exact reconciliation command. The update should append a normal terminal registry/journal event rather than hand-editing state.
The CLI/process shutdown path should also attempt this reconciliation on SIGTERM/SIGINT.
Suggested tests
- Registry record says running, PID is absent → reconcile appends one terminal state.
- PID exists and belongs to active run → no change.
- Repeated reconciliation is idempotent.
- Queued control requests on an orphaned run are closed/reported clearly.
Environment
- AutoLoop 0.10.1
- Node 22.23.1
- Linux
Bug description
A run can remain marked
runningin AutoLoop's registry after its parent process is killed or disappears.autoloop doctordetects this but does not reconcile it, and queued control requests cannot be consumed because no parent process remains.Reproduction
Observed doctor warning:
autoloop loops show <id> --jsoncan continue reportingstatus: runningandhealth: activeeven though the PID no longer exists.Expected behavior
There should be an explicit, safe reconciliation path that durably marks orphaned runs interrupted/failed, such as:
Doctor/triage could either perform this only behind an explicit flag or return the exact reconciliation command. The update should append a normal terminal registry/journal event rather than hand-editing state.
The CLI/process shutdown path should also attempt this reconciliation on SIGTERM/SIGINT.
Suggested tests
Environment