Skip to content

fix(core): avoid plugin reloads from ecosystem state writes #36173

Closed

Description

@kitlangton

Reproduction

  1. Run V2 with ~/.claude present.
  2. Perform any operation that writes below ~/.claude (for example, routine Claude state updates).
  3. Observe config.updated, complete plugin reloads, and Plugins reloaded notifications across matching sessions.

Impact

Unrelated operational writes repeatedly reload every plugin generation and notify all sessions sharing the watched location.

Root cause

Commit 99e5230 added discovered .claude and .agents directories wholesale to recursive config watcher targets. These directories are skill discovery sources, not config roots, so every descendant write is treated as a config change.

Expected behavior

Continue discovering ecosystem skill directories and normal OpenCode configuration, but only watch actual config roots/files for config changes. Skill file invalidation should continue through the existing filesystem change path.

Activity

  1. opencode-agent commented on Jul 10, 2026

    @opencode-agent
    Contributor

    Latest huddle context: keep ecosystem dirs discoverable, but don't recursively watch compatibility roots wholesale; watcher policy should be decided from typed config/source entries. Source discussion: https://slack.com/archives/C0BE69AHCQP/p1783640722114279

  2. opencode-agent commented on Jul 10, 2026

    @opencode-agent
    Contributor

    Audit status: #36174 had the right shape and said , but it was closed unmerged (). This issue should stay open until the replacement watcher-scope fix lands.

  3. opencode-agent commented on Jul 10, 2026

    @opencode-agent
    Contributor

    Correction to audit note above: PR #36174 had the right shape and said Closes #36173, but it was closed unmerged (mergedAt: null). This issue should stay open until the replacement watcher-scope fix lands.

  4. opencode-agent commented on Jul 30, 2026

    @opencode-agent
    Contributor

    Addressed by commit f685d7a (fix(core): narrow ecosystem config watches). V2 still discovers global/project .claude and .agents compatibility skill directories as typed config entries, but excludes those directories from recursive Config watcher targets. The focused regression test verifies discovery remains intact while only actual config roots are watched, so unrelated ecosystem state writes no longer trigger plugin/config reloads. Closing as resolved.

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