Skip to content

Recall EvalOps memory in chat context#52

Merged
haasonsaas merged 1 commit intomainfrom
codex/evalops-memory-recall-context
Apr 21, 2026
Merged

Recall EvalOps memory in chat context#52
haasonsaas merged 1 commit intomainfrom
codex/evalops-memory-recall-context

Conversation

@haasonsaas
Copy link
Copy Markdown
Collaborator

Summary

  • Recall relevant EvalOps Memory records for the latest user chat message when memory sync is enabled.
  • Respect the same per-category toggles for chat, meeting summaries, and journal memories.
  • Inject a bounded, deduplicated <evalops_memory> block into the chat system prompt so Kestrel can continue context across machines without mutating local SQLite threads.
  • Treat recall failures as non-fatal and continue the local chat flow.

Closes #15.

Validation

  • npm run build
  • git diff --check

Validation caveat

@cursor
Copy link
Copy Markdown

cursor Bot commented Apr 21, 2026

PR Summary

Medium Risk
Modifies chat prompt construction to call EvalOps Memory recall at runtime, which could affect model behavior and adds dependency on external recall responses (though failures are handled as non-fatal).

Overview
Chat prompts now optionally include a bounded <evalops_memory> context block built from EvalOps Memory recall results for the latest non-empty user message.

Adds buildEvalOpsMemoryRecallBlock() to recall top matching chat_thread, meeting_summary, and journal memories (respecting the existing sync toggles), deduplicate/sort by similarity, and truncate snippets before injecting into the system prompt; recall errors/offline responses are ignored so local chat continues.

Reviewed by Cursor Bugbot for commit 3ce291e. Bugbot is set up for automated code reviews on this repo. Configure here.

@haasonsaas haasonsaas merged commit 3e7f694 into main Apr 21, 2026
5 checks passed
@haasonsaas haasonsaas deleted the codex/evalops-memory-recall-context branch April 21, 2026 10:59
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.

Reviewed by Cursor Bugbot for commit 3ce291e. Configure here.

label: item.label
})
}
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sequential memory recall calls add unnecessary chat latency

Medium Severity

The for loop in buildEvalOpsMemoryRecallBlock makes up to three independent recallEvalOpsMemory HTTP requests sequentially, one per enabled category. Since buildConversation is awaited before runExecutionLoop starts streaming, this serialization directly delays the first token the user sees. Using Promise.allSettled would reduce total latency from the sum of all call durations to the duration of the slowest single call, and would also preserve partial results when one category fails instead of discarding all memories.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 3ce291e. Configure here.

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.

memory: opt-in sync of chat threads, meeting summaries, journal to platform

1 participant