From 49be394eefbe43b9e1992313a27b1fcadb9a70e1 Mon Sep 17 00:00:00 2001 From: joe Date: Fri, 2 Jan 2026 17:42:27 -0800 Subject: [PATCH] Fix crew startup to inject metadata for gt seance MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gt crew start was using GetRuntimeCommand which doesn't set BD_ACTOR, GT_RIG, GT_CREW, etc. This caused seance to misidentify crew sessions (showing as "mayor" instead of their actual identity). Now uses BuildCrewStartupCommand like gt crew restart does, ensuring proper env var injection for session identification. (gt-jwxgb) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- internal/cmd/start.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/internal/cmd/start.go b/internal/cmd/start.go index bf659249..659c1715 100644 --- a/internal/cmd/start.go +++ b/internal/cmd/start.go @@ -763,7 +763,8 @@ func runStartCrew(cmd *cobra.Command, args []string) error { if !t.IsClaudeRunning(sessionID) { // Claude has exited, restart it fmt.Printf("Session exists, restarting Claude...\n") - if err := t.SendKeys(sessionID, config.GetRuntimeCommand(r.Path)); err != nil { + claudeCmd := config.BuildCrewStartupCommand(rigName, name, r.Path, "") + if err := t.SendKeys(sessionID, claudeCmd); err != nil { return fmt.Errorf("restarting claude: %w", err) } // Wait for Claude to start, then prime @@ -803,8 +804,9 @@ func runStartCrew(cmd *cobra.Command, args []string) error { return fmt.Errorf("waiting for shell: %w", err) } - // Start claude with skip permissions - if err := t.SendKeys(sessionID, config.GetRuntimeCommand(r.Path)); err != nil { + // Start claude with skip permissions and proper env vars for seance + claudeCmd := config.BuildCrewStartupCommand(rigName, name, r.Path, "") + if err := t.SendKeys(sessionID, claudeCmd); err != nil { return fmt.Errorf("starting claude: %w", err) }