Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions agent/background_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,10 @@ def _bg_review_auto_deny(command, description, **kwargs):
review_whitelist,
deny_msg_fmt=(
"Background review denied non-whitelisted tool: "
"{tool_name}. Only memory/skill tools are allowed."
'"{tool_name}". Review mode only permits memory and '
"skill management tools. Use `skill_view` to read a "
"skill, `skill_manage` to modify one, `skills_list` "
"to discover skills, and `memory` for notes."

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

memory is absent from the whitelist when both memory flags are disabled (review_toolsets begins as only skills on current main). Please make this guidance conditional on memory being available, and apply the same condition to the injected review prompt.

),
)
try:
Expand All @@ -839,8 +842,11 @@ def _bg_review_auto_deny(command, description, **kwargs):
user_message=(
prompt
+ "\n\nYou can only call memory and skill "
"management tools. Other tools will be denied "
"at runtime — do not attempt them."
"management tools. Use `skill_view` to read a "
"skill, `skill_manage` to modify one, "
"`skills_list` to discover skills, and `memory` "
"for notes. Other tools will be denied at "
"runtime — do not attempt them."
),
conversation_history=_review_history,
)
Expand Down
Loading