anomalyco / anomalyco/opencode

skills: project .agents created after startup is not discovered until config reload

Open
#42,478 0 comments 0 reactions 1 assignee View on GitHub

@jlongster is already working on this.

Since Aug 14, 2026.

2.0
Dominant language
TypeScript
Stars
209k
Forks
27.5k
Avg merge
7h 2m
Merged PRs (30d)
384

Description

This has been generated by AI:

Description

A project-level .agents/skills directory created after OpenCode has already opened the project is not discovered until something else triggers config.updated (or a service restart).

Config discovery only registers .agents when it already exists (fs.up()). Config watchers then only cover directory (.opencode, ~/.config/opencode) and file (opencode.json) entries, not a missing project .agents path. The skill plugin therefore never receives an AgentsDirectory source, so #41622's firstMissing() watcher is never installed.

#41622 should cover the case where .agents already exists and only skills/ appears later. It does not cover creating the whole .agents tree after startup.

Plugins

@ramtinj95/opencode-tokenscope (fails to load; unrelated)

OpenCode version

0.0.0-next-17430

Steps to reproduce
  1. Open a project that has no .agents directory.
  2. Create .agents/skills/<id>/SKILL.md.
  3. Check /api/skill or the skill catalog without restarting the service or changing config.
Screenshot and/or share link

Observed on 0.0.0-next-17430:

  • 12:15:35 project location services booted; no watch on <project>/.agents/skills
  • 12:16:10 .agents/skills/<id>/SKILL.md created
  • five-minute catalog.updated events did not rescan skill sources
  • 13:31:34 unrelated config.updated finally subscribed to <project>/.agents/skills and registered the skill
Operating System

macOS 26.5.0 (darwin arm64)

Terminal

Ghostty

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.