Skip to content

feat: MCP on-demand loading - reduce startup tokens by ~4.6K#275

Merged
marcusquinn merged 1 commit intomainfrom
feature/mcp-on-demand-loading
Feb 2, 2026
Merged

feat: MCP on-demand loading - reduce startup tokens by ~4.6K#275
marcusquinn merged 1 commit intomainfrom
feature/mcp-on-demand-loading

Conversation

@marcusquinn
Copy link
Owner

@marcusquinn marcusquinn commented Feb 2, 2026

Summary

  • Disable heavy MCPs globally, enable on-demand via subagents
  • Reduces session startup context by ~4.6K tokens

Changes

MCP Tokens On-Demand Via
playwriter ~3K @playwriter subagent
augment-context-engine ~1K @augment-context-engine subagent
gh_grep ~600 @github-search subagent (rg/bash)

Files changed:

  • playwriter.md - Add mcp: frontmatter
  • augment-context-engine.md - Add mcp: frontmatter
  • github-search.md - New subagent (replaces gh_grep with rg/bash)
  • generate-opencode-agents.sh - Remove MCPs from DEFAULT_TOOLS
  • mcp-discovery.md - Document on-demand pattern
  • subagent-index.toon - Add github-search

Testing

  • osgrep remains enabled as primary semantic search
  • Run ./setup.sh after merge to regenerate OpenCode config
  • Verify agents work without the disabled MCPs
  • Test @playwriter, @augment-context-engine, @github-search subagents

Related

Addresses token efficiency discussion in session about reducing startup overhead.

Summary by CodeRabbit

  • New Features

    • Added GitHub code search capability with enhanced documentation
    • Introduced browser automation integration
    • Added context engine enhancement tool
    • Expanded subagent support for deployment, Git, credentials, task management, terminal, automation, WordPress, and services (hosting, email, communications, CRM, analytics, accounting, document processing)
  • Documentation

    • Added comprehensive GitHub search workflow documentation with usage patterns and examples
  • Chores

    • Implemented on-demand loading strategy to optimize token usage

…obally

Reduces session startup tokens by ~4.6K by disabling heavy MCPs globally
and enabling them on-demand via subagents:

- playwriter (~3K tokens): enable via @playwriter subagent
- augment-context-engine (~1K tokens): enable via @augment-context-engine
- gh_grep (~600 tokens): replaced by @github-search (uses rg/bash)

Changes:
- Add mcp: frontmatter to playwriter.md and augment-context-engine.md
- Create github-search.md subagent (rg/bash patterns, no MCP needed)
- Update generate-opencode-agents.sh to remove MCPs from DEFAULT_TOOLS
- Update mcp-discovery.md with on-demand pattern documentation
- Add github-search to subagent-index.toon

osgrep remains enabled as primary semantic search (local, no auth).
@gemini-code-assist
Copy link

Summary of Changes

Hello @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 introduces a crucial optimization for token management by shifting several resource-intensive Multi-Context Providers (MCPs) to an on-demand loading model. By doing so, it drastically cuts down the initial token overhead during session startup, making the system more efficient and responsive. The change also refines how certain functionalities, like GitHub code search, are integrated, favoring lighter, more performant alternatives.

Highlights

  • Token Efficiency: Implemented an on-demand loading strategy for heavy Multi-Context Providers (MCPs), significantly reducing session startup context by approximately 4.6K tokens.
  • MCP Disabling: Globally disabled playwriter (~3K tokens), augment-context-engine (~1K tokens), and gh_grep (~600 tokens) from being loaded by default.
  • Subagent-driven MCP Activation: These previously heavy MCPs are now enabled on-demand through dedicated subagents: @playwriter, @augment-context-engine, and @github-search.
  • GitHub Search Replacement: The gh_grep MCP has been replaced by a new github-search subagent, which leverages ripgrep (rg) and bash for efficient GitHub code searching without incurring MCP token costs.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 2, 2026

Walkthrough

This PR implements an explicit MCP On-Demand Loading Strategy by disabling heavy MCPs globally (playwriter, augment-context-engine, gh_grep) to reduce token usage, keeping osgrep as the primary semantic search tool, and extending the subagent index with new tool and service categories while updating MCP discovery documentation accordingly.

