cyberine
UsageRun recipes

Stale / zombie runs

If the engine process is killed mid-run (crash, Ctrl-C, kill), its run.json is left stuck in running with nothing driving it. The TUI detects this: the engine records its PID (enginePid) when it creates a run, and a follower flags the run as stale when that PID is no longer alive (older runs without a PID fall back to a 5-minute staleness window — well past any worker timeout, so a slow-but-live worker is never misflagged). A stale run renders with a red ⚠ (never an animated spinner, so a dead run can't look alive), is excluded from the header's live count, and adds a red stale count. Press s on a stale run to reap it: since the owning engine is provably gone, the TUI safely writes a terminal cancelled state directly to run.json (a normal stop would only write a control file no engine is left to read).