remember

A project-memory command that reviews session notes and recurring problems, then combines the useful lessons in a local MEMORY.md file and adds them to AGENT.md.

In plain words
What is it for?
Use it to review session stashes, identify recurring friction, update project memory, and check whether the documentation remains consistent.
Why use it?
It reduces the need to rediscover the same project-specific lessons in later coding sessions. It also avoids promoting one-off problems into permanent guidance.

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/hamr0/liteagents/remember
Clone the repo
git clone --depth 1 https://github.com/hamr0/liteagents
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 9,069 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.00012 $0.09069
Opus 5 $0.00006 $0.04535
Sonnet 5 $0.00002 $0.01814
Haiku 4.5 $0.00001 $0.00907

Measured yesterday against content hash d5c44176d8ba, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

remember 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 yesterday.

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.

packages/ampcode/commands/remember.md · 520 lines

How it starts

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

Run friction analysis, then consolidate session stashes + friction antigens into a single project-local MEMORY.md, and inject into AGENT.md. Friction runs automatically (best-effort) — there is no separate /friction command. A docs reconcile check runs at the end, detect-only.

Guardrails

  • Favor straightforward, minimal implementations first and add complexity only when requested or clearly required.
  • Keep changes tightly scoped to the requested outcome.
  • Precision over recall for hot memory. A false antigen loaded into @MEMORY.md steers every future session. When unsure, do not promote — leave it to recurrence (a ledger observing entry at 2 sessions, nothing at 1).
  • Mid-tier model, not hardcoded. Steps 2/3/4a delegate to a mid-tier model — capable of semantic judgment, cheaper/faster than your top reasoning tier (e.g. Claude's Sonnet vs Opus). Use whatever your tool designates as that balanced default; never hardcode a vendor-specific model name.
  • Batch stashes, don't fan out. Step 2 gives each extraction agent up to 5 stashes and uses as few agents as possible (3 stashes → 1 agent, 7 → 2). One agent reading several sessions sees the same lesson recur and writes it once; one agent per stash writes it once per stash and leaves the merge to catch the duplicates. If more than one agent is needed, run them concurrently.
  • Hot memory is short snippets, not prose. A fact is one line, target 160 characters, hard stop 180, stating a rule the agent should follow next time. Events, history, and narrative are not facts.

What it does

Reads all raw material (.amp/stash/*.md + .amp/remember/friction/antigen_clusters.json), extracts durable facts, episodes, and behavioral antigens into a single .amp/remember/MEMORY.md, then injects a managed memory section into AGENT.md.

Steps

  1. Run friction first (best-effort — friction analyzes ALL your usage, not just this repo)

    Friction's signal is global: recurring corrections and frustrations across every project are behavioral lessons worth keeping everywhere. So point it at the tool's global sessions root (all projects), not a per-project directory.

    • Locate friction.cjs — it is bundled next to this command at remember/friction.cjs (the same directory as remember.md, whether installed or run from the package). If it exists nowhere, skip to step 1 (stash-only) and tell the user friction.cjs is missing.
    • Resolve the global sessions root — probe this list top-to-bottom, use the first that exists and contains .jsonl files directly, or one level down in per-project subdirectories (friction.cjs scans exactly those two levels, not a deep recursive walk). Never prompt the user.
      # ── Add your own global sessions root at the TOP so it is checked first ──
      ~/.claude/projects/                 # Claude Code
      ~/.factory/projects/                # Droid / Factory
      ~/.config/amp/projects/             # Amp
      ~/.config/opencode/projects/        # opencode
      ~/.codex/sessions/                  # Codex CLI  (use $CODEX_HOME/sessions/ if set)
      ~/.gemini/antigravity-cli/brain/    # Antigravity
      

      Note: friction.cjs parses Claude Code's session schema. The Codex/Antigravity roots will resolve but yield no signals until friction learns their formats — open an issue to request one: https://github.com/hamr0/liteagents/issues

    • Run node <friction.cjs> "<resolved-root>". friction writes its output to .amp/remember/friction/ in the current project.
    • On any miss — loud, never silent. If no root resolves, or friction errors, or it finds no usable sessions, print this and continue with stash-only consolidation:

      ⚠️ Friction didn't run — no sessions found. To enable it, open this command file (remember.md) and add your tool's global sessions root to the TOP of the probe list in step 0, then re-run /remember. Consolidating stashes only this time.

Read the full file on GitHub · 520 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. yesterday First seen · 520 lines · 12 tokens per session scan A d5c44176d8ba

Subscribe to this mod's changes

remember is a command published in the GitHub repository hamr0/liteagents (22 stars, last pushed 2d ago), licensed Apache-2.0. It adds 12 tokens to every session and 9,069 once invoked, about $0.0001 per session on Opus 5. 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-30.