Changes

Cohort / File(s) Summary
MCP On-Demand Loading Configuration
.agent/scripts/generate-opencode-agents.sh
Introduced global MCP disabling policy for playwriter_\, augment-context-engine_\, and gh_grep_\* to reduce token consumption. Updated AGENT_TOOLS and DEFAULT_TOOLS to retain only essential MCPs (osgrep_\* and context7_\*). Added documentation about on-demand loading strategy and per-agent tool configuration guidance.
Subagent Index & Tool Routing
.agent/subagent-index.toon
Extended tools/context with github-search capability. Added 14 new subagent entries spanning tools (deployment, git, credentials, task-management, terminal, automation, wordpress) and services (hosting, email, communications, crm, analytics, accounting, document-processing) to expand public agent ecosystem.
MCP Tool Documentation
.agent/tools/browser/playwriter.md, .agent/tools/context/augment-context-engine.md, .agent/tools/context/github-search.md
Added playwriter and augment-context-engine MCP entries to tool configuration. Introduced comprehensive github-search documentation covering ripgrep, gh CLI workflows, search patterns, and comparisons with legacy gh_grep tooling (161 lines).
MCP Discovery & Lifecycle
.agent/tools/context/mcp-discovery.md
Added "Disabled MCPs" section with token estimates and mapping to subagents. Updated frontmatter documentation for browser automation tools. Expanded procedural guidance for subagent MCP enablement via generate-opencode-agents.sh and mcp declarative syntax.

Estimated Code Review Effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly Related PRs

Poem

🎯 MCPs lean and mean, on-demand they're deployed,
Osgrep stands vigilant, token waste destroyed,
🛠️ Agents spring forth with tools, finely curated,
The ecosystem expands—fourteen new paths created!
⚡ A DevOps ballet, configuration refined, zero debt in sight ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main objective: implementing MCP on-demand loading to reduce startup tokens by ~4.6K, which is the core purpose of this pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/mcp-on-demand-loading

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 2, 2026

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request effectively reduces the startup context size by disabling several heavy MCPs and enabling them on-demand through subagents. The changes are well-documented through comments in the configuration script and updates to the markdown documentation. The introduction of the @github-search subagent to replace the gh_grep MCP is a smart move. I have a couple of suggestions to improve the robustness of a shell command example and to clarify the documentation around the new on-demand loading mechanism.

Comment on lines +88 to +95
# Clone a specific repo
gh repo clone vercel/next.js -- --depth 1

# Search within it
rg "getServerSession" next.js/

# Clean up
rm -rf next.js

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The Clone and Search Pattern example uses a fixed directory name (next.js) and rm -rf for cleanup. This could lead to accidental data loss if a directory with the same name already exists for other reasons. A more robust approach is to use a temporary directory created with mktemp to avoid name collisions and ensure the cleanup is safe.

Suggested change
# Clone a specific repo
gh repo clone vercel/next.js -- --depth 1
# Search within it
rg "getServerSession" next.js/
# Clean up
rm -rf next.js
# Create a temporary directory to avoid name collisions
CLONE_DIR=$(mktemp -d)
# Clone a specific repo into the temp directory
gh repo clone vercel/next.js "$CLONE_DIR" -- --depth 1
# Search within it
rg "getServerSession" "$CLONE_DIR"
# Clean up
rm -rf "$CLONE_DIR"

Comment on lines +154 to +156
**Note**: The `mcp:` field is declarative - it documents which MCP the subagent
requires. The actual enabling happens in `generate-opencode-agents.sh` which
configures OpenCode's per-agent tool permissions.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This note appears to contradict the changes in generate-opencode-agents.sh. The script is modified to disable MCPs from the default configuration, while this note claims the script is where the "actual enabling happens". This is confusing for anyone trying to understand the on-demand loading mechanism.

Could you clarify how the enabling works? If it's a dynamic, runtime process triggered by the mcp: frontmatter, the documentation should be updated to reflect that, rather than pointing to the static generation script. A clearer note might be: "The mcp: field is a directive for the agent runtime to dynamically load the required MCP tools when this subagent is invoked."

@github-actions
Copy link

