# NousResearch/hermes-agent · Memory tool partial replace truncating surrounding entry content

## Open now

- 1 issue, 1 PR open on GitHub.
- #56464: \[BUG\] memory tool: replace/add silently truncate MEMORY.md — data loss
- PR #56497: fix(tools): detect squashed multi-entry blobs as memory drift (#56464)

Most members concern the memory tool's replace operation, where a partial old_text match is reported to replace or truncate the whole entry instead of preserving surrounding content. One member also covers detecting squashed multi-entry blobs as memory drift, which is related but distinct.

## TL;DR

- 11 member(s): 1 open issue(s), 1 closed issue(s), 1 open PR(s), 1 merged PR(s), 7 PR(s) closed without merging.
- A fix was merged to main in PR #117988. Verify it addresses your case.
- **Recommended:** read PR #117988 (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: `partially_resolved` · deciding PR(s): `pr-117988`. This is distinct from the fix status above. Weigh it yourself.

## How this cluster was grouped

- Link evidence (`STRUCTURAL_PARTIAL`): some members are connected by structural evidence (shared changed files, or a closing/superseded reference); the rest are joined by an automated relevance judgement over their text.
- Members outside that structural core may belong to a different underlying problem.
- Pairwise link density `0.17`: 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.

## Open related issues

- #56464: \[BUG\] memory tool: replace/add silently truncate MEMORY.md — data loss

## Closed / duplicate issues

- #59184: \[Bug\]: Memory replace with partial old_text on composite entry truncates everything after match

## Prior & competing PRs

- **#117988: fix(memory): replace states and surfaces the whole-entry contract — no more silent truncation (#117952, salvage #109177)**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`
  - files: `contributors/emails/[redacted:email]`, `hermes_cli/write_approval_commands.py`, `tests/tools/test_memory_tool.py`, `tests/tools/test_write_approval.py`, `tools/memory_tool.py`, `tools/memory_tool_store.py`, `website/docs/user-guide/features/memory.md`
- **#56497: fix(tools): detect squashed multi-entry blobs as memory drift (#56464)**. open
  - maintainer direction: category `uncategorized`; implication `needs_llm`
  - files: `tests/tools/test_memory_tool.py`, `tools/memory_tool_store.py`
- **#59206: fix(memory): substring replace preserves surrounding entry content**. closed without merge
  - maintainer direction: category `stale_abandoned`; implication `active`
- **#59602: fix(memory): substring replace preserves surrounding entry content**. closed without merge
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#59206`
- **#59788: fix(memory): preserve surrounding content in partial replace (#59184)**. closed without merge
  - maintainer direction: category `stale_abandoned`; implication `active`
- **#60698: fix(memory): replace partial old_text within entry instead of replacing whole entry (#59184)**. closed without merge
  - maintainer direction: category `partial_fix`; implication `needs_llm`
- **#61357: fix(memory): preserve entry content on substring replace**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#117988`, `#66321`, `#117952`
- **#66321: fix(memory): substring replace preserves content in all paths (single + batch)**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#117988`, `#105693`, `#59184`, `#59206`
- **#105693: fix(memory): preserve surrounding content on partial replace across single and batch paths (#59184)**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#59184`

## Fix status

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