diff --git a/pkg/tools/cron.go b/pkg/tools/cron.go index 6888d1326..e876b9725 100644 --- a/pkg/tools/cron.go +++ b/pkg/tools/cron.go @@ -337,7 +337,16 @@ func (t *CronTool) ExecuteJob(ctx context.Context, job *cron.CronJob) string { return fmt.Sprintf("Error: %v", err) } - // Response is automatically sent via MessageBus by AgentLoop - _ = response // Will be sent by AgentLoop + // Send agent response to channel (ProcessDirectWithChannel does not + // publish on its own — only the Run() inbound loop does that). + if response != "" { + pubCtx, pubCancel := context.WithTimeout(context.Background(), 5*time.Second) + defer pubCancel() + t.msgBus.PublishOutbound(pubCtx, bus.OutboundMessage{ + Channel: channel, + ChatID: chatID, + Content: response, + }) + } return "ok" }