Skip to content

fix: agents inherit session MCP tools + fail loud (v0.4.1)#15

Merged
azmym merged 12 commits into
mainfrom
fix/mcp-namespace
May 29, 2026
Merged

fix: agents inherit session MCP tools + fail loud (v0.4.1)#15
azmym merged 12 commits into
mainfrom
fix/mcp-namespace

Conversation

@azmym

@azmym azmym commented May 29, 2026

Copy link
Copy Markdown
Owner

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 agent tools: allowlist named the bare mcp__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:

  • Removed the 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 explicit tools: 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.
  • Prose, the 7 capability skills, and the reference docs now use namespace-agnostic short tool names.
  • Fail-loud: each agent returns verdict unknown (researcher: confidence unavailable) with an error field when no Gemini tool is present, instead of fabricating.
  • New tests/mcp-namespace.bats regression guard: forbids a tools: 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).

@azmym azmym added the Claude_Code Changes made by Claude Code label May 29, 2026
@azmym azmym self-assigned this May 29, 2026
@azmym
azmym merged commit bb12c30 into main May 29, 2026
2 checks passed
@azmym
azmym deleted the fix/mcp-namespace branch May 29, 2026 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Claude_Code Changes made by Claude Code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant