diff --git a/nanobot/heartbeat/service.py b/nanobot/heartbeat/service.py index 831ae85..916c813 100644 --- a/nanobot/heartbeat/service.py +++ b/nanobot/heartbeat/service.py @@ -153,9 +153,15 @@ class HeartbeatService: logger.info("Heartbeat: OK (nothing to report)") return + taskmessage = tasks + "\n\n**IMPORTANT NOTICE:** If there is nothing material to report, reply only with ." + logger.info("Heartbeat: tasks found, executing...") if self.on_execute: - response = await self.on_execute(tasks) + response = await self.on_execute(taskmessage) + + if response and "" in response: + logger.info("Heartbeat: OK (silenced by agent)") + return if response and self.on_notify: logger.info("Heartbeat: completed, delivering response") await self.on_notify(response)