Repository navigation
Keep delegation pipeline-entries sibling-only - #330
Merged
Merged
Conversation
The orchestrator snapshot used list_entries with conversation_id set, but that filter ORs in NULL-scoped rows. HTTP /v1/memory and CLI /mem add residue was injected as sibling output. Opt the probe into exact conversation_id = ?; leave the default OR-NULL fallback for agent /mem browse. Co-authored-by: Tyler Reckart <tylerreckart@users.noreply.github.com>
This was referenced Sep 12, 2026
tylerreckart
marked this pull request as ready for review
September 21, 2026 13:23
…exact-conversation # Conflicts: # CHANGELOG.md
tylerreckart
enabled auto-merge (squash)
September 21, 2026 13:23
Keep both Unreleased changelog entries. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
Author
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_eab4fa72-4096-429b-8a48-3aef61402808) |
Keep both Unreleased changelog entries. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep both Unreleased changelog entries. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep both Unreleased changelog entries. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Problem
The orchestrator seeds sub-agents with a
pipeline-entriessnapshot so they can see what siblings just wrote via/mem add. The handler setsEntryFilter.conversation_idand comments that this must stay conversation-scoped (it already returns empty when there is no conversation, rather than dumping tenant-wide history).list_entriesstill applies an OR-NULL fallback:conversation_id = ? OR conversation_id IS NULL. That is correct for agent/membrowse and HTTP list (pre-migration / unscoped rows stay visible). It is wrong for this probe.HTTP
POST /v1/memoryand CLI/mem addwith no conversation writeconversation_idNULL. Those rows then appear in the sibling snapshot and are paraphrased as fresh pipeline output. Post-filtering afterLIMIT 15is not a fix: a flood of unscoped rows can hide the actual sibling entries.Fix
Add
EntryFilter.exact_conversation. When set, both the browse and FTS paths useconversation_id = ?only.pipeline-entriesopts in. Default list behavior is unchanged.Tests
unit_memory_entries— exact filter excludes unscoped and other-conversation rows;LIMITover a flood of unscoped rows still returns the sibling; FTS path uses the same predicate.Independently mergeable against
main. TouchesEntryFilter/list_entriesSQL (different hunks from #322'slist_conversationscursor) plusapi_server.cpppipeline-entries and CHANGELOG[Unreleased]. Rebase CHANGELOG after whichever sibling merges first.Note
Low Risk
Scoped SQL filter change behind an opt-in flag on one orchestration probe; default memory list/search semantics are unchanged.
Overview
Fixes delegation
pipeline-entriescontext bleeding unscoped memory into sub-agent snapshots.Adds
EntryFilter.exact_conversation. When set with a positiveconversation_id,list_entries(browse and FTS) usesconversation_id = ?only instead of the usual OR-NULL fallback that keeps HTTP/v1/memoryand CLI/mem addrows visible everywhere. The orchestratorpipeline-entriesprobe opts in so siblings only see conversation-pinned/mem addoutput; default/membrowse and HTTP list behavior is unchanged.Tests cover exclusion of unscoped/other-conversation rows,
LIMITunder unscoped floods, and the FTS path.Reviewed by Cursor Bugbot for commit 50d4e51. Bugbot is set up for automated code reviews on this repo. Configure here.