1+ import path from "node:path" ;
12import { afterEach , expect , it } from "vitest" ;
23import { AgentMode } from "../../../AgentMode" ;
34import {
@@ -90,7 +91,7 @@ describeE2E("E2E tests", () => {
9091 } ) ;
9192 } ) ;
9293
93- it ( "lists a user skill from the wrapped CODEX_HOME" , async ( ) => {
94+ it ( "lists a user skill from the CODEX_HOME" , async ( ) => {
9495 fixture = await createAuthenticatedFixture ( ) ;
9596 fixture . writeSkill ( {
9697 name : "integration-skill" ,
@@ -103,4 +104,28 @@ describeE2E("E2E tests", () => {
103104 expect ( text ) . toContain ( "- integration-skill: Integration skill" ) ;
104105 } ) ;
105106 } ) ;
107+
108+ // Currently, `additionalRoots` are not propagated when listing skills
109+ it . skip ( "lists skills from additional session roots" , async ( ) => {
110+ fixture = await createAuthenticatedFixture ( ) ;
111+ const additionalSkillsRoot = path . join ( fixture . workspaceDir , "custom-skills" ) ;
112+ fixture . writeSkill ( {
113+ name : "session-root-skill" ,
114+ description : "Session root skill" ,
115+ body : "This skill exists only in an additional root passed at session creation." ,
116+ } , additionalSkillsRoot ) ;
117+
118+ const session = await fixture . connection . newSession ( {
119+ cwd : fixture . workspaceDir ,
120+ mcpServers : [ ] ,
121+ _meta : {
122+ additionalRoots : [ additionalSkillsRoot ] ,
123+ } ,
124+ } ) ;
125+
126+ await fixture . expectPromptText ( session . sessionId , "/skills" , ( text ) => {
127+ expect ( text ) . toContain ( "Available skills:" ) ;
128+ expect ( text ) . toContain ( "- session-root-skill: Session root skill" ) ;
129+ } ) ;
130+ } ) ;
106131} ) ;
0 commit comments