@@ -589,7 +589,7 @@ describe("subagent announce timeout config", () => {
589589 expect ( directAgentCall ?. params ?. message ) . not . toContain ( "older fallback" ) ;
590590 } ) ;
591591
592- it ( "preserves NO_REPLY when timeout history ends with silence after earlier progress " , async ( ) => {
592+ it ( "does not let pre-tool NO_REPLY hide a later timeout " , async ( ) => {
593593 chatHistoryMessages = [
594594 {
595595 role : "assistant" ,
@@ -613,7 +613,10 @@ describe("subagent announce timeout config", () => {
613613 roundOneReply : undefined ,
614614 } ) ;
615615
616- expect ( findFinalDirectAgentCall ( ) ) . toBeUndefined ( ) ;
616+ const directAgentCall = findFinalDirectAgentCall ( ) ;
617+ const internalEvents =
618+ ( directAgentCall ?. params ?. internalEvents as Array < { result ?: string } > ) ?? [ ] ;
619+ expect ( internalEvents [ 0 ] ?. result ) . toBe ( "2 tool call(s) made without visible output." ) ;
617620 } ) ;
618621
619622 it ( "prefers visible assistant progress over a later raw tool result" , async ( ) => {
@@ -640,7 +643,7 @@ describe("subagent announce timeout config", () => {
640643 expect ( internalEvents [ 0 ] ?. result ) . not . toContain ( "grep output" ) ;
641644 } ) ;
642645
643- it ( "preserves NO_REPLY when timeout partial- progress history mixes prior text and later silence" , async ( ) => {
646+ it ( "reports tool progress when a later tool invalidates timeout silence" , async ( ) => {
644647 chatHistoryMessages = [
645648 ...createTimeoutHistoryWithNoReply ( ) ,
646649 {
@@ -654,9 +657,12 @@ describe("subagent announce timeout config", () => {
654657 roundOneReply : undefined ,
655658 } ) ;
656659
657- expect (
658- findGatewayCall ( ( call ) => call . method === "agent" && call . expectFinal === true ) ,
659- ) . toBeUndefined ( ) ;
660+ const directAgentCall = findGatewayCall (
661+ ( call ) => call . method === "agent" && call . expectFinal === true ,
662+ ) ;
663+ const internalEvents =
664+ ( directAgentCall ?. params ?. internalEvents as Array < { result ?: string } > ) ?? [ ] ;
665+ expect ( internalEvents [ 0 ] ?. result ) . toBe ( "2 tool call(s) made without visible output." ) ;
660666 } ) ;
661667
662668 it ( "prefers later visible assistant progress over an earlier NO_REPLY marker" , async ( ) => {
0 commit comments