diff --git a/packages/cli-workflow/src/thread-scan.ts b/packages/cli-workflow/src/thread-scan.ts index fbcc381..43aeabd 100644 --- a/packages/cli-workflow/src/thread-scan.ts +++ b/packages/cli-workflow/src/thread-scan.ts @@ -230,6 +230,16 @@ export async function resolveThreadListStatus( } return "running"; } + // No .running marker + no __end__ + source "active" → check if worker is dead (crashed) + const ctlResult = await readWorkerCtl(storageRoot, row.hash); + if (ctlResult.ok) { + try { + process.kill(ctlResult.value.pid, 0); + } catch { + // Worker PID is dead, thread never finished — crashed + return "failed"; + } + } return "active"; }