claude-code - 💡(How to fix) Fix [BUG] Plugin agent descriptions (and custom agents) load unconditionally into context — no parity with disable-model-invocation for skills

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Code Example

[]
RAW_BUFFERClick to expand / collapse

Bug Description Plugin agents (and custom agents) lack disable-model-invocation equivalent — internal agents pollute context with no opt-out

Skills support disable-model-invocation: true in frontmatter, which strips the skill from context entirely until explicitly invoked. Plugin agents have no equivalent — their descriptions load into context at session start unconditionally, even when the agent is purely internal and will always be invoked by name from within the plugin rather than discovered through Claude's matching.

This is a meaningful asymmetry. A plugin with several internal coordination agents (spawned explicitly by other skills or agents) pays a per-request context tax on every one of their descriptions, with no way to opt out short of gutting the descriptions themselves.

Real numbers from a plugin I'm working on:

  • skillsmith:skill-reviewer: 340 tokens

  • skillsmith:plugin-validator: 298 tokens

  • skillsmith:interviewer: 251 tokens

  • skillsmith:benchmark-analyzer: 137 tokens

  • (+ several more)

None of these are ever matched by Claude — they're always invoked explicitly. But their descriptions are in context on every request regardless.

Expected behavior: plugin agents that are always invoked by name should be expressible as invisible until invoked — mirroring exactly what disable-model-invocation: true does for skills.

Suggested fix: support disable-model-invocation: true (or equivalent frontmatter flag) for agent .md files, consistent with the existing skills behavior.

Environment Info

  • Platform: darwin
  • Terminal: iTerm.app
  • Version: 2.1.153
  • Feedback ID: b77ccc0b-93dc-400a-8f9e-91758c695279

Errors

[]

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING