mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[GH-ISSUE #618] [Issue]: LTM memory edits keep old detail text as unremovable "ghost" content on save #319
Labels
No labels
agent: chess
agent: conversation-calls
agent: eightball
agent: haptic
agent: hierarchical-maps
agent: hierarchical-maps
agent: illustrator
agent: poker
agent: rock-paper-scissors
agent: tic-tac-toe
agent: uno
artifacts
bug
bugfix
build
catalog
ci
client
dependencies
docs
documentation
enhancement
feature
fixed-in-staging
in-pr
normal-scope
packages
pull-request
qol
regression
roadmap
scope-risk
server
soup
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Agents#319
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Promansis on GitHub (Aug 26, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Agents/issues/618
Originally assigned to: @Promansis on GitHub.
Summary
Editing a memory detail in the Memory Vault and saving keeps the pre-edit text alongside the edit. The old "ghost" lines persist above the new text, so memories accumulate contradicting phrasing that can never be removed by editing.
Affected package
Long-Term Memory (
long-term-memory), v1.2.14Expected behavior
Saving a manual edit replaces the detail's shown text with exactly what the user typed. Deleted lines stay deleted; rewritten lines no longer appear.
Actual behavior
On
PATCH /notes/:id, the client sends the full editedsectionsrecord as a replacement. Server-side,LongTermMemoryStorage.updateNote()treats the section change as an append: it stacks a newmanualcontribution on top of all existing contributions and re-renders withrenderSectionContributions(). For additive sections (isAdditiveLtmSection()—timeline_event,world,relationship.history,tone.observations, all character sections exceptitems/progression, andanchor-tagged sections), the rendered text is everysourcecontribution's lines plus the latest manual contribution's lines, deduped only on exact normalized line matches. Lines the user deleted live on in their originalsourcecontribution and are re-rendered above the edit; partially rewritten lines appear in both forms. Each successive edit stacks another ghost.Memory types/sections that are not additive render only the latest contribution, and purely manual memories have no source contribution, which is why many memories behave while extracted/imported ones ghost.
Steps to reproduce
worldmemory).(Confirmed by code inspection of the save path rather than a live reproduction run.)
Environment
Logs, screenshots, or video
Reporter attached two screenshots of the duplicated memory content (not pasted here).
Additional context
Relevant code:
packages/long-term-memory/src/engine/packages/server/src/services/long-term-memory/storage.ts(updateNote, section contribution append around line 443),section-contributions.ts(renderSectionContributions), anddraft-projector.ts(isAdditiveLtmSection). Contribution merging is the intended behavior for extraction draft mutations (draft-projector path); the fix should scope direct editor saves to supersede that section's accumulated contributions rather than stack on them.Template check