diff --git a/src/task-scheduler.ts b/src/task-scheduler.ts index f216e12..d0abd2e 100644 --- a/src/task-scheduler.ts +++ b/src/task-scheduler.ts @@ -191,6 +191,7 @@ async function runTask( } if (streamedOutput.status === 'success') { deps.queue.notifyIdle(task.chat_jid); + scheduleClose(); // Close promptly even when result is null (e.g. IPC-only tasks) } if (streamedOutput.status === 'error') { error = streamedOutput.error || 'Unknown error';