[BUG] Plugin userConfig values written to global settings.json even when plugin is installed with project scope
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
userConfigblock in.claude-plugin/plugin.json, e.g.:
``json``
"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.jsonshows:
``json``
{ "scope": "project", "projectPath": "C:\\...\\my-project", ... }
- Answer the
userConfigprompts (e.g.local_repo_path: ../my-repo). - Inspect where the values landed:
- Project's
./.claude/settings.json→ only containsenabledPlugins, nopluginConfigsentry. - Global
~/.claude/settings.json→ contains the new entry:
``json``
"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):
- #11461 (closed) – general per-project plugin config feature request
- #62209 – feature request for
pluginDefaultScope - #46477 – feature request for
defaultfield inuserConfig - #39827 – userConfig prompt not shown during install
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