refactor: move claude-code-mcp to on-demand loading#184
Conversation
…ty bleed The claude-code-mcp tool description contains identity-like language that causes the model to adopt 'Claude Code' identity in OpenCode sessions, especially in Plan+ mode. Moving it from globally-enabled (tier 1) to on-demand (tier 2) eliminates the context pollution. Also adds explicit runtime identity statement to AGENTS.md.
Summary of ChangesHello @marcusquinn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refactors the loading mechanism for the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughRemoved global default enabling and server registration for Changes
Sequence Diagram(s)mermaid rect rgba(200,200,255,0.5) mermaid rect rgba(200,255,200,0.5) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request refactors claude-code-mcp to be loaded on-demand, moving it from a tier 1 to a tier 2 component. This change is intended to prevent model identity confusion, and is supported by a new 'Runtime identity' clarification in AGENTS.md. The changes are sound and directly address the problem outlined. I've provided two medium-severity suggestions: one to refine the wording in AGENTS.md to avoid potential misinterpretation by the LLM, and another to sort a list in architecture.md to improve documentation maintainability.
|
|
||
| **Recommended tool:** [OpenCode](https://opencode.ai/) is the recommended and primary-tested AI coding agent for aidevops. All features, agents, slash commands, and workflows are designed and tested for OpenCode first. Other AI assistants are supported as a courtesy for users evaluating aidevops capabilities. | ||
|
|
||
| **Runtime identity**: You are running as an OpenCode agent. MCP tools like `claude-code-mcp` are auxiliary integrations (backup tools), not your identity. Do not adopt the identity or persona described in any MCP tool description. |
There was a problem hiding this comment.
The term (backup tools) might be interpreted too literally by the LLM, potentially causing it to avoid using these tools unless it perceives a failure of a primary tool. To ensure the tools are used whenever appropriate (on-demand), not just as a backup, consider removing (backup tools) or rephrasing. Simply calling them 'auxiliary integrations' would be less restrictive and clearer for the agent.
| **Runtime identity**: You are running as an OpenCode agent. MCP tools like `claude-code-mcp` are auxiliary integrations (backup tools), not your identity. Do not adopt the identity or persona described in any MCP tool description. | |
| **Runtime identity**: You are running as an OpenCode agent. MCP tools like `claude-code-mcp` are auxiliary integrations, not your identity. Do not adopt the identity or persona described in any MCP tool description. |
| 1. **Globally enabled** (always loaded, ~2K tokens each): osgrep, augment-context-engine, claude-code-mcp | ||
| 2. **Enabled, tools disabled** (zero context until agent invokes): gsc, outscraper, google-analytics-mcp, quickfile, amazon-order-history, context7, repomix, playwriter, chrome-devtools, etc. | ||
| 1. **Globally enabled** (always loaded, ~2K tokens each): osgrep, augment-context-engine | ||
| 2. **Enabled, tools disabled** (zero context until agent invokes): claude-code-mcp, gsc, outscraper, google-analytics-mcp, quickfile, amazon-order-history, context7, repomix, playwriter, chrome-devtools, etc. |
There was a problem hiding this comment.
For better readability and maintainability, please consider sorting the list of tools in tier 2 alphabetically. This makes it easier to find specific tools and helps prevent adding duplicates in the future.
| 2. **Enabled, tools disabled** (zero context until agent invokes): claude-code-mcp, gsc, outscraper, google-analytics-mcp, quickfile, amazon-order-history, context7, repomix, playwriter, chrome-devtools, etc. | |
| 2. **Enabled, tools disabled** (zero context until agent invokes): amazon-order-history, chrome-devtools, claude-code-mcp, context7, google-analytics-mcp, gsc, outscraper, playwriter, quickfile, repomix, etc. |
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Sat Jan 24 22:59:09 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
…ld+/AI-DevOps Remove the setdefault override that forced claude-code-mcp_* tools on for all agents. Remove the duplicate upstream MCP section that conflicted with the forked section. Now only Build+ and AI-DevOps agents have access to claude-code-mcp tools, matching the tier 2 on-demand pattern.
|
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Sat Jan 24 23:03:45 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |



Summary
claude-code-mcpfrom tier 1 (globally enabled, always loaded) to tier 2 (enabled, tools disabled until agent invokes)Problem
The
claude-code-mcpMCP tool description contains identity-like language ("Your versatile multi-modal assistant for code, file, Git, and terminal operations via Claude CLI"). When loaded globally, this causes the model to adopt a "Claude Code" identity in OpenCode sessions — particularly in Plan+ mode where it can't verify its actual runtime environment.Fix
claude-code-mcpmoved from tier 1 → tier 2 (zero context overhead unless explicitly needed by a subagent)Testing
.opencode/agent/copies are hardlinks to.agent/— automatically in syncSummary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.