diff --git a/src/cron/isolated-agent/channel-output-policy.test.ts b/src/cron/isolated-agent/channel-output-policy.test.ts index f715a5838b01..9277da818d3d 100644 --- a/src/cron/isolated-agent/channel-output-policy.test.ts +++ b/src/cron/isolated-agent/channel-output-policy.test.ts @@ -56,6 +56,16 @@ describe("cron channel output policy", () => { ).resolves.toEqual({ preferFinalAssistantVisibleText: false, }); + // deliveryRequested is optional — undefined and missing opts are + // equivalent to "not requested" (no channel to deliver to). #90664 + await expect( + resolveCronChannelOutputPolicy(undefined, { deliveryRequested: undefined }), + ).resolves.toEqual({ + preferFinalAssistantVisibleText: true, + }); + await expect(resolveCronChannelOutputPolicy(undefined)).resolves.toEqual({ + preferFinalAssistantVisibleText: true, + }); }); it("lets channel plugins format current tool context targets", async () => { diff --git a/src/cron/isolated-agent/channel-output-policy.ts b/src/cron/isolated-agent/channel-output-policy.ts index cfcba842a2e3..bf68dac2d7ca 100644 --- a/src/cron/isolated-agent/channel-output-policy.ts +++ b/src/cron/isolated-agent/channel-output-policy.ts @@ -21,7 +21,7 @@ export async function resolveCronChannelOutputPolicy( }> { const channelId = normalizeOptionalLowercaseString(channel); if (!channelId) { - return { preferFinalAssistantVisibleText: opts?.deliveryRequested === false }; + return { preferFinalAssistantVisibleText: opts?.deliveryRequested !== true }; } const { getChannelPlugin } = await loadChannelPluginRuntime(); return {