feat(crew): add resume prompt when restarting Claude
When `gt crew at` detects Claude has exited (shell running), or when `gt crew restart` is used, now sends a crew-specific prompt after priming: "Read your mail, act on anything urgent, else await instructions." This gives crew workers clear direction on resume without requiring manual prompting. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -547,6 +547,11 @@ func runCrewAt(cmd *cobra.Command, args []string) error {
|
|||||||
if err := t.SendKeys(sessionID, "gt prime"); err != nil {
|
if err := t.SendKeys(sessionID, "gt prime"); err != nil {
|
||||||
fmt.Printf("Warning: Could not send prime command: %v\n", err)
|
fmt.Printf("Warning: Could not send prime command: %v\n", err)
|
||||||
}
|
}
|
||||||
|
// Send crew resume prompt after prime completes
|
||||||
|
crewPrompt := "Read your mail, act on anything urgent, else await instructions."
|
||||||
|
if err := t.SendKeysDelayed(sessionID, crewPrompt, 3000); err != nil {
|
||||||
|
fmt.Printf("Warning: Could not send resume prompt: %v\n", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -815,6 +820,12 @@ func runCrewRestart(cmd *cobra.Command, args []string) error {
|
|||||||
fmt.Printf("Warning: Could not send prime command: %v\n", err)
|
fmt.Printf("Warning: Could not send prime command: %v\n", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Send crew resume prompt after prime completes
|
||||||
|
crewPrompt := "Read your mail, act on anything urgent, else await instructions."
|
||||||
|
if err := t.SendKeysDelayed(sessionID, crewPrompt, 3000); err != nil {
|
||||||
|
fmt.Printf("Warning: Could not send resume prompt: %v\n", err)
|
||||||
|
}
|
||||||
|
|
||||||
fmt.Printf("%s Restarted crew workspace: %s/%s\n",
|
fmt.Printf("%s Restarted crew workspace: %s/%s\n",
|
||||||
style.Bold.Render("✓"), r.Name, name)
|
style.Bold.Render("✓"), r.Name, name)
|
||||||
fmt.Printf("Attach with: %s\n", style.Dim.Render(fmt.Sprintf("gt crew at %s", name)))
|
fmt.Printf("Attach with: %s\n", style.Dim.Render(fmt.Sprintf("gt crew at %s", name)))
|
||||||
|
|||||||
Reference in New Issue
Block a user