Give Claude total recall of its own un-compacted conversation — extract, search, and recall Claude Code transcripts.
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file claudemnesia-0.2.0.tar.gz.
File metadata
- Download URL: claudemnesia-0.2.0.tar.gz
- Upload date:
- Size: 162.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9cad38344a87f1fef296a0e493d9d8e6baf9ddd762561a92722f689d6fb24469
|
|
| MD5 |
2e4223d3baadec5f6d382202f0614eed
|
|
| BLAKE2b-256 |
4bee0545df33e73a87baba2b57cf3b07e368fce0b1dd8c18183fa1f75061ba71
|
Provenance
The following attestation bundles were made for claudemnesia-0.2.0.tar.gz:
Publisher:
release.yml on darki73/claudemnesia
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claudemnesia-0.2.0.tar.gz -
Subject digest:
9cad38344a87f1fef296a0e493d9d8e6baf9ddd762561a92722f689d6fb24469 - Sigstore transparency entry: 1753530436
- Sigstore integration time:
-
Permalink:
darki73/claudemnesia@58a971512c11d4e1d253ec4bccbb4ff07f11bf1b -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/darki73
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@58a971512c11d4e1d253ec4bccbb4ff07f11bf1b -
Trigger Event:
push
-
Statement type:
File details
Details for the file claudemnesia-0.2.0-py3-none-any.whl.
File metadata
- Download URL: claudemnesia-0.2.0-py3-none-any.whl
- Upload date:
- Size: 61.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5594dd4cf2f773054f42d3aaf95411c75d0789dec031a15b155b68eedbe7f0a
|
|
| MD5 |
ab83fb3c8a6b2d5dcdb7ebe8204b222e
|
|
| BLAKE2b-256 |
24fbc4d0275f06879ec620e600458ee3c379c4c27f98ba0617f70d5d65b92dfb
|
Provenance
The following attestation bundles were made for claudemnesia-0.2.0-py3-none-any.whl:
Publisher:
release.yml on darki73/claudemnesia
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claudemnesia-0.2.0-py3-none-any.whl -
Subject digest:
d5594dd4cf2f773054f42d3aaf95411c75d0789dec031a15b155b68eedbe7f0a - Sigstore transparency entry: 1753530454
- Sigstore integration time:
-
Permalink:
darki73/claudemnesia@58a971512c11d4e1d253ec4bccbb4ff07f11bf1b -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/darki73
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@58a971512c11d4e1d253ec4bccbb4ff07f11bf1b -
Trigger Event:
push
-
Statement type: