Skip to content

Commit db76e83

Browse files
committed
fix(task_await): honor timeout_secs=0 for agent tasks
Previously, timeout_secs=0 was treated as 'unset' and fell back to the default 10-minute timeout for agent tasks (while bash tasks correctly supported non-blocking 0-second waits). Now timeout_secs=0 is respected for both agent and bash tasks, enabling immediate non-blocking checks when needed. Addresses Codex review feedback. Change-Id: Iad7d72a342c9ae6c86ffcade4f7bc34e846376c5 Signed-off-by: Thomas Kosiewski <tk@coder.com>
1 parent 4451577 commit db76e83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node/services/tools/task_await.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import {
1313

1414
function coerceTimeoutMs(timeoutSecs: unknown): number | undefined {
1515
if (typeof timeoutSecs !== "number" || !Number.isFinite(timeoutSecs)) return undefined;
16+
if (timeoutSecs < 0) return undefined;
1617
const timeoutMs = Math.floor(timeoutSecs * 1000);
17-
if (timeoutMs <= 0) return undefined;
1818
return timeoutMs;
1919
}
2020

0 commit comments

Comments
 (0)