From b392e049e83790dcfd3b50757b263810a888dea5 Mon Sep 17 00:00:00 2001 From: lintsinghua Date: Fri, 12 Dec 2025 16:09:50 +0800 Subject: [PATCH] fix(agent_tasks): update task phase to REPORTING on completion - Change task phase from COMPLETED to REPORTING when agent task finishes - Ensures proper phase progression through task lifecycle - Aligns with agent workflow state management requirements --- backend/app/api/v1/endpoints/agent_tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/app/api/v1/endpoints/agent_tasks.py b/backend/app/api/v1/endpoints/agent_tasks.py index 56ff0a8..2231822 100644 --- a/backend/app/api/v1/endpoints/agent_tasks.py +++ b/backend/app/api/v1/endpoints/agent_tasks.py @@ -368,7 +368,7 @@ async def _execute_agent_task(task_id: str): # 更新任务统计 task.status = AgentTaskStatus.COMPLETED task.completed_at = datetime.now(timezone.utc) - task.current_phase = AgentTaskPhase.COMPLETED + task.current_phase = AgentTaskPhase.REPORTING task.findings_count = len(findings) task.total_iterations = result.iterations task.tool_calls_count = result.tool_calls