[BUG] Plugin userConfig template ${user_config.X} not substituted in lspServers initializationOptions
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
A plugin declares userConfig.<key> with a default value, referenced as "${user_config.<key>}" inside lspServers.<name>.initializationOptions.
The raw JSON-RPC initialize request sent to the LSP server contains the literal, unsubstituted string "${user_config.<key>}" — not the default value, and not a custom value either (none was set in settings.local.json, which only enables the plugin).
What Should Happen?
${user_config.<key>} should resolve to the custom value if set in settings.local.json, otherwise to the default declared in the plugin's userConfig schema.
Error Messages/Logs
Steps to Reproduce
- Create a plugin manifest with:
"userConfig": {
"my_key": { "type": "string", "required": true, "default": "some/default/value" }
},
"lspServers": {
"myServer": {
...
"initializationOptions": { "someField": "${user_config.my_key}" }
}
}
- Enable the plugin without setting a custom value for
my_keyin settings.local.json. - Inspect the LSP server's log, or the raw
initializerequest payload sent to it.
Observed: "someField": "${user_config.my_key}" (literal string)
Expected: "someField": "some/default/value"
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.278
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