Repository navigation
Windows: GET /api/skill returns an empty array with skill roots configured (2.0.32) #57524
Description
Summary
On Windows, GET /api/skill returns {"data": []} even with skill roots configured, while the same request on macOS returns 48 entries. A session that already had the skill catalogue (recorded 2026-10-18) no longer receives one, so no skill can be loaded on either Windows machine.
Environment
- opencode version:
2.0.32on both Windows machines;2.1.1on macOS (same call returns 48 entries there) - OS: Windows 11,
Microsoft Windows [Version 10.0.26300.9711]; macOS Darwin 27.0.0 arm64 - Terminal: OpenCode desktop app (Windows);
cmd.exefor the headless checks - Shell:
cmd.exe(Windows),zsh(macOS) - Install/channel: release build. Windows uses the CLI shipped with the desktop app, copied to
%APPDATA%\npm\opencode.exe; macOS uses the app's own CLI - Active plugins:
C:/Users/usaki/.opencode/plugins/graphify/index.ts(one machine); the other machine has no plugins. The failure is identical on both
Reproduction
-
On Windows, configure two skill roots in
opencode.jsonc:"skills": [ "C:/Users/usaki/.config/opencode/agent-skills/skills", "C:/Users/usaki/.config/opencode/claude-video/skills" ],
-
Run
opencode api --standalone GET /api/skill. The private service reads the current config. -
Repeat with each of these variants, restarting the standalone service each time:
"skills": []"skills": ["C:/Users/usaki/.config/opencode/claude-video/skills"](one root, one skill inside)- backslash paths:
"C:\\Users\\usaki\\.config\\opencode\\agent-skills\\skills" - tilde paths:
"~/.config/opencode/agent-skills/skills"
-
Run the same request on macOS with the equivalent config.
Expected Behavior
/api/skill lists the skills found under the configured roots, as it does on macOS (48 entries with the same packs and the same package version), and the agent receives them in its system prompt.
Actual Behavior
Every Windows variant returns an empty list:
{"data": []}No skill-related lines appear in the service log, and an agent turn on that machine has no skills to load. The same packs, copied to the same relative layout, work on macOS.
Additional Context
- The directory contents are not the cause: each root contains
SKILL.mdfiles with frontmatter, and the identical tree returns 48 entries on macOS. - The config is not the cause: an empty array, a single-root array, and three path styles all return
[], so the loader is not reaching the configured roots at all on Windows. - It worked on the same Windows machine before: session data from 2026-10-18 contains the model counting its
available_skillslist ("Counting the skills in the available_skills list..."), so the catalogue was delivered by an earlier build. - Workaround tried: pointing the CLI's working directory at the config directory (rejected:
--diris not accepted before the subcommand), and using--standaloneso no cached service state is involved. Neither changed the result. - Frequency: consistent, both Windows machines, every run since the update.
- Version scope: these checks used the CLI copy at
%APPDATA%\npm\opencode.exereporting2.0.32. The desktop app on that machine was updated on 2026-10-20; the shipped CLI copy was not replaced, so the report is against 2.0.32.
Activity
opencode-agent commentedon Oct 20, 2026
Thanks for the detailed report. I could reproduce the empty list, and it isn't specific to Windows: on Linux, with one configured skill root,
opencode api --standalone GET /api/skillreturns{"data":[]}every time on 2.0.32 and also on 2.1.1. Even the built-inopencodeskill is missing, which matches what you saw with"skills": [].It looks like a startup timing issue. The skill list is read before the plugins that register skills have finished loading. With the background service, the first request for a project directory also returns
[], and the same request a few seconds later lists all the skills, including the ones from the configured root.--standalonealways starts a fresh server, so it always hits this. The handler for this endpoint is unchanged on the latestdev(3fdb13b). This is the same problem that the closed, unmerged PR #51687 tried to address.The script below reproduces it.
I couldn't check your other point, that agent turns on Windows get no skills at all. Agent sessions wait for plugins to finish loading before reading skills, so that part may be a separate Windows problem. A maintainer with a Windows machine will need to look at it.
Related: #51687 (same startup timing issue), #57035 (empty skill list, symlinked skills on Linux), #50147 (project skills missing from a session because of load order).
Reproduction script (repro.sh)
Run it:
bash repro.shpablomadriaga commentedon Oct 21, 2026
Additional Windows reproduction with the npm-installed OpenCode CLI v2.1.1 (headless API; no model prompt):
opencode api --standalone GET /api/skillreturned{"data":[]}despite an installed, valid skill.--print-logs --log-level allshowed no skill-loading error./api/skilland/api/pluginreads returned empty lists. Later reads for the same location returned skills (we observed 2, then 10, including our required skill) and 89 plugins. The skill file did not change.skill_missing, and stopped before creating an ACP session or sending a prompt. Preflight on a previously warmed location had succeeded, so itsreadyresult did not predict the fresh location's catalogue response.This corroborates the startup/readiness race identified above, not a permanently missing skill or a Windows-only loading failure. We have not established that the skill is absent from an actual agent session; the observed failure is specifically the early API catalogue response. Ideally
/api/skillwould wait for plugin activation (as proposed in #51687) or expose readiness so clients can distinguishnot initializedfrom a genuinely empty catalogue.pablomadriaga commentedon Oct 21, 2026
Thanks for the report. Could we keep this open until a fix or verified release is identified? Our independent Windows reproduction on the npm CLI v2.1.1 (above) found that a cold private
/api/skillrequest returned[], while later reads for the same project location returned the installed skills. The proposed readiness fix in #51687 was closed without merging, and I don't see a merged fix linked here. We added bounded retries against the same private server as a client-side workaround; the early API response remains ambiguous. If this was fixed in another commit or in v2.1.2, please point us to it and I'll retest. Otherwise, could this issue be reopened? This evidence concerns the API catalogue; it does not establish that skills are absent from actual agent sessions.