# NousResearch/hermes-agent · Memory context injection framing and contamination issues

## Open now

- Nothing open on GitHub.

These issues and PRs concern how recalled memory and skill context is injected into conversations — including problems with role assignment, message contamination, deduplication of markers, gateway isolation, and framing memory as background context rather than authoritative user content.

## TL;DR

- 4 member(s): 0 open issue(s), 1 closed issue(s), 0 open PR(s), 1 merged PR(s), 2 PR(s) closed without merging.
- A fix was merged to main in PR #75921. Verify it addresses your case.
- **Recommended:** read PR #75921 (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-75921`. 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.50`: 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

- #65891: Model switch markers (\[System: The active model...\]) pollute conversation history and permanently waste context tokens with no cleanup

## Prior & competing PRs

- **#75921: fix(gateway): dedup model-switch markers so they don't accumulate in history (fixes #65891)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `tests/tui_gateway/test_model_switch_marker_role.py`, `tui_gateway/server.py`
- **#48346: fix(tui): use role='user' for model switch marker to avoid HTTP 400 on strict providers**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `#54210`, `#48338`
- **#66011: fix(gateway): dedup model-switch markers so they don't accumulate in history (fixes #65891)**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `#75921`

## Fix status

- Merged to main in PR #75921 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-08-01`.
- Subsystem: `agent`
