Skip to content

fix(core): reload compatibility skills only for their own sources - #59086

Merged
Hona merged 1 commit into
devfrom
backport-skill-reload
Oct 25, 2026
Merged

Hona merged 1 commit into
devfrom
backport-skill-reload

Conversation

@Hona

@Hona Hona commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

Backport of #56260 (Kit Langton) from beta.

Problem

The compatibility plugin, which loads skills from .claude and .agents folders, reloaded every skill on any config change. An unrelated edit caused a full rescan and a skill update event for every client.

Change

ConfigCompatibilityPlugin filters config changes and reloads only when the changed path is inside one of its skill roots, or is a .claude or .agents folder itself, so a newly created folder is still picked up. Changes to skills themselves reload as before.

No API change.

Testing

  • typecheck:tsc passes in core.
  • core/test/config/skill.test.ts adds a case where unrelated config changes do not reload compatibility skills while a skill change still does. It passes.

Added by the opencode bot (AI-generated).

Fixes #53393

Related: #54114

Backport of #56260 from beta. Any config change reloaded every .claude and
.agents skill and published a skill update. The compatibility plugin now
reloads only when the changed path is a compatibility skill directory or a
.claude or .agents folder.
Copilot AI balanced review requested due to automatic review settings October 25, 2026 22:56
@Hona
Hona enabled auto-merge (squash) October 25, 2026 22:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@Hona
Hona merged commit eba3399 into dev Oct 25, 2026
13 checks passed
@Hona
Hona deleted the backport-skill-reload branch October 25, 2026 23:03

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks sound. Before the fix, 20 appends to an unrelated file in the global config directory made the serve server rebuild its ~/.claude/skills watcher on every write. With this PR it stays idle. The new test fails on the base and passes here. The existing live tests where .claude/.agents appear after startup still pass, and typecheck:tsc passes.

Config changes now go through the same 100 ms debounce as skill-folder changes. Matching on the .claude/.agents folder name covers creation and deletion of a root, because the config watcher reports those as entry events on the parent folder.

Public API is unchanged.

Fixes #53393
Related: #54114

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

core: any file write inside the config directory triggers an un-debounced compatibility reload — ~/.claude/skills watcher resubscribe loop (v2.0.23)

3 participants