fix(server): release settled tool health intent during drain

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-10-25 09:55:19 -05:00
1 parent 9ef6e4f4c8
commit e685a0e7ef
3 files changed
+38 -2

No files matched your search

@@ -82,7 +82,9 @@ export function registerToolConnectionHealthWork(
if (due.length > batch.entries.length) earliest = Date.now() + 1_000;
if (errors.length) throw new AggregateError(errors, "Tool connection health checks could not settle");
},
hasPending: async () => dirty.size > 0,
// Keep the hints/deadlines for resume, but release settled intent while
// paused. The coordinator independently fences unresolved transactions.
hasPending: async () => canRun() && dirty.size > 0,
nextRunAt: next,
});
}