@@ -7164,12 +7164,32 @@ describe("CodexAdapterV2 post-settle continuation", () => {
71647164 } ,
71657165 } ,
71667166 } ;
7167+ const initialSettings : CodexReplay . CodexAppServerReplayEntry = {
7168+ type : "emit_inbound" ,
7169+ frame : {
7170+ method : "thread/settings/updated" ,
7171+ params : {
7172+ threadId : RESUME_CHILD_THREAD ,
7173+ threadSettings : {
7174+ model : "gpt-6-astra" ,
7175+ effort : "low" ,
7176+ serviceTier : "ultrafast" ,
7177+ modelProvider : "openai" ,
7178+ cwd : "/workspace" ,
7179+ approvalPolicy : "never" ,
7180+ approvalsReviewer : "auto_review" ,
7181+ collaborationMode : { mode : "default" , settings : { model : "gpt-6-astra" } } ,
7182+ sandboxPolicy : { type : "dangerFullAccess" } ,
7183+ } ,
7184+ } ,
7185+ } ,
7186+ } ;
71677187 const harness = yield * makeCodexReplayHarness (
71687188 {
71697189 ...resumeSubagentTranscript ,
71707190 entries : resumeSubagentTranscript . entries . flatMap ( ( entry ) =>
71717191 entry . type === "emit_inbound" && entry . label === "turn/completed/root"
7172- ? [ entry , notification ]
7192+ ? [ entry , initialSettings , notification ]
71737193 : [ entry ] ,
71747194 ) ,
71757195 } ,
@@ -7198,12 +7218,10 @@ describe("CodexAdapterV2 post-settle continuation", () => {
71987218 yield * Deferred . succeed ( releaseMetadata , undefined ) ;
71997219 yield * TestClock . adjust ( "30 seconds" ) ;
72007220 assert . equal ( harness . subagentUpdates ( ) . at ( - 1 ) ?. subagent . model , model ) ;
7201- if ( method === "thread/settings/updated" ) {
7202- assert . deepEqual ( harness . subagentUpdates ( ) . at ( - 1 ) ?. subagent . modelSelection ?. options , [
7203- { id : "reasoningEffort" , value : "low" } ,
7204- { id : "serviceTier" , value : "ultrafast" } ,
7205- ] ) ;
7206- }
7221+ assert . deepEqual ( harness . subagentUpdates ( ) . at ( - 1 ) ?. subagent . modelSelection ?. options , [
7222+ { id : "reasoningEffort" , value : "low" } ,
7223+ { id : "serviceTier" , value : "ultrafast" } ,
7224+ ] ) ;
72077225 } ) . pipe ( Effect . provide ( Layer . merge ( IdAllocator . layer , NodeServices . layer ) ) ) ,
72087226 ) ,
72097227 ) ;
0 commit comments