Fix remaining worker startups for gt seance metadata
- startCrewMember: now uses BuildCrewStartupCommand (was GetRuntimeCommand) - refinery/manager.go: now uses BuildAgentStartupCommand (was GetRuntimeCommand) Both now properly inject BD_ACTOR and GT_ROLE so seance can identify sessions correctly. This completes the seance metadata fix started in the previous commit. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -947,8 +947,9 @@ func startCrewMember(rigName, crewName, townRoot string) error {
|
|||||||
return fmt.Errorf("waiting for shell: %w", err)
|
return fmt.Errorf("waiting for shell: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start claude
|
// Start claude with proper env vars for seance
|
||||||
if err := t.SendKeys(sessionID, config.GetRuntimeCommand(r.Path)); err != nil {
|
claudeCmd := config.BuildCrewStartupCommand(rigName, crewName, r.Path, "")
|
||||||
|
if err := t.SendKeys(sessionID, claudeCmd); err != nil {
|
||||||
return fmt.Errorf("starting claude: %w", err)
|
return fmt.Errorf("starting claude: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -194,7 +194,8 @@ func (m *Manager) Start(foreground bool) error {
|
|||||||
// Start Claude agent with full permissions (like polecats)
|
// Start Claude agent with full permissions (like polecats)
|
||||||
// NOTE: No gt prime injection needed - SessionStart hook handles it automatically
|
// NOTE: No gt prime injection needed - SessionStart hook handles it automatically
|
||||||
// Restarts are handled by daemon via LIFECYCLE mail, not shell loops
|
// Restarts are handled by daemon via LIFECYCLE mail, not shell loops
|
||||||
command := config.GetRuntimeCommand("")
|
// Export GT_ROLE and BD_ACTOR in the command since tmux SetEnvironment only affects new panes
|
||||||
|
command := config.BuildAgentStartupCommand("refinery", bdActor, "", "")
|
||||||
if err := t.SendKeys(sessionID, command); err != nil {
|
if err := t.SendKeys(sessionID, command); err != nil {
|
||||||
// Clean up the session on failure (best-effort cleanup)
|
// Clean up the session on failure (best-effort cleanup)
|
||||||
_ = t.KillSession(sessionID)
|
_ = t.KillSession(sessionID)
|
||||||
|
|||||||
Reference in New Issue
Block a user