Skip to content

fix(cron): publish deliver=false agent replies#1699

Closed
Alix-007 wants to merge 1 commit intosipeed:mainfrom
Alix-007:fix/issue-1058-cron-deliver-cleanbase
Closed

fix(cron): publish deliver=false agent replies#1699
Alix-007 wants to merge 1 commit intosipeed:mainfrom
Alix-007:fix/issue-1058-cron-deliver-cleanbase

Conversation

@Alix-007
Copy link
Contributor

Description

When a cron job runs with deliver=false, PicoClaw bypasses the normal inbound loop and ProcessDirectWithChannel returns the final agent text directly. The old path discarded that return value, so the user never saw the reply.

This change publishes the returned agent text to the outbound message bus when it is non-empty, while keeping blank/whitespace-only responses silent.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor

AI Code Generation

  • Fully AI-generated
  • Mostly AI-generated
  • Mostly Human-written

Related Issue

Fixes #1058

Technical Context

  • publish the ProcessDirectWithChannel return value for deliver=false cron jobs
  • keep blank replies silent to avoid noisy empty messages
  • add ExecuteJob regression coverage for both behaviors

Test Environment

  • Hardware: PC
  • OS: Linux
  • Model/Provider: N/A
  • Channels: N/A

Evidence

  • go test ./pkg/tools -run 'TestCronTool_'
  • go test ./pkg/tools -run 'TestCron'
  • go test ./cmd/picoclaw/internal/cron

Checklist

  • I reviewed the change.
  • I updated or added tests.

@sipeed-bot sipeed-bot bot added type: bug Something isn't working domain: tool domain: corn go Pull requests that update go code labels Mar 17, 2026
@Alix-007
Copy link
Contributor Author

Closing this to reduce duplicate review load in the crowded cron-response lane. The linked issue #1058 already has multiple open carriers (#1060, #1839), and this branch has stayed unreviewed without becoming the clear maintainer-preferred path. If this exact narrow fix is needed later, it should come back from a fresh clean base.

@Alix-007 Alix-007 closed this Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain: corn domain: tool go Pull requests that update go code type: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Cron deliver=false tasks silently discard LLM response — messages never reach channel

1 participant