github-actions bot commented Feb 2, 2026

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 414 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Mon Feb 2 17:46:18 UTC 2026: Code review monitoring started
Mon Feb 2 17:46:18 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 414
Mon Feb 2 17:46:18 UTC 2026: Qlty - 0 issues found, auto-formatting applied
Mon Feb 2 17:46:20 UTC 2026: Codacy analysis completed with auto-fixes

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 414
  • VULNERABILITIES: 0

Generated on: Mon Feb 2 17:47:49 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (6)
.agent/tools/context/augment-context-engine.md (1)

48-48: ⚠️ Potential issue | 🟡 Minor

Documentation inconsistency with the on-demand loading strategy.

Line 48 states "Enabled for Agents: All 14 primary agents (as fallback to osgrep)" but the PR's on-demand loading strategy disables augment-context-engine_* globally. The MCP is now only enabled when invoking the @augment-context-engine subagent.

Consider updating this line to reflect the new on-demand pattern:

-**Enabled for Agents**: All 14 primary agents (as fallback to osgrep)
+**Enabled via**: `@augment-context-engine` subagent (on-demand, ~1K tokens saved)
.agent/scripts/generate-opencode-agents.sh (5)

507-530: ⚠️ Potential issue | 🔴 Critical

EAGER_MCPS list contradicts the on-demand loading strategy.

Line 510 includes playwriter, augment-context-engine, and gh_grep in EAGER_MCPS, but lines 125-133 document these as disabled globally to save tokens. This inconsistency means the MCPs will be eagerly loaded at startup, negating the ~4.6K token savings.

Proposed fix - move to LAZY_MCPS
 # Eager-loaded (enabled: True): Used by all main agents, start at launch
-EAGER_MCPS = {'osgrep', 'augment-context-engine', 'context7', 'playwriter', 'gh_grep', 'sentry', 'socket'}
+EAGER_MCPS = {'osgrep', 'context7', 'sentry', 'socket'}

 # Lazy-loaded (enabled: False): Subagent-only, start on-demand
 LAZY_MCPS = {'claude-code-mcp', 'outscraper', 'dataforseo', 'shadcn', 'macos-automator', 
-             'gsc', 'localwp', 'chrome-devtools', 'quickfile', 'amazon-order-history', 
-             'google-analytics-mcp', 'MCP_DOCKER', 'ahrefs'}
+             'gsc', 'localwp', 'chrome-devtools', 'quickfile', 'amazon-order-history', 
+             'google-analytics-mcp', 'MCP_DOCKER', 'ahrefs', 'playwriter', 'augment-context-engine', 'gh_grep'}

546-582: ⚠️ Potential issue | 🔴 Critical

Global tool enablement contradicts on-demand strategy.

Lines 547, 567, and 580-582 enable osgrep_*, playwriter_*, and set gh_grep_* globally. Per the documented strategy, only osgrep_* should be enabled globally; the others should remain disabled (or not be set to True).

Proposed fix
 # osgrep_* enabled globally (used by all main agents)
 config['tools']['osgrep_*'] = True

-# playwriter_* enabled globally (used by all main agents)
-config['tools']['playwriter_*'] = True
+# playwriter_* disabled globally (enabled via `@playwriter` subagent)
+config['tools']['playwriter_*'] = False

...

-# gh_grep tools disabled globally, enabled for specific agents
-if 'gh_grep_*' not in config['tools']:
-    config['tools']['gh_grep_*'] = False
-    print("  Set gh_grep_* disabled globally (enabled for Build+)")
+# gh_grep tools disabled globally (replaced by `@github-search` subagent)
+config['tools']['gh_grep_*'] = False
+print("  Set gh_grep_* disabled globally (use `@github-search` subagent)")

549-564: ⚠️ Potential issue | 🔴 Critical

Playwriter MCP configuration inconsistent with on-demand goal.

The playwriter MCP is added with "enabled": True (lines 556, 562), but the PR objective is to disable it globally. The MCP server should be configured but disabled until the @playwriter subagent is invoked.

Proposed fix
     if bun_path:
         config['mcp']['playwriter'] = {
             "type": "local",
             "command": ["bun", "x", "playwriter@latest"],
-            "enabled": True
+            "enabled": False
         }
     else:
         config['mcp']['playwriter'] = {
             "type": "local",
             "command": ["npx", "playwriter@latest"],
-            "enabled": True
+            "enabled": False
         }
