@@ -170,6 +170,85 @@ describe("runCronIsolatedAgentTurn - meta.error status propagation", () => {
170170 expect ( result . delivered ) . toBe ( false ) ;
171171 } ) ;
172172
173+ it ( "keeps explicit silent replies as successful cron completions" , async ( ) => {
174+ runWithModelFallbackMock . mockResolvedValueOnce ( {
175+ result : {
176+ payloads : [ ] ,
177+ meta : {
178+ finalAssistantRawText : "NO_REPLY" ,
179+ finalAssistantVisibleText : "NO_REPLY" ,
180+ agentMeta : { usage : { input : 10 , output : 1 } } ,
181+ } ,
182+ } ,
183+ provider : "anthropic" ,
184+ model : "claude-opus-4-8" ,
185+ attempts : [ ] ,
186+ } ) ;
187+ resolveCronDeliveryPlanMock . mockReturnValue ( {
188+ requested : true ,
189+ mode : "announce" ,
190+ channel : "messagechat" ,
191+ to : "test-target" ,
192+ } ) ;
193+ resolveCronPayloadOutcomeMock . mockReturnValue ( {
194+ summary : undefined ,
195+ outputText : undefined ,
196+ synthesizedText : undefined ,
197+ deliveryPayload : undefined ,
198+ deliveryPayloads : [ ] ,
199+ deliveryPayloadHasStructuredContent : false ,
200+ hasFatalErrorPayload : false ,
201+ hasFatalStructuredErrorPayload : false ,
202+ embeddedRunError : undefined ,
203+ } ) ;
204+
205+ const result = await runCronIsolatedAgentTurn ( makeIsolatedAgentParamsFixture ( ) ) ;
206+
207+ expect ( dispatchCronDeliveryMock ) . toHaveBeenCalled ( ) ;
208+ expect ( result . status ) . toBe ( "ok" ) ;
209+ expect ( result . error ) . toBeUndefined ( ) ;
210+ } ) ;
211+
212+ it ( "keeps committed message-tool deliveries as successful cron completions" , async ( ) => {
213+ runWithModelFallbackMock . mockResolvedValueOnce ( {
214+ result : {
215+ payloads : [ ] ,
216+ didSendViaMessagingTool : true ,
217+ messagingToolSentTexts : [ "Delivered to an intentional recipient" ] ,
218+ messagingToolSentTargets : [ ] ,
219+ meta : {
220+ agentMeta : { usage : { input : 10 , output : 0 } } ,
221+ } ,
222+ } ,
223+ provider : "anthropic" ,
224+ model : "claude-opus-4-8" ,
225+ attempts : [ ] ,
226+ } ) ;
227+ resolveCronDeliveryPlanMock . mockReturnValue ( {
228+ requested : true ,
229+ mode : "announce" ,
230+ channel : "messagechat" ,
231+ to : "test-target" ,
232+ } ) ;
233+ resolveCronPayloadOutcomeMock . mockReturnValue ( {
234+ summary : undefined ,
235+ outputText : undefined ,
236+ synthesizedText : undefined ,
237+ deliveryPayload : undefined ,
238+ deliveryPayloads : [ ] ,
239+ deliveryPayloadHasStructuredContent : false ,
240+ hasFatalErrorPayload : false ,
241+ hasFatalStructuredErrorPayload : false ,
242+ embeddedRunError : undefined ,
243+ } ) ;
244+
245+ const result = await runCronIsolatedAgentTurn ( makeIsolatedAgentParamsFixture ( ) ) ;
246+
247+ expect ( dispatchCronDeliveryMock ) . toHaveBeenCalled ( ) ;
248+ expect ( result . status ) . toBe ( "ok" ) ;
249+ expect ( result . error ) . toBeUndefined ( ) ;
250+ } ) ;
251+
173252 it ( "does not mark empty deterministic approval prompts as cron errors" , async ( ) => {
174253 runWithModelFallbackMock . mockResolvedValueOnce ( {
175254 result : {
0 commit comments