Skip to content

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

Closed as not planned

Description

@tim-smart

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

Activity

  1. github-actions commented on Oct 14, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions