fix: deliver cron output to explicit targets (#16360) (thanks @rubyrunsstuff)

This commit is contained in:
Shadow
2026-02-14 12:39:31 -06:00
committed by Shadow
parent d14be8472e
commit a73ccf2b53
4 changed files with 34 additions and 28 deletions

View File

@@ -558,9 +558,12 @@ export async function runCronIsolatedAgentTurn(params: {
}
const identity = resolveAgentOutboundIdentity(cfgWithAgentDefaults, agentId);
// Shared subagent announce flow is text-based. When we have an explicit sender
// identity to preserve, prefer direct outbound delivery even for plain-text payloads.
if (deliveryPayloadHasStructuredContent || identity) {
// Shared subagent announce flow is text-based and prompts the main agent to
// summarize. When we have an explicit delivery target (delivery.to), sender
// identity, or structured content, prefer direct outbound delivery to send
// the actual cron output without summarization.
const hasExplicitDeliveryTarget = Boolean(deliveryPlan.to);
if (deliveryPayloadHasStructuredContent || identity || hasExplicitDeliveryTarget) {
try {
const payloadsForDelivery =
deliveryPayloadHasStructuredContent && deliveryPayloads.length > 0