fix: restore agent override support lost in manager refactors
The manager refactors (ea8bef2,72544cc0) conflicted with the agent override feature, causing regressions: Deacon (ea8bef2): - Lost agentOverride parameter - Re-added respawn loop (removed in5f2e16f) - Lost GUPP (startup + propulsion nudges) Crew (72544cc0): - Lost agentOverride wiring to StartOptions - --agent flag had no effect on crew refresh/restart This fix restores agent override support and GUPP while keeping improvements from the manager refactors (zombie detection, etc). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
committed by
Steve Yegge
parent
00a59dec44
commit
c91ab85457
@@ -236,9 +236,10 @@ func runCrewRefresh(cmd *cobra.Command, args []string) error {
|
||||
|
||||
// Use manager's Start() with refresh options
|
||||
err = crewMgr.Start(name, crew.StartOptions{
|
||||
KillExisting: true, // Kill old session if running
|
||||
Topic: "refresh", // Startup nudge topic
|
||||
Interactive: true, // No --dangerously-skip-permissions
|
||||
KillExisting: true, // Kill old session if running
|
||||
Topic: "refresh", // Startup nudge topic
|
||||
Interactive: true, // No --dangerously-skip-permissions
|
||||
AgentOverride: crewAgentOverride,
|
||||
})
|
||||
if err != nil {
|
||||
return fmt.Errorf("starting crew session: %w", err)
|
||||
@@ -346,8 +347,9 @@ func runCrewRestart(cmd *cobra.Command, args []string) error {
|
||||
// Use manager's Start() with restart options
|
||||
// Start() will create workspace if needed (idempotent)
|
||||
err = crewMgr.Start(name, crew.StartOptions{
|
||||
KillExisting: true, // Kill old session if running
|
||||
Topic: "restart", // Startup nudge topic
|
||||
KillExisting: true, // Kill old session if running
|
||||
Topic: "restart", // Startup nudge topic
|
||||
AgentOverride: crewAgentOverride,
|
||||
})
|
||||
if err != nil {
|
||||
fmt.Printf("Error restarting %s: %v\n", arg, err)
|
||||
@@ -425,8 +427,9 @@ func runCrewRestartAll() error {
|
||||
|
||||
// Use manager's Start() with restart options
|
||||
err = crewMgr.Start(agent.AgentName, crew.StartOptions{
|
||||
KillExisting: true, // Kill old session if running
|
||||
Topic: "restart", // Startup nudge topic
|
||||
KillExisting: true, // Kill old session if running
|
||||
Topic: "restart", // Startup nudge topic
|
||||
AgentOverride: crewAgentOverride,
|
||||
})
|
||||
if err != nil {
|
||||
failed++
|
||||
|
||||
@@ -203,7 +203,7 @@ func startCoreAgents(townRoot string, agentOverride string) error {
|
||||
|
||||
// Start Deacon (health monitor)
|
||||
deaconMgr := deacon.NewManager(townRoot)
|
||||
if err := deaconMgr.Start(); err != nil {
|
||||
if err := deaconMgr.Start(agentOverride); err != nil {
|
||||
if err == deacon.ErrAlreadyRunning {
|
||||
fmt.Printf(" %s Deacon already running\n", style.Dim.Render("○"))
|
||||
} else {
|
||||
@@ -694,6 +694,7 @@ func runStartCrew(cmd *cobra.Command, args []string) error {
|
||||
err = crewMgr.Start(name, crew.StartOptions{
|
||||
Account: startCrewAccount,
|
||||
ClaudeConfigDir: claudeConfigDir,
|
||||
AgentOverride: startCrewAgentOverride,
|
||||
})
|
||||
if err != nil {
|
||||
if errors.Is(err, crew.ErrSessionRunning) {
|
||||
|
||||
@@ -83,7 +83,7 @@ func runUp(cmd *cobra.Command, args []string) error {
|
||||
|
||||
// 2. Deacon (Claude agent)
|
||||
deaconMgr := deacon.NewManager(townRoot)
|
||||
if err := deaconMgr.Start(); err != nil {
|
||||
if err := deaconMgr.Start(""); err != nil {
|
||||
if err == deacon.ErrAlreadyRunning {
|
||||
printStatus("Deacon", true, deaconMgr.SessionName())
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user