Skip to content

fix(memory): keep each fact on one MEMORY.md line so delete removes it all - #505

Merged
mrnasil merged 2 commits into
mainfrom
fix/memory-multiline-fact
Nov 25, 2026
Merged

mrnasil merged 2 commits into
mainfrom
fix/memory-multiline-fact

Conversation

@mrnasil

@mrnasil mrnasil commented Nov 25, 2026

Copy link
Copy Markdown
Member

append_entry wrote a remembered fact to MEMORY.md as-is, so a multi-line fact took up several lines. remove_entry drops only the line that holds the (id:…) marker, so delete left the fact's other lines in the index that is injected into every prompt.

The MEMORY.md line now collapses all whitespace, newlines included, into single spaces, so each fact is one line and delete removes all of it. The database keeps the original text.

Test: a three-line fact is written on one line and removed completely. All 95 memory tests pass.

🤖 Generated with Claude Code

…t all

append_entry wrote a remembered fact as-is. A multi-line fact spread
over several lines, and remove_entry drops only the line holding its
`(id:…)` marker, so `delete` left the rest in the index injected into
every prompt. The MEMORY.md line now collapses whitespace; the database
keeps the original text.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@mrnasil
mrnasil enabled auto-merge (squash) November 25, 2026 15:57
@mrnasil
mrnasil merged commit eb6ff1b into main Nov 25, 2026
7 checks passed
@mrnasil
mrnasil deleted the fix/memory-multiline-fact branch November 25, 2026 17:01
@mrnasil mrnasil mentioned this pull request Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant