Repository navigation
fix(core): reload compatibility skills only for their own sources - #59086
Conversation
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Backport of #56260 (Kit Langton) from
beta.Problem
The compatibility plugin, which loads skills from
.claudeand.agentsfolders, reloaded every skill on any config change. An unrelated edit caused a full rescan and a skill update event for every client.Change
ConfigCompatibilityPluginfilters config changes and reloads only when the changed path is inside one of its skill roots, or is a.claudeor.agentsfolder itself, so a newly created folder is still picked up. Changes to skills themselves reload as before.No API change.
Testing
typecheck:tscpasses in core.core/test/config/skill.test.tsadds 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