fix(daemon): Reduce heartbeat from 10 min to 3 min for faster stuck detection (gt-6y5o3)

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 <noreply@anthropic.com>
This commit is contained in:
morsov
2026-01-01 19:57:42 -08:00
committed by Steve Yegge
parent cf97645e0d
commit a16b94ffa8

View File

@@ -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.