Declare explicit tool grants for the user-level subagents - #85
Open
mattmenefee wants to merge 1 commit into
Open
Declare explicit tool grants for the user-level subagents#85mattmenefee wants to merge 1 commit into
mattmenefee wants to merge 1 commit into
Conversation
The test-suite-architect definition pinned individual Serena tool names that the MCP server has since renamed, alongside built-ins that no longer exist (LS, NotebookRead) and one that Claude Code strips from every subagent (ExitPlanMode). Unresolvable entries are dropped silently — only a list where nothing at all resolves raises an error — so the agent had been launching quietly under-powered. It also withheld Write and Edit from the one agent whose job is authoring spec files, leaving it dependent on the harness back-filling them from its preloaded skills. The remaining agents declared no tools whatsoever and so inherited every tool from every configured MCP server, handing a PostgreSQL adviser reach into Linear, Harvest, Heroku and two browser-automation stacks. Each now declares what its brief actually calls for, using server-level wildcards for MCP access so a renamed tool cannot silently vanish from a grant the way it did before. Skill and ToolSearch are granted throughout, without which an agent can neither invoke a project's slash commands nor load a deferred tool schema. Domain-specific additions follow the same reasoning: Elastic for the search expert, RuboCop for the Rails expert, and Chrome DevTools for accessibility auditing. The two review agents keep their disallowedTools denylist untouched. An allowlist resolves after the denylist rather than alongside it, so adding one would have narrowed them to only the listed tools and stripped the file-reading and search tools they depend on.
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.
Summary
tools:list ontest-suite-architect, which pinned individual Serena tool names the MCP server has since renamed, plus built-ins that no longer exist (LS,NotebookRead) and one Claude Code strips from every subagent (ExitPlanMode). Unresolvable entries are dropped silently — only a list where nothing resolves raises an error — so the agent had been launching quietly under-powered.WriteandEdittotest-suite-architect, which authors spec files but previously depended on the harness back-filling those from its preloaded skills.tools:on the agents that had none (documentation-expert,elasticsearch-expert,postgresql-expert,ruby-on-rails-expert,ui-ux-design-specialist). Omitting the field inherits every tool from every configured MCP server, which gave a PostgreSQL adviser reach into Linear, Harvest, Heroku and two browser-automation stacks.mcp__serena__*) for MCP access rather than enumerating tool names, so a renamed upstream tool can't silently vanish from the grant the way it did before.SkillandToolSearchthroughout — without them an agent can neither invoke a project's slash commands nor load a deferred tool schema.lighthouse_audit) for the accessibility remit.code-best-practices-reviewerandsecurity-revieweron theirdisallowedToolsdenylists. An allowlist resolves after the denylist rather than alongside it, so adding one would have narrowed them to only the listed tools and stripped the file-reading and search tools they depend on.Three grants are judgment calls rather than mechanical fixes, and are the parts worth a second opinion:
mcp__elastic-agent-builder__*on the search expert,mcp__rubocop__*on the Rails expert, andmcp__chrome-devtools__*on the design specialist. The Chrome DevTools grant deliberately does not extend tomcp__playwright__*, since the alice conventions prefer driving@playwright/clithroughBash.Test plan
Agent would be spawned with zero toolserrortest-suite-architectcan create and edit a spec file, and can invoke/lintand/testthrough theSkilltoolruby-on-rails-expertreaches the RuboCop MCP server;elasticsearch-expertreaches the Elastic server in a project where it is configuredui-ux-design-specialistcan run a Lighthouse auditcode-best-practices-reviewerandsecurity-reviewerstill read and search files, and still cannot write or edit