feat(daemon): add lifecycle support for refinery and crew
- Add refinery and crew patterns to identityToSession() - Add refinery and crew handling to restartSession() with pre-sync - Add refinery and crew to identityToStateFile() - Fix gt refinery start to send gt prime after Claude starts - New syncWorkspace() helper for agents with persistent clones
This commit is contained in:
@@ -209,7 +209,6 @@ func (m *Manager) Start(foreground bool) error {
|
||||
}
|
||||
|
||||
// Start Claude agent with full permissions (like polecats)
|
||||
// The agent will run gt prime to load refinery context and start processing
|
||||
command := "claude --dangerously-skip-permissions"
|
||||
if err := t.SendKeys(sessionID, command); err != nil {
|
||||
// Clean up the session on failure
|
||||
@@ -217,6 +216,12 @@ func (m *Manager) Start(foreground bool) error {
|
||||
return fmt.Errorf("starting Claude agent: %w", err)
|
||||
}
|
||||
|
||||
// Prime the agent after Claude starts to load refinery context
|
||||
if err := t.SendKeysDelayed(sessionID, "gt prime", 2000); err != nil {
|
||||
// Warning only - don't fail startup
|
||||
fmt.Printf("Warning: could not send prime command: %v\n", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user