Repository navigation
Closed
Copy link
Labels
needs-owner-decisionAwaiting a human or maintainer judgment call.needs-triageNot yet classified. Floor until a type and one priority tier are set.
Description
Problem
A session started with a --settings file that turns a plugin off still gets that plugin's SessionStart prerequisite notices, including a /<plugin>:setup suggestion for a plugin the session does not have. Every plugin-profiles profile session starts that way: the session file is passed with --settings.
The readers of rootsFromSettings decide which plugins are enabled from user, user-local, project and project-local settings plus managed settings. None of them reads the session's --settings layer:
lib/enabled-plugin-roots.mjs:51-69(rootsFromSettings, synced intoplugins/plugin-diagnostics/lib/andplugins/harness-ops/lib/) mergesenabledPluginsfrom<config>/settings.json,<config>/settings.local.json,<project>/.claude/settings.json,<project>/.claude/settings.local.jsonand the managed files.plugins/plugin-diagnostics/hooks/prerequisites-fleet.mjs:133(the SessionStart row "Checking the enabled plugins' prerequisites...",hooks/hooks.json:35) probes every plugin that list returns. The probe's git-hook check printsdriftLine()from each plugin'slib/git-hooks/install.mjs:1396-1401.plugins/harness-ops/skills/prerequisites/scripts/check-prerequisites.mjs:129andplugins/harness-ops/scripts/session-telemetry-state.mjs:51read the same list.
Seen in
A session started 2026-11-16 in control-hub with claude --settings <plugin-profiles session file for the build profile> (Claude Code 2.1.326):
- The session file sets
go-format@melodic-softwareandinstruction-placement@melodic-softwaretofalse.~/.claude/settings.jsonsets both totrue, and the project has no.claude/settings*.json. /reload-pluginsreported 47 plugins, and neither plugin's hooks appear in the transcript.- The prerequisites row still printed
go-format: git hook goimports-format missing; run /go-format:setup apply install-git-hooks, and the same for instruction-placement.
Candidate mechanisms (open)
- A Claude Code signal. None found as of 2026-11-16: the hooks reference lists no enabled-plugins or settings-path field in the common or SessionStart input, and no such environment variable. Watch for one in a future release.
- Read the session file plugin-profiles names. The session file sets
PLUGIN_PROFILES_SESSION_FILEin its ownenv, andenvfrom a--settingsfile reaches hook processes (probe 2026-11-16, Claude Code 2.1.326: a SessionStart hook in a--settingsfile printed that file'senvvalue).rootsFromSettingswould merge that file'senabledPluginsafter the project and local layers and before managed. With the variable unset, behavior stays as today. This makes a hook unit read a file another plugin writes; that coupling is the owner's decision.
Done when
- A session whose
--settingsfile turns a plugin off gets no prerequisite probe for it, shown by a test and by a live session. - The three readers of
rootsFromSettingsagree on which plugins are enabled for that session.
Refs #16428.
Metadata
Metadata
Assignees
Labels
needs-owner-decisionAwaiting a human or maintainer judgment call.needs-triageNot yet classified. Floor until a type and one priority tier are set.
Type
Fields
Work status
needs-owner-decision
Priority
medium
Activity
github-actions commentedon Nov 17, 2026
Size: Medium
Complexity: Medium
Uncertainty: Knowable
Flags: intent
Blocked by: none
Understood: a session started with a
--settingsfile that disables a plugin still gets that plugin's SessionStart prerequisite notices.rootsFromSettingsnever reads the session's--settingslayer, so the three readers list the plugin as enabled. This is a defect in existing behavior. It is related to #16428. I found no duplicate among the open issues and no merged pull request that already fixes it.The issue lists two candidate mechanisms and picks neither. The second one makes a hook unit read a file another plugin writes, and the issue calls that coupling the owner's decision. That is a design choice, so it is held for the owner.
rootsFromSettingsread the session file named byPLUGIN_PROFILES_SESSION_FILE(mechanism 2), or should this wait for a Claude Code signal (mechanism 1)?RECOMMENDED: mechanism 2. The issue found no Claude Code signal as of 2026-11-16, and it probed that
envfrom a--settingsfile reaches hook processes. With the variable unset, behavior stays as today, so the change is low-risk.lib/enabled-plugin-roots.mjs(and its synced copies in plugin-diagnostics and harness-ops) depends on the plugin-profiles session-file convention?RECOMMENDED: yes, as an optional read that is a no-op when the variable is unset or the file is unreadable. All three readers then share one code path and agree by construction.
To answer, post a comment that starts with this line:
Automated triage. A maintainer reviews it.
melodic-automation-lanes commentedon Nov 17, 2026
The triage verdict left this issue at
needs-owner-decision:Reason:
intentmelodic-automation-lanes commentedon Nov 17, 2026
Refinement. A read-only run explored this repository, searched its issues and pull requests, and read the allowed docs to draft what follows. On an issue a listed human filed, it counts as the issue's spec once posted, while unedited; it is still model text, so check it.
Intended outcome: rootsFromSettings merges enabledPlugins from the file named by PLUGIN_PROFILES_SESSION_FILE after project/local layers and before managed, as a no-op when unset or unreadable, so all three readers agree.
Related work
Open questions
RECOMMENDED: Mechanism 2: no Claude Code signal exists as of 2026-11-16, and env from a --settings file reaches hook processes. Basis: judgment
RECOMMENDED: Yes, as an optional read that does nothing when the variable is unset or the file is unreadable, so behavior is unchanged without it. Basis: lib/enabled-plugin-roots.mjs:49-66
RECOMMENDED: After project-local and before managed, so a session false beats user true and managed still wins, as the issue states. Basis: lib/enabled-plugin-roots.mjs:50-54
RECOMMENDED: Cover it with a test that sets the env variable to a fixture file, and keep the live check as a host-run step a person performs. Basis: judgment
Sources read
To answer, post a comment that starts with this line:
Automated refinement by the lanes App. Answer with a comment whose first line is
**Decision recorded.**.fix(harness-ops): read managed settings on the prerequisites settings…