Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

fix: prevent redundant skill reloading in conversation - #11838

Merged
hannesrudolph merged 1 commit into
mainfrom
fix/skill-dedup-constraint
Mar 2, 2026
Merged

fix: prevent redundant skill reloading in conversation#11838
hannesrudolph merged 1 commit into
mainfrom
fix/skill-dedup-constraint

Conversation

@hannesrudolph

@hannesrudolphhannesrudolph commented Mar 2, 2026

Copy link
Copy Markdown
Contributor

Problem

Models sometimes re-invoke the skill tool 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():

- Do NOT reload a skill whose instructions already appear in this conversation.

One-line change. All existing tests pass.

Interactively review PR in Roo Code Cloud

Add deduplication constraint to skill matching instructions so models
don't re-invoke the skill tool for content already present in the
conversation history.
@dosubotdosubotBot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working labels Mar 2, 2026
@dosubotdosubotBot added the lgtm This PR has been approved by a maintainer label Mar 2, 2026
@hannesrudolph
hannesrudolph merged commit 459f270 into mainMar 2, 2026
18 checks passed
@hannesrudolph
hannesrudolph deleted the fix/skill-dedup-constraint branch March 2, 2026 23:47
@github-project-automationgithub-project-automationBot moved this from New to Done in Roo Code RoadmapMar 2, 2026
@github-actionsgithub-actionsBot mentioned this pull request Mar 4, 2026
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bugSomething isn't workinglgtmThis PR has been approved by a maintainersize:XSThis PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@hannesrudolph@daniel-lxs