From 7976ea01868544188db7a73ada4cd24327dd35ac Mon Sep 17 00:00:00 2001 From: cfdaily Date: Sat, 30 May 2026 09:01:06 +0800 Subject: [PATCH] auto-sync: 2026-05-30 09:01:06 (catch-all) --- docs/design/02-main-session-delegation.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/design/02-main-session-delegation.md b/docs/design/02-main-session-delegation.md index 428f091..ba79732 100644 --- a/docs/design/02-main-session-delegation.md +++ b/docs/design/02-main-session-delegation.md @@ -384,8 +384,9 @@ def _task_verify_completion(self, task_id, db_path) -> bool: row = conn.execute( "SELECT status FROM tasks WHERE id=?", (task_id,) ).fetchone() - if not row or row["status"] == "working": - return None # 还在执行中,不算完成 + TERMINAL_STATES = {"review", "done", "failed", "cancelled"} + if not row or row["status"] in TERMINAL_STATES: + return True # Agent 自己标了终态 # 信号 2:outputs 表有产出 output_count = conn.execute(