Skip to content

Commit a689a18

Browse files
glifocatclaude
andauthored
fix: close task container promptly when agent uses IPC-only messaging (#840)
Scheduled tasks that send messages via send_message (IPC) instead of returning text as result left the container idle for ~30 minutes until the hard timeout killed it (exit 137). This blocked new messages for the group during that window. Root cause: scheduleClose() was only called inside the `if (streamedOutput.result)` branch. Tasks that communicate solely through IPC (e.g. heartbeat check-ins) complete with result=null, so the 10s close timer was never set. Fix: also call scheduleClose() on status==='success', covering both result-based and IPC-only task completions. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ab9abbb commit a689a18

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/task-scheduler.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ async function runTask(
191191
}
192192
if (streamedOutput.status === 'success') {
193193
deps.queue.notifyIdle(task.chat_jid);
194+
scheduleClose(); // Close promptly even when result is null (e.g. IPC-only tasks)
194195
}
195196
if (streamedOutput.status === 'error') {
196197
error = streamedOutput.error || 'Unknown error';

0 commit comments

Comments
 (0)