# Recall

> A fully local Claude Code plugin that keeps a persistent session memory log and generates offline summaries using TF-IDF + TextRank — no API key, no network calls, no token cost.

Recall is an open-source Claude Code plugin built by Raiyan Yahya that solves the cold-start problem: Claude Code begins every session without memory of prior work, forcing developers to re-explain context each time. Recall captures session activity locally, then condenses it into a compact resume-ready summary using a classical Python summarizer — entirely on the developer's machine, with no network calls and no external model involved. The project is licensed under MIT and available on GitHub with 386 stars as of its latest update.

## What It Is

Recall is a Claude Code plugin that provides durable, offline project memory. It hooks into Claude Code's session lifecycle to append activity to a local `history.md` log, then uses a vendored TF-IDF + TextRank extractive summarizer to produce a compact `context.md` that can be loaded at the start of the next session. The entire pipeline — capture, summarization, and resume — runs locally with zero runtime dependencies beyond the Python standard library (numpy is an optional accelerator).

## How the Session Lifecycle Works

Recall integrates at three moments in the Claude Code session:

- **During the session**: `Stop` and `SessionEnd` hooks append new activity (prompts, replies, files touched, commands run) to `.recall/history.md` incrementally.
- **At session start**: The `SessionStart` hook surfaces `context.md` and asks whether to resume from saved context and whether to keep logging.
- **Before wrapping up**: The developer runs `/recall:save`, which triggers the local summarizer to read `history.md` and overwrite `context.md`. An `auto_save_context: "on_end"` config option can automate this step.

The three slash commands are `/recall:save`, `/recall:show`, and `/recall:log`.

## The Local Summarizer

The summarizer in `scripts/summarizer.py` uses classical extractive NLP — no LLM call at any point:

1. TF-IDF sentence vectors are computed from the session history.
2. A cosine-similarity graph is built between sentences.
3. TextRank (PageRank power iteration) scores each sentence.
4. The top N sentences are kept in original order.

The implementation is fully vendored and stdlib-only. If numpy is importable it accelerates the math; if not, an identical pure-Python path runs instead. The project's CI verifies both paths produce the same output across Python 3.9–3.13.

## Privacy and Security Architecture

Because session transcripts can contain code, file paths, and secrets, Recall's design makes explicit privacy guarantees:

- **No network calls**: Zero references to API keys, HTTP, or `ANTHROPIC_*` anywhere in the plugin.
- **Best-effort redaction**: A pass strips common secret shapes (API keys, tokens, `.env` assignments, PEM keys) before writing files.
- **Hardened git**: `git diff`/`log` run with fsmonitor, external diff, hooks, and pager disabled to prevent untrusted repo configs from executing code.
- **Confined writes**: `output_dir` is forced to stay inside the project; configs cannot redirect writes to absolute paths or parent directories.
- **Scoped transcript reads**: Recall only reads the transcript for the current project matched by working directory.

The project notes that if `.recall/` is committed as shared team memory, `context.md` should be treated as untrusted input at session start, since a bad actor with repo write access could attempt prompt injection.

## Update: Recall v0.3.5

The latest release is v0.3.5, published on 2026-06-22. The repository was created on 2026-06-19 and last pushed on 2026-06-22, indicating rapid early development. CI runs lint (ruff), Bandit static analysis, CodeQL, secret scanning, manifest validation, and the full test suite across Python 3.9–3.13 with and without numpy on every push and pull request. The benchmark harness (`benchmarks/bench.py`) gates summarizer quality invariants in CI, ensuring both the numpy-accelerated and pure-Python TextRank paths select identical sentences.

## Features
- Fully local session memory — no network calls, no API key
- TF-IDF + TextRank extractive summarizer (stdlib-only, numpy optional)
- SessionStart hook surfaces context.md and prompts resume
- Stop/SessionEnd hooks append activity to history.md incrementally
- /recall:save, /recall:show, /recall:log slash commands
- Best-effort secret redaction before writing markdown files
- Configurable via recall.config.json (output dir, sentence count, redaction, git, etc.)
- auto_save_context option to regenerate context.md on session end
- Hardened git integration (fsmonitor, hooks, pager disabled)
- Confined writes — output_dir cannot escape project root
- Works offline, zero pip install required
- CI-tested across Python 3.9–3.13 with and without numpy

## Integrations
Claude Code, Git

## Platforms
API, CLI

## Pricing
Open Source

## Version
v0.3.5

## Links
- Website: https://recallplugin.dev
- Documentation: https://github.com/raiyanyahya/recall
- Repository: https://github.com/raiyanyahya/recall
- EveryDev.ai: https://www.everydev.ai/tools/recall-claude-code-memory
