agent: pass configured Claude Code plugin dirs to the CLI - #414
Open
GrigoryPervakov wants to merge 1 commit into
Open
agent: pass configured Claude Code plugin dirs to the CLI#414GrigoryPervakov wants to merge 1 commit into
GrigoryPervakov wants to merge 1 commit into
Conversation
New agent.claude_plugin_dirs config key: extra local plugin directories forwarded to the CLI as --plugin-dir alongside plugins auto-discovered from ~/.claude. Auto-discovery only forwards cached plugins that ship .mcp.json, and the CLI runs with setting_sources=[], so LSP-type plugins (lspServers manifests, e.g. gopls diagnostics) previously had no route into Nerve sessions. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
New
agent.claude_plugin_dirsconfig key: extra local plugin directories forwarded to the Claude CLI as--plugin-dir, appended after plugins auto-discovered from~/.claude.Why
Auto-discovery only forwards cached plugins that ship
.mcp.json, and Nerve spawns the CLI withsetting_sources=[]so it never reads~/.claude/settings.jsonitself. Marketplace LSP plugins declarelspServersin the marketplace manifest and cache no manifest at all — they currently have no route into Nerve sessions. A local plugin dir with.claude-plugin/plugin.jsondeclaringlspServerscloses that gap.Verified end-to-end with the bundled CLI (2.1.235) in Nerve's exact spawn mode (
--setting-sources= --plugin-dir <dir>): a goplslspServersstanza loads (Loaded 1 LSP server(s) from plugin), and compiler diagnostics (IncompatibleAssign,UnusedVar) attach to subsequent tool results.Details
load_claude_code_plugins(extra_dirs=...): entries areexpanduser().resolve()d (the CLI subprocess runs in the session workspace, not the daemon cwd), and dirs without.claude-plugin/plugin.jsonare skipped with a warning.reload_mcp_config) passconfig.agent.claude_plugin_dirs; like everyagent.*key, YAML edits land via the full config reload.docs/config.md, 12 tests intests/test_claude_plugins.py(also covering the previously untested auto-discovery path and the scalar→list coercion contract).Note:
tests/test_bootstrap.py::TestCredentialWaterfall(3 tests) fails on my machine with real credentials installed — pre-existing on main, unrelated; expecting clean CI to confirm.🤖 Generated with Claude Code