Skip to content

MOD-17269 Document Agent Memory sensitive-data exclusions - #3760

Open
plamilieva wants to merge 3 commits into
mainfrom
claude/mod-17269-pii-exclusion-docs
Open

MOD-17269 Document Agent Memory sensitive-data exclusions#3760
plamilieva wants to merge 3 commits into
mainfrom
claude/mod-17269-pii-exclusion-docs

Conversation

@plamilieva

@plamilieva plamilieva commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Ticket: MOD-17269 (epic: MOD-17267)

Important

Do not merge until isAgentMemorySensitiveDataExclusionsEnabled is on in production. The Cloud UI card is flag-gated and ships dark (cloud-ui#2952), so merging early would publish docs for a section customers cannot see.

What this adds

A Sensitive-data exclusions section on both Redis Cloud Agent Memory console pages, placed to mirror where the card actually sits in the UI (last in the create flow, before Actions on the Configuration tab).

  • create-service.md — the semantic exclusions toggle and exclusion prompt (2,000 char limit, required when enabled), an advisory warning, an example prompt, which memory paths exclusions do and do not apply to, and the prompt validation rules.
  • view-service.md — the read-only/editable settings, that disabling preserves the saved prompt, the advisory caveat repeated where the setting is edited, and that existing memories are not re-evaluated (with flush named as the only, all-or-nothing cleanup).
  • Two screenshots.

Scope

Phase 1 is semantic (prompt-based) exclusions only. The authored prompt is injected at system-message priority into the three LLM-mediated promotion paths — INSTRUCT promotion, custom extraction, and the session summary view — so the docs state plainly that exclusions are advisory, that direct long-term writes and raw session events are untouched, and that content still reaches the model provider.

Automatic summarization is not one of those paths, and the docs now say so: buildSummaryViewMessages injects the exclusion section only on the session_summary_view path, and docs/tdd/sensitive-data-exclusions.md lists session summarisation as an explicit non-goal (session-scoped and TTL'd — this is long-term memory only).

Not covered, because unmerged and not publicly exposed: on-prem YAML authoring (MOD-17150), the preview playground (MOD-17161 / MOD-17162), and longTermMemoryExclusions in either public OpenAPI spec.

The rejected-phrasing table

#### Exclusion prompt rules includes a short table of phrasings that get refused. This is deliberate: the injection guard rejects ordinary customer prose, and the UI error does not explain why.

The guard matches phrases, not individual words, so the docs describe phrasings rather than telling customers to avoid vocabulary. system: and system= reject anywhere in the prompt; forget everything, ignore all instructions, override system, and run scripts reject as phrases, while bare forget, ignore, pretend, and simulate all pass.

All ten strings in that table were verified against the live patterns in memory-common/domain/valueobjects/prompt.go — the five "Rejected" strings reject, the five "Use instead" strings pass.

Verification

.claude/hooks/check_shortcode_paths.py --scan <both pages> reports 0 issues, 0 broken file refs, 0 broken relrefs. Note that --scan needs explicit paths or --all; bare --scan scans 0 files. Every in-page anchor referenced (#custom-memory-types, #automatic-summarization, #flush-memory-entries, #sensitive-data-exclusions) has a matching heading.

Every documented example was checked against the guard by transcribing all 25 patterns from prompt.go and asserting the documented behavior: the five Rejected rows reject, the five "Use instead" rows pass, four bare-word prompts pass, and the prompt shown in the screenshot both passes and fits the 2,000-character limit — 15/15. The transcription was diffed against the Go source (25/25 identical). The checker was left out of the repo deliberately: committing it would couple these docs to iris's internal regexes across repos.

Screenshots were checked against the shipped UI: light theme, section-cropped to match agent-memory-memory-types.png, generic service name, synthetic prompt text, no customer data.

Rework — 747bbce

Review against the shipped implementation found two factual errors and two omissions, all fixed in 747bbce53:

  • Covered paths — automatic summarization was listed as covered. It is not (see Scope). The covered list now names the session_summary_view recap, and automatic summarization moved to the "do not apply" list so its absence cannot be read as coverage.
  • Prompt rules — the page told customers to avoid the bare words forget, ignore, pretend, and simulate; all four pass on their own. Replaced with the actual blocked phrasings, plus system=, plus two rows for traps ordinary prompts hit (override\s+(system|instructions?), run\s+(?:code|command|script)).
  • Flush — "to remove memories stored before you configured exclusions, flush the service" did not say flush erases all memory data permanently. It does now, and states there is no targeted removal.
  • Advisory caveat — existed only on the create page; now also on the view page, where the setting is actually edited.

No regression test was added: the only meaningful test would pin iris's internal injection regexes from this repo.

🤖 Generated with Claude Code


Note

Low Risk
Documentation-only changes with no runtime or API behavior; main risk is publishing before the feature flag is enabled in production (noted in the PR).

Overview
Documents the Redis Cloud Sensitive-data exclusions console feature on the Agent Memory create and view guides, aligned with the UI section order.

create-service.md adds a full section on semantic exclusions (toggle, 2,000-character exclusion prompt, advisory warning), where exclusions apply vs. do not (built-in/custom extraction vs. direct API writes, session events, automatic summarization), generalized-memory behavior, and exclusion-prompt validation with a rejected-vs.-acceptable phrasing table. view-service.md adds the Configuration-tab section with editable settings, prompt retention when disabled, and that only future extractions are affected (flush required to clear existing long-term data).

Two new screenshots are referenced for create and view flows.

Reviewed by Cursor Bugbot for commit 747bbce. Bugbot is set up for automated code reviews on this repo. Configure here.

Add a Sensitive-data exclusions section to the Redis Cloud Agent Memory create
and view pages, covering the semantic exclusions toggle and exclusion prompt,
the advisory limits, which memory paths exclusions apply to, and the prompt
validation rules.

Phase 1 ships semantic (prompt-based) exclusions only. The authored prompt is
injected at system-message priority into the three LLM-mediated promotion paths
(INSTRUCT promotion, custom extraction, session summarisation), so the docs say
plainly that direct long-term writes and raw session events are untouched, and
that the policy is advisory rather than a guarantee.

The rejected-phrasing table exists because the injection guard refuses ordinary
prose — a bare occurrence of the word "system" followed by a colon matches the
instruction-override rule, as do "forget everything" and "ignore all
instructions". All six strings in that table were verified against the patterns
in iris memory-common/domain/valueobjects/prompt.go.

Learned: The exclusion-prompt injection guard rejects innocuous customer prose, which the UI error message does not explain.
Constraint: Publish only once isAgentMemorySensitiveDataExclusionsEnabled is enabled in production; the UI card is flag-gated and ships dark.
Gaps: On-prem YAML authoring (MOD-17150) and the exclusions preview playground (MOD-17161, MOD-17162) are unmerged and undocumented; neither public OpenAPI spec exposes longTermMemoryExclusions yet.
Ticket: MOD-17269
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

🧠 Redis Memory

Found 5 related items from repository history:

Memory updated at 8ad19bb

@dwdougherty dwdougherty added the rc Redis Cloud docs label Aug 6, 2026
Drop the example exclusion prompt's code block and the prompt-assembly detail
from the section intro.

The fenced block was the only code block in the file, and the closest analogue —
the Extraction prompt field for custom memory types, another free-text
natural-language setting — carries no example at all. It was also redundant once
the rejected-phrasing table landed, since that table already shows six concrete
prompt strings. The example survives as prose, matching how Automatic
summarization presents its worked example.

The intro previously described how the authored text reaches the model, which is
prompt plumbing a customer cannot act on, and said "promoting" — vocabulary used
nowhere else in this page, where every other reference is to the extraction
pipeline. The warning below already establishes that exclusions only steer the
model, so the causality survives the trim.

Directive: Keep "extraction pipeline" in this page's prose; "extraction model" is reserved for quoting the UI's own wording, which is visible in the screenshots.
Ticket: MOD-17269
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

🧠 Redis Memory

Found 5 related items from repository history:

Memory updated at e723770

Review of the exclusions docs against the shipped implementation in iris
(origin/main) turned up two factual errors and two omissions.

"Where exclusions apply" listed automatic summarization as a covered path.
It is not: buildSummaryViewMessages injects the exclusion section only on
the session_summary_view path, and its doc comment states that
summarisation keeps using the unmodified prompt builder. The TDD lists
session summarisation as an explicit non-goal. Name the summary-view
memory type in the covered list instead, and add automatic summarization
to the "do not apply" list so the omission cannot be read as coverage.

The prompt rules told customers to avoid the bare words forget, ignore,
pretend, and simulate. The injection guard matches phrases, not words —
forget\s+(everything|all|previous), ignore\s+(previous|all|above)\s+
instructions?, pretend\s+(?:you\s+are|to\s+be), simulate\s+(?:a|being) —
so all four words pass on their own. Describe the blocked phrasings
instead, note that system= rejects as well as system:, and add rows for
two traps an ordinary prompt hits: override\s+(system|instructions?) and
run\s+(?:code|command|script).

On the view page, state that flushing is the only way to clear
previously stored memories and that it erases all of them, and repeat the
advisory caveat where the setting is actually edited.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

🧠 Redis Memory

Found 5 related items from repository history:

Memory updated at 747bbce

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rc Redis Cloud docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants