# NousResearch/hermes-agent · Fix visited-set sharing in resolve_toolset deduplication

## Open now

- Nothing open on GitHub.

These issues and PRs address a bug in resolve_toolset() where the visited set is copied rather than shared across branches, causing diamond dependency patterns to be processed multiple times. The proposed fix passes the visited set by reference so sibling and cross-branch includes are properly deduplicated.

## TL;DR

- 5 member(s): 0 open issue(s), 1 closed issue(s), 0 open PR(s), 1 merged PR(s), 3 PR(s) closed without merging.
- A fix was merged to main in PR #2311. Verify it addresses your case.
- **Recommended:** read PR #2311 (and any competing PRs below) before filing. Confirm the merged change covers your symptom.

## Maintainer resolution verdict

- Internal-tracker verdict over this cluster's issue members: `resolved` · deciding PR(s): `pr-2311`. This is distinct from the fix status above. Weigh it yourself.

## How this cluster was grouped

- Link evidence (`STRUCTURAL_SPANNING`): every member is connected by structural evidence: shared changed files, or a closing/superseded reference.
- Pairwise link density `0.40`: the share of member pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36. `1.00` means every pair is linked.

## Closed / duplicate issues

- #2134: fix(toolsets): resolve_toolset() uses visited.copy() preventing cross-branch deduplication

## Prior & competing PRs

- **#2135: fix(toolsets): share visited set across sibling includes in resolve_toolset()**. closed without merge · fix tier `suggested`
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`
  - _suggested-tier fix detail withheld; re-request with `?tier=all` to include it._
- **#2252: fix(toolsets): share visited set across branches in resolve_toolset()**. closed without merge · fix tier `suggested`
  - maintainer direction: category `uncategorized`; implication `needs_llm`
  - _suggested-tier fix detail withheld; re-request with `?tier=all` to include it._
- **#2311: fix(toolsets): pass visited set by reference to prevent diamond dependency duplication**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`; implication `superseded`
  - files: `toolsets.py`
- **#2292: fix(toolsets): pass visited set by reference to prevent diamond dependency duplication**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `#2311`

## Fix status

- Merged to main in PR #2311 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-03-21`. This confirmation is old and may be out of date (a revert/reopen would not have invalidated it here); re-verify.
- Subsystem: `agent`
