@@ -7816,6 +7816,44 @@ describe("runCodexAppServerAttempt", () => {
78167816 expect ( interrupt ?. params ) . toEqual ( { threadId : "thread-1" , turnId : "turn-1" } ) ;
78177817 } ) ;
78187818
7819+ it ( "accepts message-tool-only steering for active Codex app-server source replies" , async ( ) => {
7820+ const { requests, waitForMethod, completeTurn } = createStartedThreadHarness ( ) ;
7821+ const params = createParams (
7822+ path . join ( tempDir , "session.jsonl" ) ,
7823+ path . join ( tempDir , "workspace" ) ,
7824+ ) ;
7825+ params . sourceReplyDeliveryMode = "message_tool_only" ;
7826+
7827+ const run = runCodexAppServerAttempt ( params ) ;
7828+ await waitForMethod ( "turn/start" ) ;
7829+
7830+ expect (
7831+ queueActiveRunMessageForTest ( "session-1" , "subagent complete" , {
7832+ debounceMs : 1 ,
7833+ steeringMode : "all" ,
7834+ sourceReplyDeliveryMode : "message_tool_only" ,
7835+ } ) ,
7836+ ) . toBe ( true ) ;
7837+
7838+ await vi . waitFor (
7839+ ( ) =>
7840+ expect ( requests . filter ( ( entry ) => entry . method === "turn/steer" ) ) . toEqual ( [
7841+ {
7842+ method : "turn/steer" ,
7843+ params : {
7844+ threadId : "thread-1" ,
7845+ expectedTurnId : "turn-1" ,
7846+ input : [ { type : "text" , text : "subagent complete" , text_elements : [ ] } ] ,
7847+ } ,
7848+ } ,
7849+ ] ) ,
7850+ { interval : 1 } ,
7851+ ) ;
7852+
7853+ await completeTurn ( { threadId : "thread-1" , turnId : "turn-1" } ) ;
7854+ await run ;
7855+ } ) ;
7856+
78197857 it ( "batches default queued steering before sending turn/steer" , async ( ) => {
78207858 const { requests, waitForMethod, completeTurn } = createStartedThreadHarness ( ) ;
78217859
0 commit comments