fix(agent): restrict background review agent to memory and skills toolsets#16001
Closed
luyao618 wants to merge 1 commit into
Closed
fix(agent): restrict background review agent to memory and skills toolsets#16001luyao618 wants to merge 1 commit into
luyao618 wants to merge 1 commit into
Conversation
…lsets The background skill/memory review agent was created without toolset restrictions, inheriting the full default tool set. This allowed it to use terminal, send_message, delegate_task, and other tools outside its intended scope, potentially performing unrelated side effects after skill creation. Restrict the review agent to only memory and skills toolsets by passing enabled_toolsets=['memory', 'skills'] during AIAgent construction. Fixes NousResearch#15204
Contributor
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.
What does this PR do?
The background skill/memory review agent was created without toolset restrictions, inheriting the full default tool set. This allowed it to use terminal, send_message, delegate_task, and other tools outside its intended scope, potentially performing unrelated side effects (e.g., sending messages to other agents via tmux, modifying unrelated files) after completing its skill creation task.
This PR restricts the review agent to only
memoryandskillstoolsets by passingenabled_toolsets=["memory", "skills"]during AIAgent construction.Related Issue
Fixes #15204
Type of Change
Changes Made
enabled_toolsets=["memory", "skills"]to theAIAgent()constructor call in_spawn_background_review()(run_agent.py), restricting the background review agent to only memory and skill management toolsHow to Test
pytest tests/run_agent/test_background_review_toolset_restriction.py -vpytest tests/ -q --ignore=tests/integration --ignore=tests/e2eChecklist
Code
pytest tests/ -qand all tests passDocumentation & Housekeeping