Skip to content

design: memory deletion policy — trust, safety, and integrity concerns #91

@GoZumie

Description

@GoZumie

Background

PR #89 implements a wagl forget <id> command that permanently deletes a memory item from the local DB. Before this can ship, we need a clear policy on whether and how memory deletion should work in wagl.

Core Concerns

1. External manipulation risk

A deletion command that can be triggered via CLI or API call creates an attack surface: a compromised pipeline, a malicious prompt, or an unauthorized caller could erase an agent's memory without its knowledge or consent. This is qualitatively different from a write — deletion is irreversible and leaves no trace by default.

2. Audit trail gap

If a memory is deleted, there is currently no record that it existed. This makes it impossible to detect tampering, investigate anomalies, or restore lost context. A trustworthy memory system needs to know what was removed, when, and by whom.

3. Trust model implications

An agent whose memory can be silently altered by external actors is not a trustworthy agent. Memory integrity is a prerequisite for reliable agent behavior over time.

Proposed Design Direction

Rather than hard deletion, consider:

  • Soft delete / archive: mark a memory as archived or superseded with a timestamp and reason. It stops surfacing in recall but the record is preserved.
  • Correction with provenance: when a memory is wrong, store a correction that references the original — never erase the original.
  • Append-only audit log: any mutation (archive, correct, re-weight) is logged and the log itself is protected from deletion.
  • Protected memory classes: canon and high d_score memories require explicit elevated authorization to modify.

Open Questions

  • Is there any legitimate use case that requires true deletion (e.g., GDPR compliance, accidental PII storage)?
  • If so, what authorization model should gate it?
  • Should deletion be a separate, separately-gated operation from normal CLI use?

Status

PR #89 is marked [DO NOT MERGE] pending resolution of this design question.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions