Skip to content

feat(capture): optional update-on-capture for similar memories - #465

Merged
EyJunge1 merged 2 commits into
tickernelz:mainfrom
EyJunge1:feat/update-on-capture
Oct 31, 2026
Merged

EyJunge1 merged 2 commits into
tickernelz:mainfrom
EyJunge1:feat/update-on-capture

Conversation

@EyJunge1

Copy link
Copy Markdown
Collaborator

Summary

  • Adds opt-in update-on-capture: before auto-capture persists, search similar memories and let the model choose add / update / supersede (soft-delete into trash).
  • Extracts memoryClient.updateMemory for shared in-place rewrite (API + capture).
  • Config: updateOnCaptureEnabled (default false), updateOnCaptureSimilarityThreshold (0.75), updateOnCaptureMaxCandidates (5). Also lands dreaming config keys used by the follow-up PR (relatedThreshold, crossProject).

Partial work for #464 (capture half). Dreaming consolidation follows in a stacked PR.

Test plan

  • bun test (targeted + suite locally)
  • bun run typecheck / bun run check
  • Enable updateOnCaptureEnabled: true, capture a fact twice with a changed value → expect update/supersede instead of a second active row
  • Confirm default-off keeps add-only behavior

Checklist

  • Branch is based on main
  • bun test passes
  • bun run typecheck passes
  • bun run check passes
  • Docs / README updated

Search for similar memories before auto-capture persist and let the
model choose add, update, or supersede (soft-delete into trash).
@EyJunge1
EyJunge1 merged commit 3c7837e into tickernelz:main Oct 31, 2026
7 checks passed
EyJunge1 added a commit to EyJunge1/opencode-mem that referenced this pull request Oct 31, 2026
@EyJunge1 EyJunge1 mentioned this pull request Oct 31, 2026
3 tasks done
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