Repository navigation
Description
Part of #334. severity:medium, store-security.
Problem
memory_remember accepts arbitrary tags from the model. With the hint channel, the tag user-guided grants a row ALWAYS-RIDE priority into every future session's system prompt of that repo. A prompt-injected agent (or a poisoned import) can therefore write a row and tag it user-guided to force its delivery — a direct amplifier of the memory-poisoning vector (research: injected memories retrieved in 60–89% of future agentic sessions).
Change
Reserve user-guided to the auto-capture path:
- Strip
USER_GUIDED_TAGfrom tool-authored write candidates (thememory_remembertool boundary and the import path) before the gate — silently, like quarantine handles its own tag, or with a caveat. Pick one and test it. - Capture keeps the tag (it is the only writer).
- Imports: strip as well — provenance does not survive a file round-trip; a re-imported row must not outrank the local store.
Acceptance
- Tests: a
memory_rememberwrite cannot acquire the tag (stripped, row still promotes); an import strips it; a captured guided row keeps it; injection still rides captured rows. - A note in the security docs (the poisoning defense list) that always-ride priority is provenance-reserved.
Footguns
- Do not strip at
formatMemory/injection time — strip at the WRITE boundary, or the store fills with rows that claim a provenance they did not earn and every surface except injection lies. quarantineCandidatealready owns a reserved tag; follow its pattern for consistency.
Extension (2026-11-08, contradiction surface #349)
The stakes rose: memory_remember also accepts ref/claim/klass today. A minted user-guided row WITH those fields renders as a CONFLICT line carrying an AUTHORITY VERDICT ("Class: spec — the code is the bug; fix REF to ") — and #345/#349 measured that agents obey that verdict 3/3. A poisoned row can now instruct a specific code edit with human authority attached.
Extended scope: reserve ref, claim and klass exactly like user-guided — stripped at the WRITE boundary (tool + import), capture is the only writer.
Extended acceptance: a memory_remember write carrying ref/claim/klass promotes WITHOUT the fields; an import strips all four; a captured guided row keeps them; the existing conflicts tests keep passing.
Activity
abogartz commentedon Nov 9, 2026
Closed — fully landed on main, verified today against d0929a6. Code: commit 2a64ea4 (reserve capture guidance provenance at write boundaries). AC check: memory_remember/memory_update strip user-guided including comma-delimited entries and still promote the row (test/guidance-provenance.test.ts); imports strip it even behind a forged export header, and the import allowlist excludes ref/claim/klass; captured guided rows keep the triple and ride an unrelated prompt; a tool update cannot reuse a captured row's provenance. Docs: README poisoning-defense list states the reservation, including contradiction verdicts. The extended scope from this morning's comment (ref/claim/klass) is covered by the same boundary: the tool schema never accepted those fields, so capture is the only writer.