Does disable-model-invocation in Custom Agents Actually Reduce Context Window Usage and Token Impact? #198251
Replies: 5 comments 1 reply
-
|
Hi @r-shakeri , My understanding is that The skill should still be discovered/registered, with its metadata (name/description) available, while the full skill content is only loaded when explicitly invoked. I haven't seen documentation confirming whether that metadata is excluded from the model's context or token budget, so a GitHub team member may need to clarify that part. If this helps answer your question, please consider marking it as the accepted answer. 🙂 |
Beta Was this translation helpful? Give feedback.
-
|
No — disable-model-invocation does not reduce context window usage or token impact directly. What disable-model-invocation Actually Does |
Beta Was this translation helpful? Give feedback.
-
|
Good question this flag usually only stops automatic invocation, while skill metadata can still be present for discovery, so it won’t fully remove context/token usage unless explicitly excluded. Pretty similar to how you optimize strategy in Pakrummy game, where control matters more than presence. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @r-shakeri, My understanding is that The skill itself is still discovered by VS Code/Copilot, and its metadata (such as name and description) remains available so that the system knows the skill exists. The full contents of the skill are typically loaded only when the skill is explicitly invoked. So, based on the current documentation, I would interpret the behavior as:
I haven't seen documentation explicitly stating that Hopefully someone from the Copilot team can confirm the exact token and context implications, since that's an important consideration when managing large numbers of skills. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
🏷️ Discussion Type
Question
💬 Feature/Topic Area
VS Code
Body
Hi,
I’m trying to better understand how disable-model-invocation: true affects context loading for Agent Skills.
From the documentation and other sources, I understand that:
Skills are discovered at startup
Their metadata (name + description) is used for matching and be included in the model context
Full skill content is loaded only when the skill is activated
However, it’s unclear how disable-model-invocation interacts with this process.
My question is:
If a skill has
disable-model-invocation: true, and we explicitly invoke which skills an agent should use,is all skills metadata (e.g. name and description) still included in the model’s initial context / skill discovery list,
or are they completely excluded from the context unless explicitly invoked?
In other words:
Does this flag only disable automatic invocation?
Or does it also prevent the skill from contributing to the context (e.g. metadata injection / token usage)?
This is especially important for understanding context window usage and token impact when working with many skills.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions