Reduce memory preamble noise and fix scheduler reminder deferral#4
Merged
Reduce memory preamble noise and fix scheduler reminder deferral#4
Conversation
- Filter recentMemories by cosine similarity (>= 0.2) before preamble injection — unrelated memories are never seen and can't be volunteered - Add RECENT_MEMORY_MIN threshold constant to similarity.ts - Remove "Proactive Communication" section from system prompt (was actively encouraging unprompted memory surfacing) - Add memory_forget-on-correction rule: when user says a memory is wrong, forget it immediately rather than just acknowledging - Add verbal-promise rule: "I'll remind you later" requires a real schedule_create, not just intent - Fix scheduler reminder deferral: reminders must be delivered immediately and considered done — no "I'll mention this later in your shift" - Add specific-date hint to memory_store: appointments must use YYYY-MM-DD, not day-of-week, to avoid Monday/Tuesday false positives across weeks Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Deploying sprawl with
|
| Latest commit: |
5947150
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2d8d2639.sprawl.pages.dev |
| Branch Preview URL: | https://feat-memory-injection-fixes.sprawl.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
recentMemoriesare now filtered by cosine similarity (≥ 0.2) against the current message before preamble injection. Unrelated memories are never injected — the model can't volunteer what it can't see. Falls back to unfiltered if embedding fails. Note: newly-stored memories without an embedding yet are skipped until the async embedding generation completes (next turn).memory_forgeton correction: when user says a memory is wrong/outdated, agent must forget it immediately, not just acknowledgeschedule_createbacking itmemory_storedate hint: appointments must store YYYY-MM-DD, not day-of-week, to avoid Monday/Tuesday false positives week-over-weekTest plan
memory_forgetbefore responding🤖 Generated with Claude Code