Files
hermes-agent/tests/agent
Teknium cf2ffb3cbf fix(memory): drop the replace action; patch is the only edit
replace overwrote the whole matched entry, and models used it as a
find-and-swap, wiping the sibling facts in multi-fact entries (NVIDIA:
19/40 tasks on Opus 4.8). patch does everything replace did (old_text =
the whole entry rewrites it) without that failure, so the tool now
offers add / patch / remove only.

- A replace call, single or inside a batch, is refused with a pointer to
  patch and writes nothing. Writes staged for approval before this change
  still pin, display and replay through the store's replace.
- The schema loses the replace warnings, explains patch once, and drops
  the added target prose: target is already an enum in `required`, the
  runtime refusal teaches a missing or nested target, and batch items now
  set additionalProperties: false so a nested target cannot be expressed.
- Net tool tokens per session: 13,264 on main -> 13,188 (-76); the PR
  head before this commit was 13,446.
- Model-facing hints that said "shorten (replace)" now say patch.

Reverses the whole-entry replace contract from #117952 by maintainer
decision; the tests that drove replace through the tool now drive patch,
and one new test pins the refusal.
2026-10-12 19:13:09 -07:00
..
…