claude-recall
Automatic, cheap, precise query of your Claude Code session archive — wired into the prompt flow via hooks so you never have to remember to search.
Status: beta
claude-recall is in daily production use against a 26,000+ message session archive across 21 projects. The API and hook contract are stable through v0.6.0. Known issues are tracked in GitHub (see Known Issues).
Install via PyPI:
pip install 'claude-recall[embeddings]'. Beta = rough edges get filed, triaged, and shipped quickly. Recent cadence: seventeen issues filed (fourteen closed) across April 21–26, with three same-day patch releases on April 25 alone (a Claude Code v2.1.118 hook-schema regression, an embeddings-coverage honesty fix, and a v0.6.0 architectural fix that stops routine indexing from wiping vectors). Full history in the changelog.Feedback welcome via GitHub issues. The tool handles single-user, single-machine session archives. Multi-user / shared-recall is explicitly out of scope for beta.
What's landed through v0.6.x: MVP + keyword extraction + auto project scoping + config-driven hook flags + stale-hook detection + opt-in semantic retrieval via Ollama + NativeAOT C# hook binary + init-hooks --force overwrite semantics + PyPI publish + honest embeddings-coverage reporting + content-hash-aware indexer (vectors no longer cascade-wipe on routine re-ingest). See the original plan, feature plans, and the changelog for the full history.
What it does
Claude Code writes every session to ~/.claude/projects/<project-slug>/<session-id>.jsonl — raw turn-by-turn log. That archive is already a goldmine; the problem is that after context compaction, Claude loses mid-session detail, and no native Claude Code feature surfaces prior-session context back into the active conversation. Manual grep works but rarely happens.
claude-recall closes that gap:
- Indexes the
.jsonlarchive into a local SQLite database with FTS5 full-text search. Incremental, read-only against the archive. - Queries via CLI — ranked matches with snippets, sub-millisecond FTS5 lookup over hundreds of thousands of messages.
- Injects relevant prior-session context into the active Claude Code session automatically via
SessionStartandUserPromptSubmithooks. You don't have to remember to look.
Install
pip install 'claude-recall[embeddings]'
claude-recall init-hooks
claude-recall index
Pip picks the right wheel for your platform:
- Windows x64 gets the NativeAOT hook binary bundled automatically (fast-path hook)
- macOS / Linux get the pure-Python shell-hook fallback
To turn on semantic rerank (optional but recommended):
ollama pull nomic-embed-text
# Edit ~/.config/claude-recall/config.toml (or %APPDATA%\claude-recall\config.toml):
# [embeddings]
# enabled = true
claude-recall embed --probe # sanity-check Ollama path
claude-recall embed --verbose # one-time corpus embed
The init-hooks output also points at the section of the INTEGRATION-GUIDE that walks through this.
Don't use
pip install git+https://...— that builds from source and the NativeAOT hook binary is CI-built package data, not part of the source tree. Agit+httpsinstall silently gives you the slower Python hook path on every platform.
Quickstart query
claude-recall search "regex patterns" --days 30 --limit 5
claude-recall search "something you roughly remember" --semantic # requires embeddings enabled
claude-recall show <session-id>
claude-recall status
Architecture
┌─────────────────────────────────────┐
│ ~/.claude/projects/<project>/*.jsonl│
│ (Claude Code's raw session archive) │
└────────────┬────────────────────────┘
│ read-only
▼
┌─────────────────────────────────────┐
│ claude-recall indexer │
│ walks jsonl, extracts message pairs │
└────────────┬────────────────────────┘
│ writes
▼
┌─────────────────────────────────────┐
│ SQLite DB with FTS5 virtual table │
│ ~/.config/claude-recall/index.db │
└────────────┬────────────────────────┘
│ queried by
▼
┌──────────────────┐ ┌─────────────────────┐
│ CLI (manual) │ │ Hooks (automatic) │
│ recall search │ │ SessionStart │
│ recall show │ │ UserPromptSubmit │
└──────────────────┘ └─────────┬───────────┘
│ additionalContext
▼
┌─────────────────┐
│ Claude Code │
│ active session │
└─────────────────┘
Hook latency expectations
Concrete numbers from dogfooding so you can calibrate. Latency scales with archive size:
| Archive size | Hook path | Typical latency |
|---|---|---|
| Small (<1k messages) | FTS5 only | ~15ms |
| Small (<1k messages) | Semantic rerank + warm Ollama | ~80ms |
| Large (~25k messages) | FTS5 only | ~100-200ms |
| Large (~25k messages) | Semantic rerank + warm Ollama | ~2-5s warm, ~10s cold-model |
The cold-model case is Ollama unloading nomic-embed-text between invocations (default keep_alive=5m). The first prompt after idle pays the model-load cost; subsequent prompts land on the warm model. If latency bothers you, tune [embeddings].request_timeout_seconds and consider keeping Ollama warm via another process.
If the semantic hook feels slow on your archive size, flip [embeddings].use_in_hook = false to run FTS5-only. You still get the --semantic flag for manual claude-recall search invocations where extra latency is acceptable.
Why this exists
Claude Code has excellent primitives — the .jsonl session archive, hooks with additionalContext injection, skills, auto-memory markdown files. It does not have native session-archive search as of April 2026. claude-recall fills that gap with a small, self-contained Python CLI plus two hook scripts, following the pattern established by Microsoft's auto-memory project for Copilot CLI — adapted for Claude Code's persistence model.
Known Issues
Live list of issues caught in beta use. Filing new issues is explicitly welcome — the beta is the feedback channel.
- Open issues: see github.com/LearnedGeek/claude-recall/issues for the current list.
- Recently closed (not a full changelog — see the CHANGELOG for that):
- #16 — Routine re-indexing was silently cascade-wiping embedding vectors via FK ON DELETE CASCADE; status reported
embeddings_ready: Truewhile search returned "no vectors in index" for the same DB. Fixed architecturally in v0.6.0 with content-hash-aware indexer + non-destructive schema migration that preserves existing vectors across the upgrade. - #15 — Claude Code v2.1.118's strict-validation pass rejected the legacy flat hook shape claude-recall had been generating since v0.4, silently disabling all of the host project's settings as a side effect. Fixed in v0.5.4 with the schema-correct nested shape and
shell: "powershell"for.ps1hooks on Windows. - #11, #12 — Hook-latency claim on PyPI was true on small fixtures but wrong at 25k-message scale; binary
--versionwas hardcoded constant rather than reading from the package. Both fixed in v0.5.2. - #8 —
embedbatches used to fail the whole 32-message batch when one input was oversized, silently dropping 27% of vectors. Fixed in v0.4.3 with per-input truncation, error-body surfacing, and per-message singleton fallback. Dogfooding validated 99.95% coverage on a 25k-message archive after the fix. - #4 —
init-hooks --forcemerged with existing settings.json instead of overwriting, producing duplicateUserPromptSubmitentries when upgrading from a manual wiring. Fixed in v0.4.2. - #3 —
init-hooks --forcecrashed on Windows native-binary wheels (missing shell-script sources in the wheel). Fixed in v0.4.1. - #2 — Hook didn't auto-scope to current project + hardcoded
--days 30ignored config. Fixed in v0.2.1. - #1 —
UserPromptSubmithook returned empty on natural-language prompts. Fixed via stdlib keyword extraction in v0.2.0.
- #16 — Routine re-indexing was silently cascade-wiping embedding vectors via FK ON DELETE CASCADE; status reported
Beta expectations: I find issues by using the tool. You may find different issues by using it differently. That's the point of a beta. File and describe — triage is fast.
Documentation
- PLAN.md — full implementation plan, specifications, acceptance criteria.
- ARCHITECTURE.md — deeper architectural design, rationale, alternatives considered.
- INTEGRATION-GUIDE.md — how to wire
claude-recallinto any Claude Code project. - EMBEDDINGS-PLAN.md — v0.3 semantic-retrieval feature plan.
- HOOK-BINARY-PLAN.md — v0.4 NativeAOT C# hook binary plan.
- CHANGELOG.md — full release history.
License
MIT. See LICENSE.
Author
Mark McArthey / Learned Geek
Metadata
Release files for claude-recall 0.11.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| claude_recall-0.11.2-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details for claude_recall-0.11.2-py3-none-win_amd64.whl |
| claude_recall-0.11.2-py3-none-any.whl | Python 3 | none | any | Details for claude_recall-0.11.2-py3-none-any.whl |
Total release size: 4.4 MB
Release files / claude_recall-0.11.2-py3-none-win_amd64.whl
| Download URL | claude_recall-0.11.2-py3-none-win_amd64.whl |
|---|---|
| Size | 4.4 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
05e101844b81ebd6e2559e42c27d4e038c0e670bb03d44f9d4bd04a8421745e9
|
|
BLAKE2b-256 checksum How to use checksums |
23245ed1e096e129ab6fe19feb95d7e93341ed861650c3dbe81adc417c6a0b67
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / claude_recall-0.11.2-py3-none-any.whl
| Download URL | claude_recall-0.11.2-py3-none-any.whl |
|---|---|
| Size | 93.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
61343df25e04ecc1c1d31e48084b16e0cacda2eccde0faf2af517c59d97a59fd
|
|
BLAKE2b-256 checksum How to use checksums |
fdb9a3c7be082cadb5a2b97d325d67cbb95ba2e501e65d3d7a1019c2c511778f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for claude-recall 0.11.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.