feat: Add tmux crash detection hooks (gt-i9s7o)

- Add SetPaneDiedHook to tmux package for crash detection
- Add gt log crash subcommand for hook callback
- Set pane-died hook when starting polecat sessions
- Distinguish exit types: 0=done, 130=kill (Ctrl+C), other=crash
- Rename townlog/townlog.go to townlog/logger.go

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-26 16:18:44 -08:00
parent 490c8b6e24
commit 2117eb66f5
5 changed files with 103 additions and 0 deletions

View File

@@ -157,6 +157,10 @@ func (m *Manager) Start(polecat string, opts StartOptions) error {
theme := tmux.AssignTheme(m.rig.Name)
_ = m.tmux.ConfigureGasTownSession(sessionID, theme, m.rig.Name, polecat, "polecat")
// Set pane-died hook for crash detection (non-fatal)
agentID := fmt.Sprintf("%s/%s", m.rig.Name, polecat)
_ = m.tmux.SetPaneDiedHook(sessionID, agentID)
// Send initial command
command := opts.Command
if command == "" {