Repository navigation
fix: SLM's Claude Code sub-agents get the memory tools they ask for - #330
Merged
Merged
Conversation
The memory advisor, optimize advisor, governance advisor and loop runner listed their SLM tools by short name (recall, remember, ...). Claude Code matches an agent's tools by full name, so none of them matched and the agents received only Read and Bash. Each tool is now listed under both full names, so the agents work with the Claude Code plugin and with SLM added as a plain MCP server. Other hosts keep the names they use today. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The tests now require every SLM tool in the Muse agents to be exactly mcp__superlocalmemory__<tool> and a tool the server really registers. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Member
Author
|
Audit finding to fix to test (e69834c)
|
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 this changes
The four SLM sub-agents shipped in the Claude Code plugin (memory advisor, optimize advisor, governance advisor, loop runner) now receive SLM's memory tools. Before, they got only
ReadandBash.Why
Each agent's
tools:line named SLM tools bare (recall,remember,slm_compress, ...). Claude Code resolves a sub-agent's tools by full name only:mcp__<server>__<tool>for a directly added MCP server,mcp__plugin_<plugin>_<server>__<tool>for a server bundled in a plugin (sub-agents, MCP). A bare name matches nothing, so the agents could not call the tools they were written around.The fix is in the generator, not in
plugin/by hand:plugin-src/agents/*.mdstays host-neutral (bare names). Codex, Antigravity, Hermes and Copilot read it directly and are unchanged.scripts/agent-tool-names.mjsholds the spelling rules.scripts/build-plugin.mjsuses it to write both full names for every SLM tool intoplugin/agents/(mcp__superlocalmemory__<t>andmcp__plugin_superlocalmemory_superlocalmemory__<t>), so one file works for a plugin install and a direct MCP install. The plugin name comes from the manifest. Built-ins (Read,Bash) are untouched. Entries that do not resolve are ignored as long as one resolves.muse-plugin/andvscode-agent-plugin/are built fromplugin/, so their builders now convert back: Muse keeps onlymcp__superlocalmemory__<t>, the VS Code plugin keeps the bare names. Their generated output is byte-for-byte what it was.tests/test_packaging/test_what_we_ship_describes_what_we_built.pystrips the SLM prefixes before checking that a declared tool exists, so a made-up name with a prefix still fails.How it was tested
New
tests/test_plugin/test_claude_agent_tool_names.py(7 tests): no bare SLM name inplugin/ormuse-plugin/agents; every tool appears in both forms with prefixes derived fromplugin.jsonand.mcp.json; built-ins unchanged;plugin-srcstays bare;build-plugin.mjs --checkin sync; the transforms are idempotent and round-trip.plugin/agents/*.mdfiles reverted tomain: 3 failed, 4 passed. With the fix restored: 7 passed.pytest tests/test_plugin tests/test_plugin_src tests/test_packaging: 540 passed, 11 skipped.node --test scripts/__tests__/*.mjs: 51 passed.node scripts/build-all-plugins.mjsrun;git statusshows onlyplugin/agents/changed among the generated trees.claude plugin validate ./plugin: passed.ruff checkon the two test files: clean;scripts/check-no-internal-leaks.sh: clean.Not covered: the skills'
allowed-tools:lines also use bare names. They only pre-approve tools (they do not decide whether an agent can see them), so they are left for a separate change.node scripts/build-all-plugins.mjs)AI assistance
Written with Claude Code (Claude Opus 5.5). The behaviour was checked by running the builders and tests above.
🤖 Generated with Claude Code