From inside Claude Code:
/Recall:update
This is a check-only command — it prints the current vs. latest
version and the exact command to run. It never rebuilds mid-session
(that would corrupt hooks tied to the running mem binary).
From a shell:
cd /path/to/Recall
./update.sh --checkExit Claude Code first, then:
cd /path/to/Recall
./update.shupdate.sh performs the full lifecycle:
- Fetches the latest release tag from GitHub and compares to
package.json. Exits 0 if already current (unless--force). - Creates a timestamped backup of
settings.json,memory.db,CLAUDE.md, OpenCode/Pi configs, and.mcp.jsonat~/.claude/backups/recall/<TIMESTAMP>/. Records the gitPRE_SHAin the manifest. git fetch --tags && git pull --ff-only origin main(aborts on a dirty tree; resolve manually and re-run).bun install && bun run build.mem initapplies any pending SQLite migrations (PRAGMA user_version-driven, non-destructive).- Copies refreshed hooks, shared lib files, slash commands, and
FOR_CLAUDE.md.extract_prompt.mdgets a drift check — if you edited it, the new version lands atextract_prompt.md.newand your edits are preserved. - Forces re-registration of all four hooks (SessionExtract, TelosSync, SessionRecall, SessionPreCompact) — this permanently prevents the pre-0.7.1 bug class where a partial install could leave hooks missing.
- Verifies via
mem --versionandmem stats.
| Flag | Purpose |
|---|---|
--check |
Version check only; print recipe and exit |
--dry-run |
Narrate every step with [dry-run] markers, touch nothing |
--force |
Run even if already at latest (repair path) |
--no-migrate |
Skip mem init migration step |
--no-confirm |
Non-interactive |
--help |
Show usage |
If update.sh fails at any step, it writes a rollback recipe to
~/.claude/backups/recall/<TIMESTAMP>/ROLLBACK.txt with the exact
commands to revert:
git reset --hard <PRE_SHA>
bun install && bun run build
./install.sh restore <TIMESTAMP>
DB schema downgrades are not supported. If a migration applied to
your DB, reverting the repo alone does not revert the DB. Delete
~/.claude/memory.db and restore it from the backup dir if you need
to fully roll back.
If you prefer to run each step yourself (or update.sh is not
available on older installs):
cd /path/to/Recall
git pull
bun install
bun run build
bun link
mem initThen re-run ./install.sh to refresh hooks and slash commands — it's
idempotent.
Purely additive hardening — no schema changes, no user action required.
DISPLAY_NAME in src/version.ts was truncating the version to
major.minor (showing "Recall 0.7" for any 0.7.x install). With
meaningful patch cadence (0.7.11 → 0.7.2 → 0.7.21 → 0.7.22), the
truncation hid which patch was actually running and made triage
harder. mem --help and mem stats now show the full X.Y.Z.
recall_link_global (new in lib/install-lib.sh) runs bun link →
verifies that ~/.bun/bin/mem and mem-mcp exist, are symlinks,
and resolve to readable files → falls back to npm link on failure.
install.sh Step 4 and update.sh step_link_global both delegate
to it. Catches the silent-no-op case where bun link exits 0 without
refreshing the bin symlinks, which was the root cause of the "I ran
./update.sh and then mem wasn't executable" class of issue.
Purely additive — no schema changes.
v0.7.2's update.sh ran bun install && bun run build but never
touched the global symlinks in ~/.bun/bin/. If a prior bun unlink,
bun upgrade, or homedir prune had removed them, rebuild didn't
restore them — and the MCP server entry in settings.json (which
points at /Users/$USER/.bun/bin/mem-mcp) failed silently on the
next Claude Code / OpenCode / Pi restart. Especially insidious
because a long-running mem-mcp process holds the deleted inode
alive: the current session works, but the next restart drops the
inode and MCP breaks with no diagnostic.
v0.7.21 runs step_link_global between build and migrate. No user
action needed — next ./update.sh run self-heals.
Additive — no schema changes. Introduces the shipping uninstall.sh
and update.sh and the shared lib/install-lib.sh library.
install.sh was refactored (1078 → 225 lines) to source the shared
lib; external behavior is identical. See
architecture.md for the
lifecycle-script anatomy and
CHANGELOG.md
for the full release notes.
Hotfix — no user action required. initDb() now runs applyMigrations
before CREATE_INDEXES, which fixes install.sh crashing for
anyone upgrading from a 0.6.x database that still had
PRAGMA user_version = 7.
Adds an importance INTEGER (1-10) column to messages, decisions,
learnings, and loa_entries. Non-destructive — existing rows receive
the default value (5 for most tables, 8 for LoA with a floor of 5). Runs
automatically on mem init or ./install.sh.
v0.7.0 introduces a tiered session-start context (L0 identity + L1
importance-ranked). The L0 tier reads from ~/.claude/MEMORY/identity.md
— if you don't have one, that tier is empty and you're only getting half
the v2 design.
mem onboard # Interactive 7-question interview
mem benchmark run B # Confirm v2_l0_chars > 0 after onboardingv0.7.0 adds two hooks copied into ~/.claude/hooks/ by the installer:
| Hook | Type | Purpose |
|---|---|---|
SessionRecall.ts |
SessionStart | Injects L0 + L1 tiers at session start |
SessionPreCompact.ts |
PreCompact | Flushes in-flight messages before compaction |
If you update hooks manually, copy these alongside SessionExtract.ts and
BatchExtract.ts:
cp hooks/SessionRecall.ts ~/.claude/hooks/
cp hooks/SessionPreCompact.ts ~/.claude/hooks/| Command | Purpose |
|---|---|
mem onboard |
Interactive L0 identity interview |
mem importance backfill |
Backfill importance scores from confidence |
mem pin <table> <id> / mem unpin <table> <id> |
Manual importance control |
mem benchmark run/list/report |
Phase 2 benchmark harness |
RECALL_IDENTITY_PATH overrides the L0 identity file path. Honored by
both SessionRecall (read) and mem onboard (write).
Optional integer 1-10 parameter. Defaults to 5 (or 8 for LoA, with floor 5).
Migration 5→6 adds a confidence column (high/medium/low, DEFAULT 'medium') to both the decisions and learnings tables. This migration is non-destructive — existing rows receive the default value and no data is removed.
v0.6.0 introduces a hooks/lib/ directory containing shared utilities imported by SessionExtract.ts and BatchExtract.ts. If you update the hooks manually rather than via ./install.sh, you must copy this directory:
cp -r hooks/lib/ ~/.claude/hooks/lib/Without hooks/lib/, the hook scripts will fail to resolve imports at runtime.
| Command | Purpose |
|---|---|
mem decision list |
List decisions with status and confidence |
mem decision update <id> |
Update a decision's status (supersede/revert) |
mem prune |
Preview and remove stale records (dry-run by default; use --execute to commit) |
decision_update — update the status and/or confidence of a stored decision. Accepts id, status (active/superseded/reverted), and optional confidence (high/medium/low).
Recall uses SQLite's PRAGMA user_version for schema version tracking. When you run mem init or ./install.sh, the migration system:
- Reads the current
PRAGMA user_versionfrom your database - Compares it against the expected version in the codebase
- Applies any pending migrations sequentially
- Updates
PRAGMA user_versionto the new version
Migrations are non-destructive — they add tables and indexes, never drop existing data.
graph TD
A[git pull] --> B[./install.sh]
B --> C[bun install]
C --> D[bun run build]
D --> E[bun link]
E --> F[mem init]
F --> G{PRAGMA user_version}
G -->|Current < Expected| H[Apply Migrations]
G -->|Current = Expected| I[No Changes Needed]
H --> J[Update user_version]
J --> K[Done]
I --> K
style A fill:#3B82F6,color:#fff
style H fill:#F59E0B,color:#fff
style K fill:#10B981,color:#fff
The installer automatically backs up existing files before making any changes. Backups are stored at ~/.claude/backups/recall/.
./install.sh list # List available backups
./install.sh restore # Restore most recent backup
./install.sh restore 20260219 # Restore specific backupcp ~/.claude/memory.db ~/.claude/memory.db.backup| File | Description |
|---|---|
memory.db |
The SQLite database |
settings.json |
Claude Code configuration (MCP + hooks) |
CLAUDE.md |
Global Claude instructions |
~/.claude/MEMORY/ |
Memory files |