Skip to content

fix(context-budget,claude-ops): align with the observed enabledPlugins rule #4660

Closed

Description

@kyle-sexton

Problem

Part of #4657

PR #4376 established that the product does not apply the defaultEnabled fallback. It made
claude-ops:audit-skill-visibility follow that, with a verification record at
plugins/claude-ops/skills/audit-skill-visibility/SKILL.md:155-164. The observed rule: an
installed plugin loads only when an enabledPlugins scope sets it true. This was seen on Claude
Code 2.1.280 in claude plugin list --json and in the live skill listing. The docs still say
otherwise. Three surfaces were not aligned, all at origin/main 946caf11:

  1. plugins/context-budget/skills/audit/reference/levers.json:257 (lever plugin-disable) says
    the key applies "with the plugin's defaultEnabled as fallback", which is the documented rule and
    not the observed one.
  2. plugins/claude-ops/skills/plugins/context/sync-install-enable.md:149-156 (Step 5) cites
    scope-semantics.md for the claim that a marketplace entry's defaultEnabled "takes
    precedence over the plugin's own plugin.json field". scope-semantics.md has no defaultEnabled content (0 matches), so the
    citation is dangling.
  3. plugins/claude-ops/skills/audit-skill-visibility/scripts/audit_skill_visibility.py:955-961
    (merge_enabled_plugins) drops a non-Boolean enabledPlugins value and still honors its
    Boolean siblings in the same file. Per the item, the fix(claude-ops): count never-enabled plugins as not-enabled in audit-skill-visibility #4376 gate measured something different:
    the product rejects the whole user settings file when any value is non-Boolean, so its true
    siblings also read disabled.

Evidence

Verified this pass:

  • All three citations read at origin/main.
  • Docs re-fetched 2026-09-27 still state the fallback:
    • settings-reference.md line 4554: "A plugin with no entry at any scope falls back to its
      defaultEnabled value", and line 4558: "Default: unset, so each plugin follows its
      defaultEnabled value".
    • plugins-reference.md line 137: defaultEnabled "Defaults to true"; line 638: a marketplace
      entry's defaultEnabled overrides the manifest's.

Verdict on the fleet-state.sh recheck: the behavior is correct under the observed rule, and no
code change is needed. fleet-state.sh:1039-1043 computes missing_from_enabled as installed
ids no readable scope names, minus marketplace ids shipped defaultEnabled: false.

  • Under the observed rule, every id on that list is not loading. So Step 5's enable is a real
    load gap, not only a completeness nicety.
  • Skipping the defaultEnabled: false ids still matches the publisher's opt-in intent.
  • The residual gap Step 5 already names still stands: a defaultEnabled: false that lives only
    in plugin.json is not excluded.
  • Only the prose needs work: the dangling citation, plus one sentence stating the observed rule.

Not re-verified: the non-Boolean whole-file rejection. It is not in PR #4376's body or comments;
the only source is the item's note. Confirming it needs a sandboxed probe (CLAUDE_CONFIG_DIR
pointed at a fixture directory) with a user settings file holding one "yes" value and one
true value.

Proposed approach

  1. levers.json:257: state the observed rule ("a plugin no scope names does not load, whatever
    its defaultEnabled; the settings reference says it falls back to defaultEnabled"). Carry the
    same verification record fields as the claude-ops record: 2.1.280, 2026-09-23, and the recheck
    trigger "a Claude Code release that applies the fallback, or the docs dropping it". Then run
    the context-budget levers tests.
  2. sync-install-enable.md Step 5: point the precedence claim at plugins-reference
    (#default-enablement, line 638 of the raw page). Add one sentence saying an id on missing_from_enabled
    is not loading today (link the audit-skill-visibility record).
  3. Non-Boolean handling needs a decision (why needs-decision). Points 1 and 2 are plain fixes
    and do not wait on it; ship them first if the decision lags.
    • Option A (recommended, after the sandbox probe confirms the claim): mirror the product.
      A settings file holding any non-Boolean enabledPlugins value resolves every key in that
      file to disabled. The evidence line names the offending key.
    • Option B: keep honoring the Boolean siblings and add a warning saying the product may
      reject the whole file.
    • If the probe does not reproduce the claim, close this point with the probe output.

Acceptance criteria

  • levers.json plugin-disable states the observed rule with a four-part verification
    record, and the context-budget tests pass.
  • sync-install-enable.md has no citation to scope-semantics.md for defaultEnabled, and
    it states that ids on missing_from_enabled are not loading.
  • Non-Boolean handling decided. If A, a test_audit_skill_visibility.py case with one "yes"
    and one true in a single file expects both keys disabled, fails red on origin/main, and
    passes green after the change.
  • Touched plugins are bumped with CHANGELOG entries, and check-changelog-parity.sh --check-bump passes.

Constraints and gotchas

  • The probe must never touch the real ~/.claude. Use a fixture CLAUDE_CONFIG_DIR and HOME
    under a scratch directory. If claude plugin list does not honor CLAUDE_CONFIG_DIR, do not
    run it.

  • Upstream report: the item carries a draft for anthropics/claude-code titled "defaultEnabled
    fallback documented but not applied: unnamed installed plugins report disabled". Its evidence:

    • Claude Code 2.1.280, Windows 11, an isolated config dir, a directory marketplace, six
      user-scope installs.
    • Named true / named false / unnamed with no defaultEnabled / unnamed with plugin.json
      true / unnamed with marketplace-entry true / unnamed with plugin.json false read
      true / false / false / false / false / false. The docs predict true / false / true / true /
      true / false.
    • On a real install, all 104 unnamed user-scope plugins read disabled, and none of their skills
      were listed.
    • A non-Boolean value disables the whole file.

    Filing it is Kyle's call only. No part of this issue files, drafts on GitHub, or comments
    upstream.

Context

Source: local handoff item 20260923-182500 (split note after PR #4376).

Related:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-owner-decision

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions