Files
hermes-agent/toolsets.py
Teknium 3f811f52fd fix(toolsets): pass visited set by reference to prevent diamond dependency duplication
Cherry-picked from PR #2292 by @Mibayy. Closes #2134.

resolve_toolset() called visited.copy() per sibling include, breaking
dedup for diamond dependencies (D resolved twice via B and C paths)
and causing duplicate cycle warnings.

Fix: pass visited directly so siblings share the same set. The .copy()
for the all/* alias at the top level is kept so each top-level toolset
gets an independent pass. Removes the print() cycle warning since
hitting a visited name now usually means diamond (not a bug).
2026-03-21 07:11:09 -07:00

17 KiB