@@ -215,60 +215,6 @@ describe('ACP server test', { timeout: 40_000 }, () => {
215215 expect ( logoutSpy ) . toHaveBeenCalledWith ( { } ) ;
216216 } ) ;
217217
218- it ( 'prefetches session additional skill roots before thread start' , async ( ) => {
219- const mockFixture = createCodexMockTestFixture ( ) ;
220- const codexAcpClient = mockFixture . getCodexAcpClient ( ) ;
221- const codexAppServerClient = mockFixture . getCodexAppServerClient ( ) ;
222-
223- const listSkillsSpy = vi . spyOn ( codexAppServerClient , "listSkills" ) . mockResolvedValue ( { data : [ ] } ) ;
224- const threadStartSpy = vi . spyOn ( codexAppServerClient , "threadStart" ) . mockResolvedValue ( {
225- thread : { id : "thread-id" } as any ,
226- model : "gpt-5" ,
227- modelProvider : "openai" ,
228- cwd : "/workspace" ,
229- approvalPolicy : "on-request" ,
230- sandbox : "workspace-write" ,
231- reasoningEffort : "medium" ,
232- } as any ) ;
233- vi . spyOn ( codexAppServerClient , "listModels" ) . mockResolvedValue ( {
234- data : [ {
235- id : "gpt-5" ,
236- model : "gpt-5" ,
237- upgrade : null ,
238- upgradeInfo : null ,
239- availabilityNux : null ,
240- displayName : "gpt-5" ,
241- description : "test model" ,
242- hidden : false ,
243- supportedReasoningEfforts : [ { reasoningEffort : "medium" , description : "balanced" } ] ,
244- defaultReasoningEffort : "medium" ,
245- inputModalities : [ "text" ] ,
246- supportsPersonality : false ,
247- additionalSpeedTiers : [ ] ,
248- isDefault : true
249- } ] ,
250- nextCursor : null
251- } ) ;
252-
253- await codexAcpClient . newSession ( {
254- cwd : "/workspace" ,
255- mcpServers : [ ] ,
256- _meta : {
257- additionalRoots : [ "/skills/one" , " /skills/two " , 7 ]
258- }
259- } ) ;
260-
261- expect ( listSkillsSpy ) . toHaveBeenCalledWith ( {
262- cwds : [ "/workspace" ] ,
263- forceReload : true ,
264- perCwdExtraUserRoots : [ {
265- cwd : "/workspace" ,
266- extraUserRoots : [ "/skills/one" , "/skills/two" ]
267- } ]
268- } ) ;
269- expect ( listSkillsSpy . mock . invocationCallOrder [ 0 ] ! ) . toBeLessThan ( threadStartSpy . mock . invocationCallOrder [ 0 ] ! ) ;
270- } ) ;
271-
272218 it ( 'waits for typed mcp startup status updates and returns terminal states' , async ( ) => {
273219 const mockFixture = createCodexMockTestFixture ( ) ;
274220 const codexAcpClient = mockFixture . getCodexAcpClient ( ) ;
@@ -358,45 +304,6 @@ describe('ACP server test', { timeout: 40_000 }, () => {
358304 expect ( session . sessionId ) . toBe ( "thread-id" ) ;
359305 } ) ;
360306
361- it ( 'prefetches session additional skill roots before turn start' , async ( ) => {
362- const mockFixture = createCodexMockTestFixture ( ) ;
363- const codexAcpAgent = mockFixture . getCodexAcpAgent ( ) ;
364- const codexAppServerClient = mockFixture . getCodexAppServerClient ( ) ;
365-
366- const listSkillsSpy = vi . spyOn ( codexAppServerClient , "listSkills" ) . mockResolvedValue ( { data : [ ] } ) ;
367- const turnStartSpy = vi . spyOn ( codexAppServerClient , "turnStart" ) . mockResolvedValue ( {
368- turn : { id : "turn-id" , items : [ ] , status : "inProgress" , error : null }
369- } as any ) ;
370- vi . spyOn ( codexAppServerClient , "awaitTurnCompleted" ) . mockResolvedValue ( {
371- threadId : "session-id" ,
372- turn : { id : "turn-id" , items : [ ] , status : "completed" , error : null }
373- } as any ) ;
374-
375- vi . spyOn ( codexAcpAgent , "getSessionState" ) . mockReturnValue ( createTestSessionState ( {
376- sessionId : "session-id" ,
377- cwd : "/workspace"
378- } ) ) ;
379-
380- const promptRequest : acp . PromptRequest = {
381- sessionId : "session-id" ,
382- prompt : [ { type : "text" , text : "Hello" } ] ,
383- _meta : {
384- additionalRoots : [ "/skills/one" , " /skills/two " , 7 ]
385- }
386- } ;
387- await codexAcpAgent . prompt ( promptRequest ) ;
388-
389- expect ( listSkillsSpy ) . toHaveBeenCalledWith ( {
390- cwds : [ "/workspace" ] ,
391- forceReload : true ,
392- perCwdExtraUserRoots : [ {
393- cwd : "/workspace" ,
394- extraUserRoots : [ "/skills/one" , "/skills/two" ]
395- } ]
396- } ) ;
397- expect ( listSkillsSpy . mock . invocationCallOrder [ 0 ] ! ) . toBeLessThan ( turnStartSpy . mock . invocationCallOrder [ 0 ] ! ) ;
398- } ) ;
399-
400307 it ( 'passes provided skill resource links as prompt skill items' , async ( ) => {
401308 const mockFixture = createCodexMockTestFixture ( ) ;
402309 const codexAcpClient = mockFixture . getCodexAcpClient ( ) ;
@@ -414,7 +321,7 @@ describe('ACP server test', { timeout: 40_000 }, () => {
414321 { type : "text" , text : "$extra-skill do the work" } ,
415322 { type : "resource_link" , name : "extra-skill" , uri : "file:///skills/extra-skill/SKILL.md" } ,
416323 ] ,
417- } , AgentMode . DEFAULT_AGENT_MODE , ModelId . create ( "gpt-5" , "medium" ) , false , "/workspace" ) ;
324+ } , AgentMode . DEFAULT_AGENT_MODE , ModelId . create ( "gpt-5" , "medium" ) , null , false , "/workspace" ) ;
418325
419326 expect ( runTurnSpy ) . toHaveBeenCalledWith ( expect . objectContaining ( {
420327 input : [
0 commit comments