@@ -168,19 +168,14 @@ export const OpenCodeDriver: ProviderDriver<OpenCodeSettings, OpenCodeDriverEnv>
168168 Effect . provideService ( OpenCodeServerOwner . OpenCodeServerOwner , serverOwner ) ,
169169 Effect . provideService ( OpenCodeRuntime , openCodeRuntime ) ,
170170 ) ;
171- // NOTE: the local branch intentionally uses the shared SDK server
172- // instead of `opencode debug skill` (loadSkillsFromCli). The CLI writes
173- // its full JSON inventory to stdout, but the Bun-compiled binary does
174- // not flush more than one 64KB pipe buffer to a non-TTY stdout, so the
175- // piped output arrives truncated and unparseable — which degrades to an
176- // empty skill list and poisons the workspace snapshot the `$` picker
177- // reads. The SDK `app.skills` endpoint honors the per-request directory
178- // and returns complete results regardless of size.
179- const loadWorkspaceInventory = ( client : Parameters < typeof loadOpenCodeCommands > [ 0 ] ) =>
171+ const loadWorkspaceInventory = (
172+ client : Parameters < typeof loadOpenCodeCommands > [ 0 ] ,
173+ directory : string ,
174+ ) =>
180175 Effect . all (
181176 {
182- skills : openCodeRuntime . loadOpenCodeSkills ( client ) ,
183- commands : loadOpenCodeCommands ( client ) . pipe (
177+ skills : openCodeRuntime . loadOpenCodeSkills ( client , directory ) ,
178+ commands : loadOpenCodeCommands ( client , directory ) . pipe (
184179 Effect . timeout ( "10 seconds" ) ,
185180 Effect . orElseSucceed ( ( ) => [ ] ) ,
186181 ) ,
@@ -202,23 +197,22 @@ export const OpenCodeDriver: ProviderDriver<OpenCodeSettings, OpenCodeDriverEnv>
202197 } ) ;
203198 const client = openCodeRuntime . createOpenCodeSdkClient ( {
204199 baseUrl : server . url ,
205- directory : cwd ,
206200 ...( effectiveConfig . serverPassword
207201 ? { serverPassword : effectiveConfig . serverPassword }
208202 : { } ) ,
209203 } ) ;
210- return yield * loadWorkspaceInventory ( client ) ;
204+ return yield * loadWorkspaceInventory ( client , cwd ) ;
211205 } ) ,
212206 )
213207 : serverOwner . withServer ( ( server ) =>
214208 loadWorkspaceInventory (
215209 openCodeRuntime . createOpenCodeSdkClient ( {
216210 baseUrl : server . url ,
217- directory : cwd ,
218211 ...( server . serverPassword !== undefined
219212 ? { serverPassword : server . serverPassword }
220213 : { } ) ,
221214 } ) ,
215+ cwd ,
222216 ) ,
223217 ) ;
224218
0 commit comments