anomalyco / anomalyco/opencode

v1.18.16 server/web mode: exactly 2 project skills silently dropped when project is a git repo (works in CLI, works without .git)

Open
#41,751 2 comments 0 reactions 1 assignee View on GitHub

@jlongster is already working on this.

Since Aug 11, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Summary

opencode v1.18.16 (server/web mode, --port): exactly 2 project skills are silently dropped when the project is inside a git repo — regardless of skill name, content, or mtimes. Without a .git directory, all skills load.

Same binary loads all skills in TUI/CLI mode, and in server mode all skills load if the project has no .git directory. The dropped skills are absent from /api/skill and from the skill tool — no error is surfaced.

Related: #41213 (external skill discovery silently finds nothing), #39871 (v2 skill discovery + git worktree).

Environment

  • opencode v1.18.16 (latest release, installed via curl installer) — also latest on npm (opencode-ai@1.18.16)
  • Linux x86_64
  • Server started with opencode --port <port> (same code path the VSCode extension uses)
  • Project: git repo, skills configured via skills.paths: ["./.opencode/skills"], 8 skills in .opencode/skills/<name>/SKILL.md

Steps to reproduce

  1. Create a project with N skills in .opencode/skills/ and a git init.
  2. Start the server: opencode --port 4129 (or via VSCode extension).
  3. Query skills: curl http://localhost:4129/skill (or run /skill in a session attached to the server).

Result: N-2 skills are returned. The same 2 are always missing (in our case backend-firebase and frontend-design-system).

Controls that rule out obvious causes:

Variation Skills loaded
TUI/CLI (opencode run "...") all (N)
Server mode, no .git/ present all (N)
Server mode, with .git/ N-2 (same 2 always dropped)
Rename the 2 dropped skills / swap content / touch mtimes still exactly 2 dropped (the new ones)
Remove the plugin, MCPs, extra agents from config still exactly 2 dropped
Same project copied to a different path (/tmp/...) still exactly 2 dropped
Copy with the .git dir removed all load
Systematic count across fresh copies (isolated, --port mode)
Skills created (N) Loaded Dropped
6 6 0
7 5 2
8 6 2
9 7 2
10 8 2

The pattern is always exactly 2 dropped when git is present, never an N-relative threshold — and it is deterministic (same skills dropped every run, reproducible across restarts).

Expected behavior

Server/web mode should load the same set of skills as the CLI/TUI. Nothing is dropped silently; at minimum a warning should be emitted.

Actual behavior

The skill tool description lists N-2 skills; the 2 missing ones return "not found". No error or warning appears in server logs.

Analysis / hypothesis

The drop appears tied to git-repo/worktree detection (issue #39871 describes the fs.up({ targets, start, stop }) discovery that stops at the git worktree boundary in v1 — #41213 confirms skill discovery silently returning nothing without surfacing an error). In server mode the project-root/worktree resolution seems to interfere with skills.paths, dropping a fixed subset. Only 2 are dropped (rather than all) even with a single skills.paths entry, which suggests per-entry dedup/last-wins behavior (like the Map keyed by skill id in v2's SkillV2.list()).

Happy to run any additional repro, capture logs, or bisect to a specific version if maintainers point me to the relevant code path.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.