-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
Memory: skip markdown placeholder snippets during short-term promotion #80582
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.staleMarked as stale due to inactivityMarked as stale due to inactivity
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.staleMarked as stale due to inactivityMarked as stale due to inactivity
Type
Fields
Priority
None yet
Summary
Short-term memory promotion can treat markdown skeleton placeholders (for example a bare
-under a daily note heading) as promotable/relocatable snippets. In the affected case, promotion later appended empty or near-empty blocks intoMEMORY.mdbecause a grounded candidate could be rehydrated onto a placeholder line.Repro shape
A daily note can contain normal bootstrap sections with empty bullets:
If a grounded/dreaming candidate points at one of those placeholder lines, it can pass through candidate recording/ranking/apply. During relocation, broad substring matching can also match a summarized candidate against an empty or structurally meaningless markdown range.
Actual
Placeholder-only snippets such as
-or markdown skeleton ranges can be recorded/ranked/applied, and promotion can append low-value empty blocks into long-term memory.Expected
-,*,+) should not be stored as short-term promotion candidates.Patch sketch
Add placeholder filtering near existing dreaming-contamination filtering:
Then use
isUnpromotableShortTermSnippetin:recordShortTermRecallsrecordGroundedShortTermCandidatesrankShortTermPromotionCandidatesAlso make substring relocation require meaningful content:
Regression tests to add
Suggested coverage in
extensions/memory-core/src/short-term-promotion.test.ts:Notes
I have a local patch with these helper functions and regression tests if maintainers want it converted into a PR.