Skip to content

The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu

handoff/cursor: preserve Subagent flag when de-duplicating across stores

Cursor Agent4c3d61099b32
diff --git a/cli/beacon/internal/handoff/cursor.go b/cli/beacon/internal/handoff/cursor.go
index 9da91725..6fe5094a 100644
--- a/cli/beacon/internal/handoff/cursor.go
+++ b/cli/beacon/internal/handoff/cursor.go
@@ -75,6 +75,12 @@ func cursorPrefer(candidate, current Session) bool {
if cursorCLIChat(current) {
return false
}
+ if current.Subagent && !candidate.Subagent {
+ return false
+ }
+ if candidate.Subagent && !current.Subagent {
+ return true
+ }
return cursorCLIChat(candidate) || candidate.Store == string(cursorsession.SourceGlobalStorage)
}