Skip to content

fix(core): debounce compatibility skill reloads - #56260

Merged
kitlangton merged 1 commit into
betafrom
skill-watch-debounce
Oct 19, 2026
Merged

kitlangton merged 1 commit into
betafrom
skill-watch-debounce

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

Why

ConfigCompatibilityPlugin subscribes to config.changes() and runs reload directly 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 every SKILL.md under .claude/skills and .agents/skills, and calls ctx.skill.reload() in every booted Location.

What Changes

  • Filter config.changes() in ConfigCompatibilityPlugin to paths matching .claude/.agents roots or files within config.compatibility() roots, matching the pattern in ConfigAgentPlugin and ConfigCommandPlugin.
  • Publish matching config updates into the existing changes PubSub so they share the 100ms Stream.debounce("100 millis") window with direct skill directory watches.
Scenario Before After
Burst of N unrelated config updates (N = 3: opencode.json, commands/review.md, agents/reviewer.md) N (3) skill reloads 0 skill reloads
Burst of N compatibility updates within 100ms (N = 3) 3 immediate reloads 1 debounced reload

Scope

Owns filtering and debouncing config.changes() in ConfigCompatibilityPlugin and a focused unit test in packages/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/beta
  • packages/core/test/config/skill.test.ts (including ignores unrelated config updates and coalesces compatibility bursts into one reload) and packages/core/test/config/reload.test.ts: 23 passed, 0 failed.
  • bun typecheck in packages/core: passed.
  • bun run lint:changed origin/beta: passed.

@kitlangton
kitlangton merged commit b3a294f into beta Oct 19, 2026
12 checks passed
@kitlangton
kitlangton deleted the skill-watch-debounce branch October 19, 2026 06:12
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.
@amrkmn amrkmn mentioned this pull request Oct 27, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant