fix: agents inherit session MCP tools + fail loud (v0.4.1)#15
Merged
Conversation
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
Fixes the bug where plugin-installed agents could not call Gemini and silently answered from training data.
Root cause: plugin-registered MCP servers are namespaced
mcp__plugin_gemini-plugin_gemini__<tool>, but every agenttools:allowlist named the baremcp__gemini__<tool>form, which does not exist in a plugin session. An allowlist of nonexistent tools yields zero Gemini tools, so agents fell back to training knowledge (observed on gemini-researcher: empty citations, low confidence, a wrong answer).Fix:
tools:block from all five agents so they inherit the session Gemini tools under whatever namespace the install registers. Verified against the Claude Code docs: "Inherits all tools if omitted"; an explicittools:list excludes MCP tools. Removing the block (not keeping a partial list) is what restores MCP access, and it works for both plugin and manual installs.unknown(researcher: confidenceunavailable) with anerrorfield when no Gemini tool is present, instead of fabricating.tests/mcp-namespace.batsregression guard: forbids atools:key in agent frontmatter and any hardcoded MCP namespace path in agents, skills, and hook scripts.Testing
bats tests/ : 80 tests, all green locally (CI runs Ubuntu + macOS).