diff --git a/internal/mail/router.go b/internal/mail/router.go index dc56aad9..29a928da 100644 --- a/internal/mail/router.go +++ b/internal/mail/router.go @@ -863,7 +863,7 @@ func (r *Router) GetMailbox(address string) (*Mailbox, error) { } // notifyRecipient sends a notification to a recipient's tmux session. -// Uses send-keys to echo a visible banner to ensure notification is seen. +// Uses NudgeSession to add the notification to the agent's conversation history. // Supports mayor/, rig/polecat, and rig/refinery addresses. func (r *Router) notifyRecipient(msg *Message) error { sessionID := addressToSessionID(msg.To) @@ -877,8 +877,9 @@ func (r *Router) notifyRecipient(msg *Message) error { return nil // No active session, skip notification } - // Send visible notification banner to the terminal - return r.tmux.SendNotificationBanner(sessionID, msg.From, msg.Subject) + // Send notification to the agent's conversation history + notification := fmt.Sprintf("📬 You have new mail from %s. Subject: %s. Run 'gt mail inbox' to read.", msg.From, msg.Subject) + return r.tmux.NudgeSession(sessionID, notification) } // addressToSessionID converts a mail address to a tmux session ID.