From d0f211b1f335cd2847148468be4253f5305a1da5 Mon Sep 17 00:00:00 2001 From: Timmy Time Date: Sun, 5 Apr 2026 18:26:08 +0000 Subject: [PATCH] fix: monitor kimi heartbeat instead of stale loop (#191) --- bin/timmy-orchestrator.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/timmy-orchestrator.sh b/bin/timmy-orchestrator.sh index 9bbbe613..5c54fd1b 100755 --- a/bin/timmy-orchestrator.sh +++ b/bin/timmy-orchestrator.sh @@ -66,10 +66,10 @@ for p in json.load(sys.stdin): echo "Claude loop: $(pgrep -f 'claude-loop.sh' 2>/dev/null | wc -l | tr -d ' ') procs" >> "$state_dir/agent_status.txt" tail -50 "$LOG_DIR/claude-loop.log" 2>/dev/null | grep -c "SUCCESS" | xargs -I{} echo "Claude recent successes: {}" >> "$state_dir/agent_status.txt" tail -50 "$LOG_DIR/claude-loop.log" 2>/dev/null | grep -c "FAILED" | xargs -I{} echo "Claude recent failures: {}" >> "$state_dir/agent_status.txt" - echo "Kimi loop: $(pgrep -f 'kimi-loop.sh' 2>/dev/null | wc -l | tr -d ' ') procs" >> "$state_dir/agent_status.txt" - tail -50 "$LOG_DIR/kimi-loop.log" 2>/dev/null | grep -c "SUCCESS" | xargs -I{} echo "Kimi recent successes: {}" >> "$state_dir/agent_status.txt" - tail -50 "$LOG_DIR/kimi-loop.log" 2>/dev/null | grep -c "FAILED" | xargs -I{} echo "Kimi recent failures: {}" >> "$state_dir/agent_status.txt" - tail -1 "$LOG_DIR/kimi-loop.log" 2>/dev/null | xargs -I{} echo "Kimi last event: {}" >> "$state_dir/agent_status.txt" + echo "Kimi heartbeat launchd: $(launchctl list 2>/dev/null | grep -c 'ai.timmy.kimi-heartbeat' | tr -d ' ') job" >> "$state_dir/agent_status.txt" + tail -50 "/tmp/kimi-heartbeat.log" 2>/dev/null | grep -c "DISPATCHED:" | xargs -I{} echo "Kimi recent dispatches: {}" >> "$state_dir/agent_status.txt" + tail -50 "/tmp/kimi-heartbeat.log" 2>/dev/null | grep -c "FAILED:" | xargs -I{} echo "Kimi recent failures: {}" >> "$state_dir/agent_status.txt" + tail -1 "/tmp/kimi-heartbeat.log" 2>/dev/null | xargs -I{} echo "Kimi last event: {}" >> "$state_dir/agent_status.txt" echo "$state_dir" }