sticky-note-cli 2.6.5 → 2.6.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sticky-note-cli",
3
- "version": "2.6.5",
3
+ "version": "2.6.6",
4
4
  "description": "Human-to-human handoff for AI coding assistants. Git-backed shared memory for Claude Code and Copilot CLI.",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -442,7 +442,7 @@ function main() {
442
442
  const scored = [];
443
443
  for (const t of live) {
444
444
  // V2.5: Skip threads already injected this session by PreToolUse or session-start
445
- if (isThreadInjected(t.id)) continue;
445
+ if (isThreadInjected(t.id, sessionId)) continue;
446
446
 
447
447
  let s = scoreThread(t, recentlyModified, currentBranch, currentUser, keywords);
448
448
  if (resumeThreadId && t.id === resumeThreadId) {
@@ -169,7 +169,7 @@ function main() {
169
169
 
170
170
  // Filter out already-injected threads
171
171
  const newThreads = fileAttr.threads.filter(
172
- (t) => !isThreadInjected(t.thread ? t.thread.id : t.id)
172
+ (t) => !isThreadInjected(t.thread ? t.thread.id : t.id, sessionId)
173
173
  );
174
174
 
175
175
  if (newThreads.length === 0) {
@@ -569,8 +569,14 @@ function clearInjectedSet() {
569
569
  }
570
570
  }
571
571
 
572
- function isThreadInjected(threadId) {
572
+ function isThreadInjected(threadId, sessionId) {
573
573
  const data = loadInjectedSet();
574
+ // Only consider threads injected in the SAME session — the file is shared
575
+ // across concurrent sessions and stale entries from other sessions must
576
+ // not suppress injection.
577
+ if (sessionId && data.session_id && data.session_id !== sessionId) {
578
+ return false;
579
+ }
574
580
  return (data.thread_ids || []).includes(threadId);
575
581
  }
576
582