Fix crew startup to inject metadata for gt seance

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 <noreply@anthropic.com>
This commit is contained in:
joe
2026-01-02 17:42:27 -08:00
committed by Steve Yegge
parent 1805d5b011
commit 49be394eef

View File

@@ -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)
}