From 54064644624835fb6bd49f6df4f1d70cd5be3945 Mon Sep 17 00:00:00 2001 From: cfdaily Date: Tue, 26 May 2026 14:38:38 +0800 Subject: [PATCH] auto-sync: 2026-05-26 14:38:38 --- src/daemon/spawner.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/daemon/spawner.py b/src/daemon/spawner.py index 70365c2..8004c3b 100644 --- a/src/daemon/spawner.py +++ b/src/daemon/spawner.py @@ -1046,12 +1046,9 @@ curl -X POST http://{api_host}:{api_port}/api/projects/{project_id}/tasks/{task_ return {"outcome": "gateway_timeout", "should_retry": True, "retry_field": "retry_count"} - # A7-A12: status=error → 不续杯,stderr 辅助分类 - if status == "error": - # A0: stdout 为空且 exit≠0 = 进程异常终止 # 注意:exit=0 + stdout 为空可能是正常完成(--json 没输出), - # 此时 task_status 如果是 done/review 会被上面的 A1/A4 兜住 + # 此时 task_status 如果是 done/review 会被上面的 A4 兜住 if status is None and not stdout_text.strip() and exit_code != 0: return {"outcome": "process_crash", "should_retry": False} @@ -1062,6 +1059,9 @@ curl -X POST http://{api_host}:{api_port}/api/projects/{project_id}/tasks/{task_ if task_status in terminal_statuses: return {"outcome": "completed", "should_retry": False} return {"outcome": "agent_error", "should_retry": False} + + # A7-A12: status=error → 不续杯,stderr 辅助分类 + if status == "error": stderr_lower = stderr_text.lower() if any(kw in stderr_lower for kw in ["401", "403", "unauthorized", "auth"]): return {"outcome": "auth_failed", "should_retry": False}