Skip to content

Agent memory that is written but never deleted

Partiallow severity · reads .ts .tsx .js .jsx .mjs .cjs .pyBeta

Memories are built from what people say, so they hold names, contacts, health and other personal details. Kept for good with no delete path, they can't be removed when a user asks or leaves (GDPR Art. 17). When Lintsure finds this, it marks it as Partial: it may be fine, depending on context only you can confirm.

What it looks like

A line Lintsure flags in its own test app:

// src/memory.py
memory.add(text, user_id=user_id)

How to fix it

Give users a way to see and delete what the agent remembers about them, and set how long memories are kept. Most memory libraries have a delete call per user: wire it to account deletion.

Through a coding agent, Lintsure suggests the change and waits. Nothing is edited until you approve it.

Controls it relates to

  • GDPRArt. 17Right to erasure
  • GDPRArt. 5(1)(e)Storage limitation

What the framework asks

GDPR Art. 17: Right to erasure

When someone asks, and no exception applies, delete their data everywhere you hold it, including backups on rotation and third-party tools.

Evidence a reviewer may ask for: The deletion path and where it reaches.

Summaries are our own reading of the public texts, not the official wording.

Check your code for this

Runs on your machine. Your code is never uploaded.

npx lintsure scan

Quickstart · Use it in Claude Code or Cursor

This rule is in Beta: its mapping to framework controls is our own reading of the public texts, not independently reviewed. Lintsure is a readiness tool, not an audit or legal advice. A finding, or the lack of one, doesn't make you compliant. Disclaimer

We improve these rules all the time. If you see a false alarm, a missed problem or anything that could work better, tell us in a review and we will use it to improve your experience.

Related rules

Did this rule flag something that's fine, or miss a real problem? Tell us on GitHub. Every report becomes a test case, so the same mistake can't come back.