hermes - 💡(How to fix) Fix [Bug]: MAX_DEPTH设置于_strip_blocked_tools冲突 [3 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#14328Fetched 2026-04-24 06:17:44
View on GitHub
Comments
3
Participants
3
Timeline
7
Reactions
0
Author
Timeline (top)
labeled ×4commented ×3

Error Message

Additional Logs / Traceback (optional)

Root Cause

Root Cause Analysis (optional)

Code Example


---
RAW_BUFFERClick to expand / collapse

Bug Description

_strip_blocked_tools明确排除了delegation工具,子agent无法再次派发孙agent,MAX_DEPTH=2的防护中间存在冲突

Steps to Reproduce

工具集权限控制

def _strip_blocked_tools(toolsets: List[str]) -> List[str]: """Remove toolsets that contain only blocked tools.""" # 移除包含被封锁工具的整个工具集,配合 DELEGATE_BLOCKED_TOOLS 双重保证子 Agent 无法访问禁止工具。 blocked_toolset_names = { "delegation", "clarify", "memory", "code_execution", } return [t for t in toolsets if t not in blocked_toolset_names] 子agent toolsets设置 if toolsets: # Intersect with parent — subagent must not gain tools the parent lacks child_toolsets = _strip_blocked_tools([t for t in toolsets if t in parent_toolsets]) elif parent_agent and parent_enabled is not None: child_toolsets = _strip_blocked_tools(parent_enabled) elif parent_toolsets: child_toolsets = _strip_blocked_tools(sorted(parent_toolsets)) else: child_toolsets = _strip_blocked_tools(DEFAULT_TOOLSETS)

Expected Behavior

Actual Behavior

Affected Component

CLI (interactive chat)

Messaging Platform (if gateway-related)

No response

Debug Report

Operating System

ma'c

Python Version

No response

Hermes Version

No response

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

No response

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

extent analysis

TL;DR

The issue is likely caused by the _strip_blocked_tools function removing the "delegation" toolset, which is necessary for sub-agents to dispatch grandchild agents, and a workaround may involve modifying this function to allow the "delegation" toolset when MAX_DEPTH=2.

Guidance

  • Review the _strip_blocked_tools function to understand why it removes the "delegation" toolset and consider modifying it to exempt this toolset when MAX_DEPTH=2.
  • Investigate the MAX_DEPTH setting and its relationship with the "delegation" toolset to determine if there's a configuration change that can resolve the issue.
  • Check the blocked_toolset_names set in the _strip_blocked_tools function to see if it can be modified to not include "delegation" under certain conditions.
  • Consider adding a conditional statement to the _strip_blocked_tools function to handle the "delegation" toolset differently when MAX_DEPTH=2.

Notes

The issue seems to be related to the interaction between the _strip_blocked_tools function and the MAX_DEPTH setting, but without more information about the desired behavior and the context in which this code is deployed, it's difficult to provide a more specific solution.

Recommendation

Apply workaround: Modify the _strip_blocked_tools function to conditionally allow the "delegation" toolset when MAX_DEPTH=2, as this seems to be the most direct way to address the issue described.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING