Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -2330,7 +2330,7 @@ var server = async ({ client }, options) => {
return;
}
taskDeferredSessions.add(sessionID);
scheduleSettledContinuation(sessionID, taskStatus.retryAt != null ? taskStatus.retryAt - Date.now() : TASK_BLOCK_RETRY_MS, scheduled != null);
scheduleSettledContinuation(sessionID, taskStatus.retryAt != null ? taskStatus.retryAt - Date.now() : TASK_BLOCK_RETRY_MS, scheduled != null || taskStatus.retryAt != null);
return;
}
if (busySessions.has(sessionID))
Expand Down
6 changes: 4 additions & 2 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1348,11 +1348,13 @@ const server: Plugin = async ({ client }, options?: Options) => {
// Always re-arm. A task block is the only deferral that records nothing on the
// goal, so without a scheduled retry a child that never reports a terminal state
// silently ends auto-continuation: nothing refreshes live children again and the
// goal keeps reading active with no stop reason.
// goal keeps reading active with no stop reason. When a fresh child snapshot adds
// a shorter idle-grace deadline, replace the older fallback timer so the stale
// running record is revisited promptly even if a poll was already queued.
scheduleSettledContinuation(
sessionID,
taskStatus.retryAt != null ? taskStatus.retryAt - Date.now() : TASK_BLOCK_RETRY_MS,
scheduled != null,
scheduled != null || taskStatus.retryAt != null,
)
return
}
Expand Down
Loading