fix: kill session on PHASE:escalate to prevent zombie blocking future cron runs (#571)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
openhands 2026-03-22 22:05:57 +00:00
parent 578a6ec81d
commit df848e5a60

View file

@ -464,6 +464,7 @@ _gardener_on_phase_change() {
reason=$(sed -n '2p' "$PHASE_FILE" 2>/dev/null | sed 's/^Reason: //' || true)
log "escalated: ${reason}"
matrix_send "gardener" "Gardener escalated: ${reason}" 2>/dev/null || true
agent_kill_session "${_MONITOR_SESSION:-$SESSION_NAME}"
;;
PHASE:crashed)
if [ "${_GARDENER_CRASH_COUNT:-0}" -gt 0 ]; then