fix: suppress intermediate progress output in cron jobs

Cron jobs now pass on_progress=_silent to process_direct, matching
the heartbeat pattern. Previously, tool hints and streaming deltas
were published to the user channel via bus during execution, but the
final response could be rejected by evaluate_response — leaving users
with confusing partial output and no conclusion.

Closes #3319
This commit is contained in:
chengyongru
2026-04-20 11:43:54 +08:00
committed by Xubin Ren
parent 8eddacf2f8
commit 79821a571f
2 changed files with 96 additions and 0 deletions
+5
View File
@@ -726,12 +726,17 @@ def _run_gateway(
cron_token = None
if isinstance(cron_tool, CronTool):
cron_token = cron_tool.set_cron_context(True)
async def _silent(*_args, **_kwargs):
pass
try:
resp = await agent.process_direct(
reminder_note,
session_key=f"cron:{job.id}",
channel=job.payload.channel or "cli",
chat_id=job.payload.to or "direct",
on_progress=_silent,
)
finally:
if isinstance(cron_tool, CronTool) and cron_token is not None: