fix: prevent redundant skill reloading in conversation#11838
Merged
hannesrudolph merged 1 commit intomainfrom Mar 2, 2026
Merged
fix: prevent redundant skill reloading in conversation#11838hannesrudolph merged 1 commit intomainfrom
hannesrudolph merged 1 commit intomainfrom
Conversation
Add deduplication constraint to skill matching instructions so models don't re-invoke the skill tool for content already present in the conversation history.
daniel-lxs
approved these changes
Mar 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Models sometimes re-invoke the
skilltool for a skill whose instructions are already present in the conversation history. This wastes tokens and adds unnecessary tool call round-trips.Root Cause
The
<mandatory_skill_check>instructions in the system prompt tell the model to check for applicable skills "before producing ANY user-facing response" but never say to skip if the skill is already loaded. The model sometimes complies literally and re-loads the same skill.Fix
Added a single deduplication constraint to the CONSTRAINTS block in
getSkillsSection():One-line change. All existing tests pass.
Interactively review PR in Roo Code Cloud