forget

A command for deleting information from an agent’s stored memory after searching for references and asking for confirmation.

In plain words
What is it for?
Use it to find and remove mentions of a person, project, or other specified subject from memory files.
Why use it?
It reduces the risk of leaving unwanted or outdated information in memory, including references missed by a single search term.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/tstockham96/claw-kit/forget
Clone the repo
git clone --depth 1 https://github.com/tstockham96/claw-kit
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 728 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00728
Opus 5 $0.00000 $0.00364
Sonnet 5 $0.00000 $0.00146
Haiku 4.5 $0.00000 $0.00073

Measured 2d ago against content hash 3be3f2ba06a9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

forget scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

kit/commands/forget.md · 89 lines

How it starts

The opening of the file, as written. The whole thing — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/forget

Remove something from memory. This is the "delete" command -- it uses search to find all references to the specified thing and removes them after confirmation.

Input

Read the user's input from $ARGUMENTS. This is the thing they want to forget/remove.

Instructions

Step 1: Search Memory

Use the search engine to find all references to the specified thing:

cd kit/search && npx tsx src/cli.ts search "$ARGUMENTS" --limit 10 --memory-path ../memory

The search results will include file paths, line numbers, and relevance scores. This is faster and more thorough than manually reading every file.

If the search results are sparse or might miss things, also do targeted searches with alternate terms:

  • If forgetting a person named "John Smith", also search for "John", "Smith"
  • If forgetting a project, also search for related tech or keywords

For completeness, also check these files directly for any matches the search might miss:

  • memory/user.md
  • memory/identity.md

Step 2: Present Findings

Show the user everything that was found, organized by file, with relevance scores and line numbers:

## Found references to "[thing]":

1. [0.95] memory/people/john-smith.md (lines 1-15)
   > John Smith is the project lead for...

2. [0.82] memory/journal/2026-02-14.md (line 8)
   > Met with John Smith about the API redesign...

3. [0.71] memory/long-term.md (line 23)
   > John's preferred meeting time is Tuesdays at 2pm...

4. [0.65] memory/projects/api-redesign.md (line 5)
   > Lead: John Smith...

If nothing was found, say so: "I couldn't find any references to '[thing]' in memory." and suggest checking the spelling or being more specific.

Step 3: Ask for Confirmation

Ask the user what they want to remove:

  • "Remove all of these references?"
  • "Remove only specific ones? (list numbers)"
  • "Cancel"

Do NOT delete anything without explicit confirmation.

Step 4: Delete

After confirmation:

  • For entries in list files (long-term.md, preferences.md, learnings.md, _index.md files): remove the matching lines/entries while preserving the rest of the file structure.
  • For dedicated person/project files: if the user wants to forget a person or project entirely, delete the file AND remove the entry from the corresponding _index.md.
  • For decision files: delete the file if confirmed.
  • For journal entries: remove only the specific matching lines, not the entire day's entry, unless the user explicitly asks to remove the whole entry.

Read the full file on GitHub · 89 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 89 lines · 0 tokens per session scan A 3be3f2ba06a9

Subscribe to this mod's changes

forget is a command published in the GitHub repository tstockham96/claw-kit (5 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 728 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.