fix: always send handoff mail (#973)

* fix: always send handoff mail

* fix: remove trailing slash from mayor in detectSenderFromCwd

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Artem Bambalov
2026-01-26 04:04:07 +02:00
committed by GitHub
parent fe09e59c8c
commit 072c4649de
2 changed files with 13 additions and 10 deletions

View File

@@ -173,9 +173,8 @@ func runHandoff(cmd *cobra.Command, args []string) error {
return nil return nil
} }
// If subject/message provided, send handoff mail to self first // Send handoff mail to self (defaults applied inside sendHandoffMail).
// The mail is auto-hooked so the next session picks it up // The mail is auto-hooked so the next session picks it up.
if handoffSubject != "" || handoffMessage != "" {
beadID, err := sendHandoffMail(handoffSubject, handoffMessage) beadID, err := sendHandoffMail(handoffSubject, handoffMessage)
if err != nil { if err != nil {
style.PrintWarning("could not send handoff mail: %v", err) style.PrintWarning("could not send handoff mail: %v", err)
@@ -183,7 +182,6 @@ func runHandoff(cmd *cobra.Command, args []string) error {
} else { } else {
fmt.Printf("%s Sent handoff mail %s (auto-hooked)\n", style.Bold.Render("📬"), beadID) fmt.Printf("%s Sent handoff mail %s (auto-hooked)\n", style.Bold.Render("📬"), beadID)
} }
}
// NOTE: reportAgentState("stopped") removed (gt-zecmc) // NOTE: reportAgentState("stopped") removed (gt-zecmc)
// Agent liveness is observable from tmux - no need to record it in bead. // Agent liveness is observable from tmux - no need to record it in bead.

View File

@@ -182,6 +182,11 @@ func detectSenderFromCwd() string {
} }
} }
// If in the town's mayor directory
if strings.Contains(cwd, "/mayor") {
return "mayor"
}
// Default to overseer (human) // Default to overseer (human)
return "overseer" return "overseer"
} }