fix: session start timing and MR type issues

- Add 200ms delay after NewSession before sending keys to fix race
  condition where shell is not ready (mayor.go, crew.go)
- Use merge-request type instead of task for gt mq submit (mq.go)

Fixes gt-tulx

🤖 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-18 22:17:13 -08:00
parent ce6fecbc57
commit 2edf2358dd
4 changed files with 19 additions and 12 deletions
+2 -1
View File
@@ -124,8 +124,9 @@ func startMayorSession(t *tmux.Tmux) error {
// Launch Claude in a respawn loop - session survives restarts
// The startup hook handles 'gt prime' automatically
// Use SendKeysDelayed to allow shell initialization after NewSession
loopCmd := `while true; do echo "🏛️ Starting Mayor session..."; claude --dangerously-skip-permissions; echo ""; echo "Mayor exited. Restarting in 2s... (Ctrl-C to stop)"; sleep 2; done`
if err := t.SendKeys(MayorSessionName, loopCmd); err != nil {
if err := t.SendKeysDelayed(MayorSessionName, loopCmd, 200); err != nil {
return fmt.Errorf("sending command: %w", err)
}