Skip to main content

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.
  • Navigaterecent / outline / since-compact, read a turn, read a hidden dump.
  • Operatelist_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-/compact wake-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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

claudemnesia-0.2.0.tar.gz (162.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

claudemnesia-0.2.0-py3-none-any.whl (61.7 kB view details)

Uploaded Python 3

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

Hashes for claudemnesia-0.2.0.tar.gz
Algorithm Hash digest
SHA256 9cad38344a87f1fef296a0e493d9d8e6baf9ddd762561a92722f689d6fb24469
MD5 2e4223d3baadec5f6d382202f0614eed
BLAKE2b-256 4bee0545df33e73a87baba2b57cf3b07e368fce0b1dd8c18183fa1f75061ba71

See more details on using hashes here.

Provenance

The following attestation bundles were made for claudemnesia-0.2.0.tar.gz:

Publisher: release.yml on darki73/claudemnesia

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for claudemnesia-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d5594dd4cf2f773054f42d3aaf95411c75d0789dec031a15b155b68eedbe7f0a
MD5 ab83fb3c8a6b2d5dcdb7ebe8204b222e
BLAKE2b-256 24fbc4d0275f06879ec620e600458ee3c379c4c27f98ba0617f70d5d65b92dfb

See more details on using hashes here.

Provenance

The following attestation bundles were made for claudemnesia-0.2.0-py3-none-any.whl:

Publisher: release.yml on darki73/claudemnesia

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page