Summary
When Lumen is installed as a Claude Code plugin, the SessionStart banner and the PreToolUse (Grep|Bash) reminder both tell the agent to call mcp__lumen__semantic_search. But Claude Code namespaces a plugin's MCP server as plugin_<pluginName>_<serverName>, so the tool is actually registered as mcp__plugin_lumen_lumen__semantic_search.
The result: an agent that follows the hook's own directive calls mcp__lumen__semantic_search, gets "No such tool available," and (in my case) fell back to grep/manual exploration for the rest of the session — which is exactly what the hook is trying to prevent.
Version: lumen v0.0.41 (latest), installed as a Claude Code plugin via the ory marketplace. Host: Claude Code.
Root cause
.claude-plugin/plugin.json declares the server as "mcpServers": { "lumen": { … } } → server name lumen.
- Claude Code exposes a plugin's MCP tools under
mcp__plugin_<pluginName>_<serverName>__*. With both names = lumen, the registered tool is mcp__plugin_lumen_lumen__semantic_search (confirmed — it's what appears in the agent's tool list, and what resolves).
hooks/hooks.json invokes …/scripts/run hook session-start lumen --host claude (and pre-tool-use lumen), i.e. it passes mcpName = "lumen".
cmd/hook.go sessionStartDirective() builds the directive from the bare name:
// cmd/hook.go (~line 123, and again ~line 273 for pre-tool-use)
toolRef := "mcp__" + mcpName + "__semantic_search" // mcpName == "lumen"
return "Call " + toolRef + " first for any code discovery task — before Grep, Bash, or Read."
→ emits mcp__lumen__semantic_search, which does not resolve under the plugin install.
The --host claude branch is already host-aware (the cursor branch special-cases its tool naming), but the claude branch doesn't account for the plugin_<name>_ prefix Claude Code applies to plugin-bundled MCP servers.
Impact
Every SessionStart and every Grep/Bash call re-emits a directive pointing at a non-existent tool name, so agents that trust it bounce off "No such tool available" and stop using semantic search. The feature becomes effectively undiscoverable via the plugin's own guidance.
Suggested fix
For --host claude, reference the plugin-namespaced tool, e.g. mcp__plugin_<pluginName>_<mcpServerName>__semantic_search (here mcp__plugin_lumen_lumen__semantic_search), instead of mcp__<mcpName>__semantic_search.
Minor extra note for the directive: under Claude Code this tool is deferred (it has to be loaded via the agent's tool-search step before the first call), so wording like "load and call mcp__plugin_lumen_lumen__semantic_search" would help.
Repro
- Install lumen as a Claude Code plugin (
ory marketplace), v0.0.41.
- Start a session → SessionStart banner: "Call
mcp__lumen__semantic_search first for any code discovery task…"
- Call
mcp__lumen__semantic_search → "No such tool available."
- The actually-registered tool is
mcp__plugin_lumen_lumen__semantic_search.
Summary
When Lumen is installed as a Claude Code plugin, the
SessionStartbanner and thePreToolUse(Grep|Bash) reminder both tell the agent to callmcp__lumen__semantic_search. But Claude Code namespaces a plugin's MCP server asplugin_<pluginName>_<serverName>, so the tool is actually registered asmcp__plugin_lumen_lumen__semantic_search.The result: an agent that follows the hook's own directive calls
mcp__lumen__semantic_search, gets "No such tool available," and (in my case) fell back togrep/manual exploration for the rest of the session — which is exactly what the hook is trying to prevent.Version: lumen
v0.0.41(latest), installed as a Claude Code plugin via theorymarketplace. Host: Claude Code.Root cause
.claude-plugin/plugin.jsondeclares the server as"mcpServers": { "lumen": { … } }→ server namelumen.mcp__plugin_<pluginName>_<serverName>__*. With both names =lumen, the registered tool ismcp__plugin_lumen_lumen__semantic_search(confirmed — it's what appears in the agent's tool list, and what resolves).hooks/hooks.jsoninvokes…/scripts/run hook session-start lumen --host claude(andpre-tool-use lumen), i.e. it passesmcpName = "lumen".cmd/hook.gosessionStartDirective()builds the directive from the bare name:mcp__lumen__semantic_search, which does not resolve under the plugin install.The
--host claudebranch is already host-aware (thecursorbranch special-cases its tool naming), but theclaudebranch doesn't account for theplugin_<name>_prefix Claude Code applies to plugin-bundled MCP servers.Impact
Every
SessionStartand everyGrep/Bashcall re-emits a directive pointing at a non-existent tool name, so agents that trust it bounce off "No such tool available" and stop using semantic search. The feature becomes effectively undiscoverable via the plugin's own guidance.Suggested fix
For
--host claude, reference the plugin-namespaced tool, e.g.mcp__plugin_<pluginName>_<mcpServerName>__semantic_search(heremcp__plugin_lumen_lumen__semantic_search), instead ofmcp__<mcpName>__semantic_search.Minor extra note for the directive: under Claude Code this tool is deferred (it has to be loaded via the agent's tool-search step before the first call), so wording like "load and call
mcp__plugin_lumen_lumen__semantic_search" would help.Repro
orymarketplace), v0.0.41.mcp__lumen__semantic_searchfirst for any code discovery task…"mcp__lumen__semantic_search→ "No such tool available."mcp__plugin_lumen_lumen__semantic_search.