Repository navigation
fix(core): debounce compatibility skill reloads - #56260
Merged
Merged
Conversation
Hona
pushed a commit
that referenced
this pull request
Oct 25, 2026
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.
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
ConfigCompatibilityPluginsubscribes toconfig.changes()and runsreloaddirectly on every raw config filesystem update without filtering or debouncing. Any file edit under any watched config root tears down existing skill watches, rescans and reparses everySKILL.mdunder.claude/skillsand.agents/skills, and callsctx.skill.reload()in every booted Location.What Changes
config.changes()inConfigCompatibilityPluginto paths matching.claude/.agentsroots or files withinconfig.compatibility()roots, matching the pattern inConfigAgentPluginandConfigCommandPlugin.changesPubSubso they share the 100msStream.debounce("100 millis")window with direct skill directory watches.Nunrelated config updates (N = 3:opencode.json,commands/review.md,agents/reviewer.md)N(3) skill reloads0skill reloadsNcompatibility updates within 100ms (N = 3)3immediate reloads1debounced reloadScope
Owns filtering and debouncing
config.changes()inConfigCompatibilityPluginand a focused unit test inpackages/core/test/config/skill.test.ts.Verification
bun test test/config/skill.test.ts test/config/reload.test.ts bun typecheck bun run lint:changed origin/betapackages/core/test/config/skill.test.ts(includingignores unrelated config updates and coalesces compatibility bursts into one reload) andpackages/core/test/config/reload.test.ts: 23 passed, 0 failed.bun typecheckinpackages/core: passed.bun run lint:changed origin/beta: passed.