From 8510eacecb043b5b448de2c4e8ad34d1fba95f16 Mon Sep 17 00:00:00 2001 From: paulh Date: Thu, 9 Apr 2026 22:26:11 -0400 Subject: [PATCH] fix(ralph-loop): capture check_output status safely under set -e When the agent emits no promise signal, check_output returns 1 (continue). Under set -euo pipefail, a bare function call returning non-zero exits the script before status=$? can capture it. Fix: use the || idiom so the non-zero return is handled rather than triggering set -e. Agent: human Tests: N/A Tests-Added: 0 TypeScript: N/A --- ralph-loop.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ralph-loop.sh b/ralph-loop.sh index deb6289..7a82be8 100755 --- a/ralph-loop.sh +++ b/ralph-loop.sh @@ -491,8 +491,7 @@ for i in $(seq 1 "$MAX_ITERATIONS"); do run_agent "$i" build logfile="$LOG_DIR/iteration-${i}.log" - check_output "$logfile" - status=$? + status=0; check_output "$logfile" || status=$? case $status in 0)