claudemnesia
claude-in-claude — the cure for Claude's amnesia.
Claude Code's /compact summarizes a long conversation to save context — but that's
lossy: it kills the exact wording, the dead-ends, the things you tried. The full,
un-compacted conversation is still on disk in the .jsonl transcript.
claudemnesia recovers it. It extracts the real user↔Claude exchange — dropping tool
noise, collapsing pasted log/code dumps so the vibe survives — and, over an MCP
server, lets a running Claude search and recall its own un-compacted conversation,
right after a /compact.
On a real 352 MB transcript: 352 MB → ~7 MB (98% smaller) — 4,176 messages, 243 dumps classified, 24 compaction markers found.
Install
uv tool install . # everything: CLI + local hybrid search (no torch) + MCP server
claudemnesia --help
Local semantic search uses fastembed (ONNX, no PyTorch) — a base dependency, so the
default install already has working hybrid search. '.[semantic-openai]' /
'.[semantic-torch]' add the OpenAI / sentence-transformers embedders.
Quickstart
# Extract the latest conversation of the current project to Markdown:
claudemnesia --latest -f md -o conversation.md
# Recall: rank this conversation's turns against a question (cited, sub-second):
claudemnesia --latest --search "what did we decide about the dump threshold?"
# Orient after a /compact — the same surface the MCP tools expose:
claudemnesia --latest --recent 8 # the last 8 turns
claudemnesia --latest --outline # one-line preview of every ask
claudemnesia --find-across "TODO_MARKER" # exact search across all your sessions
→ Full reference: docs/cli.md
Recall for Claude itself
Expose claudemnesia over the Model Context Protocol so a running Claude can search its
own transcript — the claude-in-claude idea. After a /compact, it recalls exactly
what the summary dropped.
uv tool install .
claude mcp add --transport stdio claudemnesia -- claudemnesia-mcp
Everything defaults to the current conversation (via CLAUDE_CODE_SESSION_ID), so
recall("what did we decide about X") just works post-compaction.
→ Tools, the wake-up flow, env vars: docs/mcp.md
What it does
- Extract — the real exchange, tool-noise dropped, dumps collapsed non-destructively (~98% smaller).
- Recall — per-turn search (BM25 + semantic, fused with RRF), cited, no vector DB.
- Navigate —
recent/outline/since-compact, read a turn, read a hidden dump. - Operate —
list_files/list_actions: what the session changed, not just what it said. - Across sessions — "have I solved this before, in another conversation?"
Documentation
- CLI — extract, the navigate/inspect verbs, every option, output formats.
- MCP server — the recall tools, the post-
/compactwake-up flow, env vars. - Recall & search — lexical / semantic / hybrid, the embedding cache, cross-conversation.
- Architecture & internals — signal vs. noise, the classification model, the hexagon, library use.
Contributing
Issues and PRs welcome — see CONTRIBUTING.md. Changes are tracked in CHANGELOG.md.
License
MIT.
Metadata
Release files for claudemnesia 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| claudemnesia-0.2.0.tar.gz | 162.9 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| claudemnesia-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 224.6 kB
Release files / claudemnesia-0.2.0.tar.gz
| Download URL | claudemnesia-0.2.0.tar.gz |
|---|---|
| Size | 162.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9cad38344a87f1fef296a0e493d9d8e6baf9ddd762561a92722f689d6fb24469
|
|
BLAKE2b-256 checksum How to use checksums |
4bee0545df33e73a87baba2b57cf3b07e368fce0b1dd8c18183fa1f75061ba71
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 8, 2026.
Transparency logRelease files / claudemnesia-0.2.0-py3-none-any.whl
| Download URL | claudemnesia-0.2.0-py3-none-any.whl |
|---|---|
| Size | 61.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d5594dd4cf2f773054f42d3aaf95411c75d0789dec031a15b155b68eedbe7f0a
|
|
BLAKE2b-256 checksum How to use checksums |
24fbc4d0275f06879ec620e600458ee3c379c4c27f98ba0617f70d5d65b92dfb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 8, 2026.
Transparency logSecurity for claudemnesia 0.2.0
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for claudemnesia-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 8, 2026.
Transparency logA 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.