Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore(ci): add cancel-aware helper for CI runs

Steven Enamakel47b574fa8c73
diff --git a/scripts/ci-cancel-aware.sh b/scripts/ci-cancel-aware.sh
index 6c2a062396..ead3c8f293 100755
--- a/scripts/ci-cancel-aware.sh
+++ b/scripts/ci-cancel-aware.sh
@@ -140,6 +140,11 @@ cleanup() {
trap - EXIT INT TERM HUP
if [ -n "$WATCHDOG_PID" ]; then
+ # Kill the watchdog's in-flight `sleep`/`curl` too. Killing only the
+ # subshell orphans them, and the orphan keeps the inherited stderr open:
+ # a caller capturing this script's output then waits up to a full poll
+ # interval for EOF after the command has already exited.
+ pkill -TERM -P "$WATCHDOG_PID" 2>/dev/null || true
kill "$WATCHDOG_PID" 2>/dev/null || true
fi