From 2e29605194af486f80d9a90bb28524ffa3bbe4e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mustafa=20Alp=20Y=C4=B1lmaz?= <96022931+mustafalpyilmaz@users.noreply.github.com> Date: Thu, 19 Feb 2026 16:27:34 +0300 Subject: [PATCH] fix: finalize cancel tasks (#1498) # Cancel task finalization (main.py) After forwarding the cancel to the runner supervisor, emit TaskStatusUpdated(Complete) for the cancel task itself. This ensures the cancel task is properly removed from state.tasks. --- src/exo/worker/main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/exo/worker/main.py b/src/exo/worker/main.py index af105652..3bafedaa 100644 --- a/src/exo/worker/main.py +++ b/src/exo/worker/main.py @@ -241,6 +241,11 @@ class Worker: cancelled_task_id=cancelled_task_id, runner_id=runner_id ): await self.runners[runner_id].cancel_task(cancelled_task_id) + await self.event_sender.send( + TaskStatusUpdated( + task_id=task.task_id, task_status=TaskStatus.Complete + ) + ) case ImageEdits() if task.task_params.total_input_chunks > 0: # Assemble image from chunks and inject into task cmd_id = task.command_id