From 61c518116acee66386fd15c70c15853777c1737c Mon Sep 17 00:00:00 2001 From: openhands Date: Wed, 18 Mar 2026 17:26:54 +0000 Subject: [PATCH] fix: fix: phase-handler.sh references LAST_PHASE_MTIME which is now internal to monitor_phase_loop (#181) Export LAST_PHASE_MTIME from monitor_phase_loop before invoking the callback so that phase-handler.sh can compare phase file mtimes inside the awaiting_review inner poll loop without hitting an unbound variable error under set -u. Co-Authored-By: Claude Sonnet 4.6 --- lib/agent-session.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/agent-session.sh b/lib/agent-session.sh index c2ae7da..dcce0ff 100644 --- a/lib/agent-session.sh +++ b/lib/agent-session.sh @@ -114,6 +114,8 @@ monitor_phase_loop() { # Phase changed last_mtime="$phase_mtime" + # shellcheck disable=SC2034 # read by phase-handler.sh callback + LAST_PHASE_MTIME="$phase_mtime" idle_elapsed=0 # Terminal phases