From e18eab80548e1f88e0b1e6c539b5c6688038e850 Mon Sep 17 00:00:00 2001 From: Jiajun Xie Date: Tue, 14 Apr 2026 09:10:12 +0800 Subject: [PATCH] fix(cron): respect deliver flag before message tool check When deliver: false is set in cron job payload, suppress all output even when agent calls message tool during the turn. Closes #3115 --- nanobot/cli/commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nanobot/cli/commands.py b/nanobot/cli/commands.py index 81aeb7d0..f3f95fd0 100644 --- a/nanobot/cli/commands.py +++ b/nanobot/cli/commands.py @@ -729,7 +729,7 @@ def gateway( response = resp.content if resp else "" message_tool = agent.tools.get("message") - if isinstance(message_tool, MessageTool) and message_tool._sent_in_turn: + if job.payload.deliver and isinstance(message_tool, MessageTool) and message_tool._sent_in_turn: return response if job.payload.deliver and job.payload.to and response: