From c1cd127ae747a9da64f0f5c8ecf3e8b5d410e67e Mon Sep 17 00:00:00 2001 From: a7m-1st Date: Thu, 13 Nov 2025 03:46:27 +0300 Subject: [PATCH] re-fix: don't set current task on simple task --- backend/app/service/chat_service.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/app/service/chat_service.py b/backend/app/service/chat_service.py index 43d212d7b..3a02b491f 100644 --- a/backend/app/service/chat_service.py +++ b/backend/app/service/chat_service.py @@ -543,9 +543,6 @@ async def step_solve(options: Chat, request: Request, task_lock: TaskLock): # Now trigger end of previous task using stored result yield sse_json("end", old_task_result) - # Update the sync_step with new task_id before sending new task sse events - set_current_task_id(options.project_id, task_id) - # Always yield new_task_state first - this is not optional yield sse_json("new_task_state", item.data) # Trigger Queue Removal @@ -577,6 +574,9 @@ async def step_solve(options: Chat, request: Request, task_lock: TaskLock): workforce.resume() continue # This continues the main while loop, waiting for next action + # Update the sync_step with new task_id before sending new task sse events + set_current_task_id(options.project_id, task_id) + yield sse_json("confirmed", {"question": new_task_content}) task_lock.status = Status.confirmed