Commit Graph

983 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
markov-kernel
e7145cfd77 fix: Make Mayor/Deacon session names include town name
Session names `gt-mayor` and `gt-deacon` were hardcoded, causing tmux
session name collisions when running multiple towns simultaneously.

Changed to `gt-{town}-mayor` and `gt-{town}-deacon` format (e.g.,
`gt-ai-mayor`) to allow concurrent multi-town operation.

Key changes:
- session.MayorSessionName() and DeaconSessionName() now take townName param
- Added workspace.GetTownName() helper to load town name from config
- Updated all callers in cmd/, daemon/, doctor/, mail/, rig/, templates/
- Updated tests with new session name format
- Bead IDs remain unchanged (already scoped by .beads/ directory)

Fixes #60

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 21:37:05 +01: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
65a5c7888f bd sync: gt-7m33w daemon cache bug identified 2026-01-01 17:34:39 -08:00
mayor
29d5c04a5f bd sync: 2025-12-30 22:16:20 2025-12-31 00:14:08 -08:00
mayor
658f654474 bd sync: 2025-12-30 22:06:13 2025-12-31 00:14:08 -08:00
mayor
3c49a1deb9 bd sync: 2025-12-30 22:06:10 2025-12-31 00:14:08 -08:00
mayor
28521851e5 bd sync: 2025-12-30 22:06:06 2025-12-31 00:14:08 -08:00
gastown/crew/joe
920507cbe3 bd sync: 2025-12-30 21:14:12 2025-12-30 21:15:54 -08:00
gastown/polecats/furiosa
d006b20d7c bd sync: 2025-12-30 20:54:24 2025-12-30 20:54:24 -08:00
gastown/crew/max
aa2aa64f59 bd sync: 2025-12-30 20:51:38 2025-12-30 20:51:38 -08:00
Steve Yegge
c3e379deb1 bd sync: 2025-12-30 19:43:38 2025-12-30 19:43:47 -08:00
Steve Yegge
e2ce6148b7 bd sync: 2025-12-30 19:37:33 2025-12-30 19:37:33 -08:00
gastown/crew/joe
4c783bbcae bd sync: 2025-12-30 19:36:57 2025-12-30 19:37:05 -08:00
Steve Yegge
36eb63b8df bd sync: 2025-12-30 19:16:00 2025-12-30 19:29:11 -08:00
Steve Yegge
24fed6ae5a bd sync: 2025-12-30 19:08:21 2025-12-30 19:29:11 -08:00
Steve Yegge
d87086962b bd sync: 2025-12-30 18:55:47 2025-12-30 19:29:11 -08:00
Steve Yegge
e192b96a6d bd sync: 2025-12-30 18:55:31 2025-12-30 19:29:11 -08:00
Steve Yegge
38fe5b6a23 bd sync: 2025-12-30 18:38:05 2025-12-30 18:38:18 -08:00
Steve Yegge
a5fa5602b5 bd sync: 2025-12-30 18:26:49 2025-12-30 18:26:49 -08:00
Steve Yegge
edffa606aa bd sync: 2025-12-30 18:17:35 2025-12-30 18:17:35 -08:00
Steve Yegge
3a55bb43ab bd sync: 2025-12-30 18:10:11 2025-12-30 18:10:21 -08:00
Steve Yegge
cbcf9ec051 bd sync: 2025-12-30 18:05:22 2025-12-30 18:10:21 -08:00
Steve Yegge
941853b503 bd sync: 2025-12-30 18:03:25 2025-12-30 18:10:21 -08:00
Steve Yegge
b728b1a25a bd sync: 2025-12-30 18:02:43 2025-12-30 18:02:43 -08:00
Steve Yegge
fd2f4ca944 bd sync: 2025-12-30 18:01:54 2025-12-30 18:02:13 -08:00
Steve Yegge
5c61c8c334 bd sync: 2025-12-30 17:41:02 2025-12-30 17:41:02 -08:00
Steve Yegge
dc5f06e11c bd sync: 2025-12-30 16:42:49 2025-12-30 16:56:46 -08:00
Steve Yegge
e383243161 bd sync: 2025-12-30 13:56:30 2025-12-30 13:56:30 -08:00
Steve Yegge
80cbada427 bd sync: 2025-12-30 13:43:48 2025-12-30 13:43:48 -08:00
Steve Yegge
6b9ba2362b bd sync: 2025-12-30 13:43:44 2025-12-30 13:43:44 -08:00
Steve Yegge
bb0d248f4d bd sync: 2025-12-30 13:33:39 2025-12-30 13:33:39 -08:00
Steve Yegge
31de4c81d3 bd sync: 2025-12-30 12:56:26 2025-12-30 12:56:26 -08:00
Steve Yegge
0b331cbf64 bd sync: 2025-12-30 11:08:56 2025-12-30 11:09:07 -08:00
Steve Yegge
f1b7b953b8 bd sync: 2025-12-30 11:01:44 2025-12-30 11:01:44 -08:00
Steve Yegge
f64cec2853 bd sync: 2025-12-30 10:53:30 2025-12-30 10:57:34 -08:00
Steve Yegge
d21dd0a0b0 bd sync: 2025-12-30 10:41:14 2025-12-30 10:57:34 -08:00
Steve Yegge
3dec0d0072 bd sync: 2025-12-30 10:41:05 2025-12-30 10:57:34 -08:00
Steve Yegge
75ee851813 bd sync: 2025-12-30 10:36:59 2025-12-30 10:57:34 -08:00
Steve Yegge
3fa1911f27 bd sync: 2025-12-30 10:36:11 2025-12-30 10:57:34 -08:00
Steve Yegge
4db2696a9f bd sync: 2025-12-30 10:35:50 2025-12-30 10:57:34 -08:00
Steve Yegge
5b28ba2e4b bd sync: 2025-12-30 10:34:05 2025-12-30 10:57:34 -08:00
Steve Yegge
5b9983f261 Sync beads from main (gt-m5w4g.2) 2025-12-30 10:48:00 -08:00
Steve Yegge
9968aceddb Add @group dynamic resolution in mail router (gt-tgy1v)
Implements @group address resolution for mail routing:
- @rig/<rigname>: All agents in a rig
- @town: All town-level agents (mayor, deacon)
- @witnesses, @dogs, @refineries: Role-based groups
- @crew/<rig>, @polecats/<rig>: Role+rig scoped groups
- @overseer: Human operator (uses overseer.json)

Resolution uses `bd list --type=agent` queries with
description filtering. Fan-out at send time creates
individual messages for each resolved recipient.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 10:47:05 -08:00
Steve Yegge
afb7b85b35 bd sync: 2025-12-30 10:21:48 2025-12-30 10:21:48 -08:00
Steve Yegge
79a6b249a6 bd sync: 2025-12-30 10:20:59 2025-12-30 10:21:37 -08:00
Steve Yegge
dd3391bb68 bd sync: 2025-12-30 06:47:27 2025-12-30 06:47:27 -08:00
Steve Yegge
c1e2257497 bd sync: 2025-12-30 06:45:27 2025-12-30 06:45:46 -08:00
Steve Yegge
800e218b7c bd sync: 2025-12-30 02:07:44 2025-12-30 06:45:46 -08:00