From cbf1ede179c8366f10e06493a8c42fd0b7421859 Mon Sep 17 00:00:00 2001 From: Nicolas Blondiau Date: Tue, 2 Jun 2026 16:45:13 +0200 Subject: [PATCH] fix(email): skip progress messages to prevent empty emails after tool calls --- nanobot/channels/email.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nanobot/channels/email.py b/nanobot/channels/email.py index 4415b5ccf..e89537fc2 100644 --- a/nanobot/channels/email.py +++ b/nanobot/channels/email.py @@ -187,6 +187,11 @@ class EmailChannel(BaseChannel): self.logger.warning("SMTP host not configured") return + # Skip progress messages to prevent sending an empty email after each tool call + if (msg.metadata or {}).get("_progress"): + self.logger.debug("Skip progress message to {}", msg.chat_id) + return + to_addr = msg.chat_id.strip() if not to_addr: self.logger.warning("Missing recipient address")