[Bug]: auto-recall with peer_scope=actor adds the same memories twice
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript, node.js
Research direction
Start with buildRecallBlockDetailed in examples/memory-plugin-shared/lib/recall-core.mjs and trace how the legacy peer result is combined with the actor result. Check the four plugin copies under examples/ for the same logic. Use the supplied repro.mjs steps to verify that the output contains one context block and each memory only once.
Written by the indexing model from the issue text.
Description
Issue Origin
Observed or reproduced in a real environment
Bug Description
With OPENVIKING_RECALL_PEER_SCOPE=actor, every prompt in Claude Code gets two <openviking-context> blocks instead of one. I looked at one prompt: 10 memories in each block, 7 of them the same.
It comes from buildRecallBlockDetailed in recall-core.mjs. When there is a legacy peer id it runs a second recallForPeer and just joins the two blocks. User-scope memories match both queries, so they show up twice. The same code is in all four plugin copies under examples/.
Not the same as #5433: that one is about other peers leaking into recall, this one is about the plugin repeating what both requests return.
Steps to Reproduce
Save as repro.mjs in the repo root and run node repro.mjs:
import { mkdtemp } from "node:fs/promises";
import { tmpdir } from "node:os";
import { join } from "node:path";
import { buildRecallBlock } from "./examples/memory-plugin-shared/lib/recall-core.mjs";
// Both peers return the same user-scope memory, as the server does for user memories.
const fetchJSON = async () => ({
ok: true,
result: {
rendered: '<memory uri="viking://user/default/memories/preferences/style.md">prefers short answers</memory>',
entries: [{ uri: "viking://user/default/memories/preferences/style.md" }],
stats: {},
},
});
const block = await buildRecallBlock(fetchJSON, { recallPeerScope: "actor" }, "hello", {
actorPeerId: "github.com-o-r",
legacyPeerId: "-Users-x-src-r",
legacyCachePath: join(await mkdtemp(join(tmpdir(), "ov-")), "context-face.json"),
});
console.log((block.match(/<openviking-context/g) || []).length, "blocks,",
(block.match(/style\.md/g) || []).length, "copies of style.md");
Expected Behavior
1 blocks, 1 copies of style.md: one block, each memory once.
Actual Behavior
2 blocks, 2 copies of style.md on main (c64e578). In real use it's about 1.4 KB of extra context on every prompt.
OpenViking Version
0.5.0 server, claude-code-memory-plugin 0.7.12; repro on main
Python Version
3.13.12 (the bug is in the Node plugin, Node v26.13.0)
Operating System
macOS
- Dominant language
- Python
- Stars
- 41.8k
- Forks
- 3.4k
- Avg merge
- 19h 29m
- Merged PRs (30d)
- 500
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from volcengine/OpenViking
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
volcengine/OpenViking#7210 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
volcengine/OpenViking#7205 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug]: Retrieval rerank fallback statistics stay zero after provider failurePossibly taken @97Three claimed this 8 days ago. Openbug kernel
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
volcengine/OpenViking#7014 ·
Maintainers usually reply within 1 day
-
[Bug]: memory.prefetch_search_topn is inert above 5 (call site omits limit), plus two docstrings state the wrong defaultsPossibly taken @peterzhang987723 claimed this 8 days ago. Openkernel
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
volcengine/OpenViking#6923 · 2 comments ·
Maintainers usually reply within 1 day
-
[Feature]: hermes-plugin — forward events_time_decay_protection on auto-recall (parity with #6390)Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
volcengine/OpenViking#6533 ·
Maintainers usually reply within 1 day
All issues in volcengine/OpenViking
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
databricks/databricks-sql-python#1034 ·
Maintainers usually reply within 1 day
-
premises-missing
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
WingedGuardian/GENesis-AGI#4432 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
huggingface/skills#301 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
intuitem/ciso-assistant-community#5275 ·
Maintainers usually reply within 1 day