t1015: Fix agent name collisions in OpenCode plugin#1311
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThe agent plugin loader (index.mjs) was updated to include two new subdirectories (scripts and templates) in recursive scanning. Agent naming was changed from file basename to relative path without .md extension to reduce collisions, and relPath now consistently uses the same path format. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
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 |
🔍 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: Thu Feb 12 22:16:01 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.agents/plugins/opencode-aidevops/index.mjs:
- Around line 384-393: AGENT_MCP_TOOLS keys are simple basenames but agents are
registered with path-based names (agentName / relPath), so applyAgentMcpTools()
skips all subagents; to fix, normalize the lookup in applyAgentMcpTools(): when
iterating AGENT_MCP_TOOLS or when checking config.agent, extract the basename
(e.g., use path.basename or strip directories from the stored agentName) before
matching, or alternatively rebuild AGENT_MCP_TOOLS keys to use the same
path-based names produced where agents are pushed (see agents.push { name:
agentName } and the agentName creation), ensuring the lookup against
config.agent[agentName] succeeds and per-agent MCP tool permissions are applied.
🔍 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: Thu Feb 12 22:21:10 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
- Changed loadAgentsRecursive() to use full relative path without .md extension - Example: tools/git/github-cli.md → tools/git/github-cli (not github-cli) - Added scripts/ and templates/ to scanned subdirs list - Prevents 204 agents from being silently dropped due to name collisions
…anner (t1015) - Added scripts/ (65 md files) and templates/ (8 md files) to scanned subdirs - Enhanced comment explaining relative path usage prevents name collisions - Ensures all agent markdown files are discovered and registered
5c49db0 to
aa6c212
Compare
🔍 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: Fri Feb 13 00:25:18 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|



Fix agent name collisions in OpenCode plugin by using relative paths instead of basename.
Problem: 204 agents were silently lost because
loadAgentDefinitions()usesbasename(file, ".md")as the agent name. Files liketools/git/github-cli.mdandservices/git/github-cli.mdboth register asgithub-cli, with the second one being dropped.Solution:
loadAgentsRecursive()to use full relative path without.mdextension as agent nametools/git/github-cli.md→tools/git/github-cli(notgithub-cli)scripts/(65 md files) andtemplates/(8 md files) to scanned subdirs listTesting: Will verify all agents load without collisions after this change.
Summary by CodeRabbit