-
-
Notifications
You must be signed in to change notification settings - Fork 52.7k
Description
Problem
When a cron job uses --channel quiubo without --to, OpenClaw core rejects with:
No delivery target resolved for channel "quiubo". Set delivery.to.
The Quiubo extension implements config.resolveDefaultTo() (added in bitlabs-com/quiubo#87), but core never calls it during cron delivery.
Root Cause
In src/cron/isolated-agent/delivery-target.ts, resolveDeliveryTarget() calls resolveSessionDeliveryTarget() which returns resolved.to. If resolved.to is falsy, core fails immediately at line ~3581:
if (!toCandidate) return {
ok: false,
error: new Error(`No delivery target resolved for channel "${channel}". Set delivery.to.`)
};Core never checks plugin.config.resolveDefaultTo() as a fallback.
By contrast, the direct send path in resolveOutboundTarget() (reply-*.js ~line 31711) does call resolveDefaultTo:
const effectiveTo = params.to?.trim() || (params.cfg && plugin.config.resolveDefaultTo
? plugin.config.resolveDefaultTo({ cfg: params.cfg, accountId })
: void 0);Expected Behavior
resolveDeliveryTarget should call plugin.config.resolveDefaultTo({ cfg, accountId }) as a fallback when toCandidate is empty, matching the behavior of resolveOutboundTarget.
Repro
openclaw cron add --name test --agent giskard --at +30s --channel quiubo --announce --message "hello"
# Result: runs, then fails with "No delivery target resolved"Adding --to <groupId> works fine.
Impact
Any channel plugin that implements resolveDefaultTo (to auto-resolve targets from session state) is broken for cron delivery. This affects Quiubo and potentially other plugins with dynamic conversation targets.
Workaround
Always pass --to <targetId> when creating crons for channels without a static default target.