Changelog
All notable changes to mememory are documented here.
v0.6.0 — 2026-04-27
Pinned delivery + forced recall
- New
pinneddelivery type. Reinjects on every agent turn through theUserPromptSubmithook, wrapped in a<system-reminder>block with rotated framing. Where bootstrap loads once at session start and drifts up the context, pinned reasserts itself every turn so hard rules don't decay into background. See Pinned Rules & Forced Recall. - System meta-rules layer is hard-coded in mememory and prepended to every pinned payload — directives about working with the memory layer itself (recall mandate, code-vs-memory truth source, "rule violation = task failure"). Five formulations of each meta-rule rotate per render, plus rotated opening/closing imperatives, to defend against agent adaptation to a single phrasing.
- Forced recall via PreToolUse hook. A new lock file (
${TMPDIR}/mememory-recall-pending-${session_id}) is armed at SessionStart and removed by PostToolUse onmcp__mememory__recall. While the lock exists,mememory recall-gatedenies any tool call that isn't anmcp__mememory__*tool — the agent physically cannot work on the user's task without first loading project context via recall. Stale locks (older than 24h) are garbage-collected at the next SessionStart. - One-shot installer:
mememory install-hookspatches~/.claude/settings.jsonwith all four hooks (SessionStart, UserPromptSubmit, PreToolUse, PostToolUse). Idempotent, preserves existing settings and foreign hooks, and writes a timestamped backup before any change.--uninstallremoves them cleanly. - CLI: new commands
pinned,recall-gate,recall-ack,install-hooks.mememory setupnow interactively offers to install the hooks at the end of its run. - MCP resources:
mememory://pinnedandmememory://pinned/{project}. - Soft budget warning at 5,000 tokens for the pinned payload — informational, never blocks. Pinned must stay tight to act as a checklist; the warning surfaces when the payload is starting to dilute that effect.
Admin UI
- Pinned Preview page at
/pinnedrenders the exact payload your agent receives for any project, with token estimates and counts of pinned memories at each scope. - Delivery filter on the Memories page now includes
pinned. The New Memory form lets you create pinned entries directly. - Persona scope cleanup. The legacy
personascope (removed from the backend long ago) is no longer surfaced anywhere in the admin UI — filter, form, badges, settings, search filter, and the leftover CSS token are all gone.
Notes
- Codex CLI install-hooks parity is scheduled for the next release. Codex users can still wire
SessionStart → mememory bootstrap --hookmanually using the existing instructions; full pinned + forced-recall integration follows in 0.7.0. - Backward compatibility. No SQL migration. The
deliverycolumn isTEXT, so adding a new value is a Go-only change. Existing bootstrap and on_demand memories are untouched.
Unreleased
Refactor: pluggable connection
- Renamed
internal/memorypackage tointernal/engineto better separate domain logic from the "memory" concept. - Removed hardcoded
defaultDatabaseURLconstants from server binaries.DATABASE_URLis now required; missing value causes fail-fast with a clear hint. - Added pgvector preflight check in
pg.NewClient— server fails fast with installation hint if the extension is missing. - Renamed
MEMEMORY_DATA_DIRenv var toDATA_DIR. - Added OS-aware default
DATA_DIRresolver in themememoryCLI:~/.local/share/mememory(Linux/XDG),~/Library/Application Support/mememory(macOS),%LOCALAPPDATA%\mememory(Windows). - New
mememory setupcommand: resolves DATA_DIR, writes.env, brings up bundled Docker stack. - New
mememory uninstallcommand: stops containers but preserves data by default.--purgeflag requires interactive path confirmation to delete data. - PostgreSQL password default changed from
memorytomememory.
Added
bootstrapmemory type: only memories of this type are loaded automatically at session start. All other types are fetched on demand viarecall.- Bootstrap System section: hard-coded directives at the top of every bootstrap output — "use
mememoryas the only persistent memory source" and "always callrecallon the user's first message". - Bootstrap size limit: output is capped at 10KB (
MaxBootstrapBytes).mememory bootstrapprints a stderr warning when the limit is exceeded, andremember(type="bootstrap", ...)warns when the combined set would exceed it.
Changed
- Two scopes only: removed the
personascope. Scopes are nowglobalandproject. The--personaCLI flag,personacolumn in filters,by_personastats field, andScopePersonaconstant are gone. - Updated scope weights in recall scoring:
project=1.0,global=0.8(previouslypersona=1.0,project=0.8,global=0.6). - Bootstrap loads only
type=bootstrap:mememory bootstrap,memory-server --bootstrap, and thememory://bootstrap/memory://bootstrap/{project}MCP resources now filter bytype=bootstrapinstead of returning all memories in scope. - MCP config path: Claude Code configuration moved from
~/.claude/.claude.jsonto~/.claude/.mcp.json(or project-level.mcp.json). The server name is nowmememory(wasmemory). - MCP server instructions advertise two scopes (
global,project) and six types (fact,rule,decision,feedback,context,bootstrap).
Renamed
- Renamed binaries:
memory-server→mememory-server,memory-admin→mememory-admin. - MCP resource URI scheme renamed from
memory://tomememory://. The bootstrap resources are nowmememory://bootstrapandmememory://bootstrap/{project}. - Environment variable
MEMORY_DATA_DIRrenamed (later superseded byDATA_DIR— see "Refactor: pluggable connection" above).
Breaking
- PostgreSQL database and user renamed from
memorytomememory. Existing installations must reset the postgres data directory (stop the stack, move$DATA_DIR/postgresaside, thenmememory setup) — the oldmemorydatabase will not be migrated automatically.
Features
- MCP server with 7 tools:
remember,recall,forget,update,list,stats,help - MCP resources:
memory://bootstrapandmemory://bootstrap/{project}for session initialization - Hierarchical scopes:
globalandproject, with project automatically inheriting global during recall - 6 memory types: fact, rule, decision, feedback, context, bootstrap
- Semantic search via PostgreSQL pgvector with cosine similarity and HNSW indexing
- Composite scoring: similarity x scope_weight x memory_weight x temporal_decay
- Contradiction detection: warns when new memories are >75% similar to existing ones
- Belief evolution:
supersedesparameter for clean knowledge chains with auto-downgrade - TTL support: auto-expiring memories with hourly cleanup
- Pluggable embedding providers: Ollama (local, default) and OpenAI (+ any OpenAI-compatible API)
- Dynamic embedding dimensions: auto-detected at startup, validated against database
- Admin API: full REST API for CRUD, search, bulk delete, export/import
- Admin web UI: React SPA for browsing and managing memories
- mememory CLI: native Go binary with
bootstrap,status,versioncommands - Session bootstrap: Markdown-formatted output of
bootstrap-type memories for SessionStart hooks, capped at 10KB - Auto-detect project: CLI detects project name from git repository root
- Docker stack: PostgreSQL (pgvector) + Ollama + Admin in a single
docker compose up - Privacy first: all data stays local, no external telemetry