@@ -712,7 +712,13 @@ describe("runCodexAppServerSideQuestion", () => {
712712 getSharedCodexAppServerClientMock . mockResolvedValue ( client ) ;
713713
714714 await expect (
715- runCodexAppServerSideQuestion ( sideParams ( ) , { nativeHookRelay : { enabled : true } } ) ,
715+ runCodexAppServerSideQuestion (
716+ sideParams ( {
717+ cfg : { tools : { loopDetection : { enabled : true } } } as never ,
718+ sessionKey : "agent:main:session-1" ,
719+ } ) ,
720+ { nativeHookRelay : { enabled : true } } ,
721+ ) ,
716722 ) . rejects . toThrow ( "fork failed" ) ;
717723
718724 expect ( relayIdDuringFork ) . toBeDefined ( ) ;
@@ -738,7 +744,13 @@ describe("runCodexAppServerSideQuestion", () => {
738744 getSharedCodexAppServerClientMock . mockResolvedValue ( client ) ;
739745
740746 await expect (
741- runCodexAppServerSideQuestion ( sideParams ( ) , { nativeHookRelay : { enabled : true } } ) ,
747+ runCodexAppServerSideQuestion (
748+ sideParams ( {
749+ cfg : { tools : { loopDetection : { enabled : true } } } as never ,
750+ sessionKey : "agent:main:session-1" ,
751+ } ) ,
752+ { nativeHookRelay : { enabled : true } } ,
753+ ) ,
742754 ) . resolves . toEqual ( { text : "Side answer." } ) ;
743755
744756 const forkParams = mockCall ( client . request ) [ 1 ] as Record < string , unknown > | undefined ;
@@ -855,15 +867,21 @@ describe("runCodexAppServerSideQuestion", () => {
855867
856868 startedAtMs = Date . now ( ) ;
857869 await expect (
858- runCodexAppServerSideQuestion ( sideParams ( ) , {
859- pluginConfig : {
860- appServer : {
861- requestTimeoutMs,
862- turnCompletionIdleTimeoutMs : completionTimeoutMs ,
870+ runCodexAppServerSideQuestion (
871+ sideParams ( {
872+ cfg : { tools : { loopDetection : { enabled : true } } } as never ,
873+ sessionKey : "agent:main:session-1" ,
874+ } ) ,
875+ {
876+ pluginConfig : {
877+ appServer : {
878+ requestTimeoutMs,
879+ turnCompletionIdleTimeoutMs : completionTimeoutMs ,
880+ } ,
863881 } ,
882+ nativeHookRelay : { enabled : true } ,
864883 } ,
865- nativeHookRelay : { enabled : true } ,
866- } ) ,
884+ ) ,
867885 ) . resolves . toEqual ( { text : "Side answer." } ) ;
868886
869887 expect ( relayIdDuringFork ) . toBeDefined ( ) ;
0 commit comments