From a16b94ffa8fccf0c341f9826b43e35923724e918 Mon Sep 17 00:00:00 2001 From: morsov Date: Thu, 1 Jan 2026 19:57:42 -0800 Subject: [PATCH] fix(daemon): Reduce heartbeat from 10 min to 3 min for faster stuck detection (gt-6y5o3) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 10-minute recovery heartbeat was too slow to detect stuck agents promptly. Reduced to 3 minutes for better balance between detection speed and overhead. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- internal/daemon/daemon.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/daemon/daemon.go b/internal/daemon/daemon.go index 028717b4..23c43138 100644 --- a/internal/daemon/daemon.go +++ b/internal/daemon/daemon.go @@ -132,8 +132,8 @@ func (d *Daemon) Run() error { // recoveryHeartbeatInterval is the fixed interval for recovery-focused daemon. // Normal wake is handled by feed subscription (bd activity --follow). // The daemon is a safety net for dead sessions, GUPP violations, and orphaned work. -// 10 minutes is long enough to avoid unnecessary overhead, short enough to catch issues. -const recoveryHeartbeatInterval = 10 * time.Minute +// 3 minutes is fast enough to detect stuck agents promptly while avoiding excessive overhead. +const recoveryHeartbeatInterval = 3 * time.Minute // heartbeat performs one heartbeat cycle. // The daemon is recovery-focused: it ensures agents are running and detects failures.