mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-30 07:52:41 +00:00
fix(cron): condition requireExplicitMessageTarget on resolved delivery (#28017)
When a cron job's delivery target resolution fails (resolvedDelivery.ok is false), the agent was still started with requireExplicitMessageTarget: true. This caused "Action send requires a target" errors because the agent's message tool demanded a target that was never resolved. Condition the flag on both deliveryRequested AND resolvedDelivery.ok so the agent can still use messaging tools freely when no valid delivery target exists. Fixes #27898 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -466,7 +466,10 @@ export async function runCronIsolatedAgentTurn(params: {
|
||||
verboseLevel: resolvedVerboseLevel,
|
||||
timeoutMs,
|
||||
runId: cronSession.sessionEntry.sessionId,
|
||||
requireExplicitMessageTarget: true,
|
||||
// Only enforce an explicit message target when the cron delivery target
|
||||
// was successfully resolved. When resolution fails the agent should not
|
||||
// be blocked by a target it cannot satisfy (#27898).
|
||||
requireExplicitMessageTarget: deliveryRequested && resolvedDelivery.ok,
|
||||
disableMessageTool: deliveryRequested,
|
||||
abortSignal,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user