-    print("  Added playwriter MCP (eager load - used by all agents)")
+    print("  Added playwriter MCP (lazy load - `@playwriter` subagent only)")

571-577: ⚠️ Potential issue | 🔴 Critical

gh_grep MCP should be disabled for on-demand loading.

The gh_grep MCP is added with "enabled": True (line 575), contradicting the documented strategy where it's replaced by the @github-search subagent using rg/bash.

Proposed fix
 if 'gh_grep' not in config['mcp']:
     config['mcp']['gh_grep'] = {
         "type": "remote",
         "url": "https://mcp.grep.app",
-        "enabled": True
+        "enabled": False
     }
-    print("  Added gh_grep MCP (eager load - used by Build+)")
+    print("  Added gh_grep MCP (lazy load - use `@github-search` instead)")

401-424: ⚠️ Potential issue | 🟠 Major

OmO agents (Sisyphus, Planner-Sisyphus) still enable augment-context-engine_*.

Lines 409 and 421 enable augment-context-engine_*: True for Sisyphus and Planner-Sisyphus, which contradicts the on-demand loading strategy. These should use the @augment-context-engine subagent pattern instead.

Proposed fix
             sorted_agents["Sisyphus"] = {
                 ...
                 "tools": {
                     "write": True, "edit": True, "bash": True, "read": True, "glob": True, "grep": True,
                     "webfetch": True, "task": True, "todoread": True, "todowrite": True,
-                    "context7_*": True, "osgrep_*": True, "augment-context-engine_*": True
+                    "context7_*": True, "osgrep_*": True
                 },
                 ...
             }
             sorted_agents["Planner-Sisyphus"] = {
                 ...
                 "tools": {
                     "write": False, "edit": False, "bash": False,
                     "read": True, "glob": True, "grep": True, "webfetch": True, "task": False,
-                    "context7_*": True, "osgrep_*": True, "augment-context-engine_*": True
+                    "context7_*": True, "osgrep_*": True
                 },
                 ...
             }
🤖 Fix all issues with AI agents
In @.agent/tools/context/github-search.md:
- Line 74: Replace ripgrep usages that specify the non-existent built-in type
"tsx" with the existing "ts" type so both .ts and .tsx files are matched; update
the occurrences of --type tsx and -t tsx in the document (e.g., the command
shown as rg "useState\(.*loading" --type tsx and the -t tsx mention) to --type
ts and -t ts respectively, and also change the other instance around line 104 to
use --type ts.

rg -C 3 "pattern" --type js

# Regex patterns
rg "useState\(.*loading" --type tsx
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# First, check if the file exists and read the relevant lines
cat -n .agent/tools/context/github-search.md | sed -n '70,110p'

Repository: marcusquinn/aidevops

Length of output: 1050


🏁 Script executed:

# Verify ripgrep's type system
rg --type-list | head -100

Repository: marcusquinn/aidevops

Length of output: 2914


🏁 Script executed:

# Specifically search for ts/tsx types
rg --type-list | grep -i "ts\|tsx"

Repository: marcusquinn/aidevops

Length of output: 755


Use --type ts to match both TypeScript and TSX files — the ts type built-in type in ripgrep explicitly includes *.tsx files, so -t ts or --type ts covers both.

The --type tsx flag doesn't exist as a built-in ripgrep type. While the proposed glob pattern fix (-g '*.tsx') would work, the more direct approach is to use the existing ts type which already encompasses .tsx files.

Apply at lines 74 and 104:

Recommended approach
-rg "useState\(.*loading" --type tsx
+rg "useState\(.*loading" --type ts
-rg "useEffect\(\(\) => \{" --type tsx -C 2
+rg "useEffect\(\(\) => \{" --type ts -C 2

Also correct line 77: -t tsx should be -t ts.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
rg "useState\(.*loading" --type tsx
rg "useState\(.*loading" --type ts
🤖 Prompt for AI Agents
In @.agent/tools/context/github-search.md at line 74, Replace ripgrep usages
that specify the non-existent built-in type "tsx" with the existing "ts" type so
both .ts and .tsx files are matched; update the occurrences of --type tsx and -t
tsx in the document (e.g., the command shown as rg "useState\(.*loading" --type
tsx and the -t tsx mention) to --type ts and -t ts respectively, and also change
the other instance around line 104 to use --type ts.

