Commit Graph

4 Commits

Author SHA1 Message Date
rictus 40b8dec2a0 feat(daemon): Add circuit breaker for stuck agents (gt-72cqu)
- Add Refinery monitoring to daemon heartbeat (ensureRefineriesRunning)
- Add circuit breaker: agents marked dead by checkStaleAgents() are
  now force-killed and restarted, even if Claude process is alive
- Fixes zombie Claude sessions that werent updating their bead state

The circuit breaker flow:
1. Agent gets stuck (stops updating bead state)
2. After 15 minutes: checkStaleAgents() marks bead as dead
3. On next heartbeat: ensure*Running() sees state=dead
4. Force-kill session and restart fresh

Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 13:12:39 -08:00
gastown/witness cadf09d98c bd sync: 2026-01-02 18:08:14 2026-01-02 18:08:14 -08:00
mayor 598e02408c bd sync: 2026-01-02 13:49 2026-01-02 13:43:56 -08:00
mayor 28521851e5 bd sync: 2025-12-30 22:06:06 2025-12-31 00:14:08 -08:00