fix(FN-874): recover stuck-killed tasks reliably

This commit is contained in:
gsxdsm
2026-04-04 09:45:45 -07:00
parent 3a51bf6e15
commit 7f0fe0e47c
4 changed files with 81 additions and 13 deletions

View File

@@ -668,6 +668,14 @@ export class TaskExecutor {
return;
}
// If the stuck task detector disposed the session and the agent exited
// cleanly, stop here. The detector already handled recovery/re-queueing.
if (this.stuckAborted.has(task.id)) {
this.stuckAborted.delete(task.id);
executorLog.log(`${task.id} terminated by stuck task detector (graceful session exit)`);
return;
}
if (taskDone) {
// Capture modified files before running workflow steps
const updatedTask = await this.store.getTask(task.id);