@augmentcode
Copy link

augmentcode bot commented Feb 2, 2026

🤖 Augment PR Summary

Summary: This PR shifts several heavy MCP integrations to an on-demand subagent model to reduce session startup context (claimed ~4.6K tokens).

Changes:

  • Removes `playwriter_*`, `augment-context-engine_*`, and `gh_grep_*` from the default/primary agent tool sets in `generate-opencode-agents.sh`
  • Adds `mcp:` frontmatter to the Playwriter and Augment Context Engine subagent docs to document MCP requirements
  • Introduces a new `@github-search` subagent that uses `gh` CLI + `rg` (no MCP) as a replacement for `gh_grep`
  • Updates context docs (`mcp-discovery.md`) and the subagent index (`subagent-index.toon`) to reflect the on-demand pattern

Technical Notes: osgrep remains the always-enabled semantic search tool; other MCP-backed capabilities are intended to be activated only when the corresponding subagent is invoked.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 5 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

# to reduce context bloat from verbose tool descriptions
#
# MCP On-Demand Loading Strategy:
# The following MCPs are DISABLED globally to reduce context token usage (~4.6K saved):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comments here say playwriter_* is disabled globally, but later in this script config['tools']['playwriter_*'] = True and the Playwriter MCP is configured as eager-loaded, so it will still load for all agents and likely negate the intended token savings.

Other Locations
  • .agent/scripts/generate-opencode-agents.sh:549
  • .agent/scripts/generate-opencode-agents.sh:566

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

# MCP On-Demand Loading Strategy:
# The following MCPs are DISABLED globally to reduce context token usage (~4.6K saved):
# - playwriter_*: ~3K tokens - enable via @playwriter subagent
# - augment-context-engine_*: ~1K tokens - enable via @augment-context-engine subagent
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After removing augment-context-engine_* from DEFAULT_TOOLS, it looks like @augment-context-engine won’t actually be granted augment-context-engine_* anywhere during subagent generation (only playwriter is handled in the case block), so invoking that subagent may not work as described.

Other Locations
  • .agent/scripts/generate-opencode-agents.sh:691
  • .agent/scripts/generate-opencode-agents.sh:712

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

# The following MCPs are DISABLED globally to reduce context token usage (~4.6K saved):
# - playwriter_*: ~3K tokens - enable via @playwriter subagent
# - augment-context-engine_*: ~1K tokens - enable via @augment-context-engine subagent
# - gh_grep_*: ~600 tokens - replaced by @github-search subagent (uses rg/bash)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This claims gh_grep_* is disabled and replaced by @github-search, but the script still configures gh_grep as an eager-loaded MCP server; if the goal is to remove its startup overhead, this likely needs to be made lazy/optional too.

Other Locations
  • .agent/scripts/generate-opencode-agents.sh:569
  • .agent/scripts/generate-opencode-agents.sh:510

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

3. Use the MCP tools as documented in the subagent

**Note**: The `mcp:` field is declarative - it documents which MCP the subagent
requires. The actual enabling happens in `generate-opencode-agents.sh` which
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The doc says the mcp: field is declarative and "actual enabling happens" in generate-opencode-agents.sh, but the generator currently doesn’t appear to read mcp: frontmatter (subagent tool enablement is hardcoded by subagent name). This mismatch could confuse users about how on-demand MCPs are actually activated.

Other Locations
  • .agent/scripts/generate-opencode-agents.sh:238
  • .agent/scripts/generate-opencode-agents.sh:691

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

gh search code "getServerSession" --repo nextauthjs/next-auth --limit 10

# Filter by file path
gh search code "middleware" --filename "*.ts" --limit 10
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gh search code ... --filename "*.ts" likely won’t match anything because GitHub’s filename: qualifier doesn’t treat * as a glob; this example may be misleading unless the CLI explicitly supports wildcards here.

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@marcusquinn marcusquinn merged commit 711efdb into main Feb 2, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant