Claude Code version: 2.1.210
Description
When a plugin declares a userConfig block in plugin.json and is installed/enabled with project scope, the answers to the userConfig prompts are still written to the global ~/.claude/settings.json under pluginConfigs, instead of the project-local .claude/settings.json.
Steps to reproduce
- Author a plugin with a
userConfig block in .claude-plugin/plugin.json, e.g.:
"userConfig": {
"local_repo_path": { "type": "directory", "required": true },
"base_branch": { "type": "string", "default": "main" }
}
- Install/enable the plugin scoped to a specific project (e.g. via the plugin UI, choosing "project" scope).
- Confirm the install was recorded as project-scoped —
~/.claude/plugins/installed_plugins.json shows:
{ "scope": "project", "projectPath": "C:\\...\\my-project", ... }
- Answer the
userConfig prompts (e.g. local_repo_path: ../my-repo).
- Inspect where the values landed:
- Project's
./.claude/settings.json → only contains enabledPlugins, no pluginConfigs entry.
- Global
~/.claude/settings.json → contains the new entry:
"pluginConfigs": {
"my-plugin@my-marketplace": {
"options": { "local_repo_path": "../my-repo", "base_branch": "main" }
}
}
Expected behavior
Since the plugin was explicitly installed with project scope, its userConfig answers should be stored alongside that scope (e.g. in the project's .claude/settings.json), not merged into the global user settings.
Actual behavior
pluginConfigs is always written to ~/.claude/settings.json, regardless of install scope. There appears to be no project-scoped storage location for userConfig answers at all.
Impact
Several userConfig fields are inherently project-relative by design (e.g. a type: "directory" field pointing at a sibling repo checkout, or a branch name). Because the values are forced into global scope:
- Using the same plugin in two different projects with different config values overwrites the config for both — last write wins.
- A project-relative path value (e.g.
../sibling-repo) becomes meaningless/wrong as soon as you're working in a different project.
This makes userConfig effectively unusable for any plugin meant to be installed per-project with per-project settings.
Related issues (none appear to be an exact duplicate of this specific scope mismatch):
Claude Code version: 2.1.210
Description
When a plugin declares a
userConfigblock inplugin.jsonand is installed/enabled with project scope, the answers to theuserConfigprompts are still written to the global~/.claude/settings.jsonunderpluginConfigs, instead of the project-local.claude/settings.json.Steps to reproduce
userConfigblock in.claude-plugin/plugin.json, e.g.:~/.claude/plugins/installed_plugins.jsonshows:{ "scope": "project", "projectPath": "C:\\...\\my-project", ... }userConfigprompts (e.g.local_repo_path: ../my-repo)../.claude/settings.json→ only containsenabledPlugins, nopluginConfigsentry.~/.claude/settings.json→ contains the new entry:Expected behavior
Since the plugin was explicitly installed with project scope, its
userConfiganswers should be stored alongside that scope (e.g. in the project's.claude/settings.json), not merged into the global user settings.Actual behavior
pluginConfigsis always written to~/.claude/settings.json, regardless of install scope. There appears to be no project-scoped storage location foruserConfiganswers at all.Impact
Several
userConfigfields are inherently project-relative by design (e.g. atype: "directory"field pointing at a sibling repo checkout, or a branch name). Because the values are forced into global scope:../sibling-repo) becomes meaningless/wrong as soon as you're working in a different project.This makes
userConfigeffectively unusable for any plugin meant to be installed per-project with per-project settings.Related issues (none appear to be an exact duplicate of this specific scope mismatch):
pluginDefaultScopedefaultfield in pluginuserConfigentries #46477 – feature request fordefaultfield inuserConfig