What is Longhand?
Longhand is a local MCP server that captures every tool call, file edit, and thinking block from every Claude Code session verbatim into a SQLite database on your machine. It provides persistent, searchable memory without any API calls, summaries, or AI decisions about what to keep. It is for anyone using Claude Code who wants to retain session history beyond Claude Code’s default file rotation.
How to use Longhand?
Install via pip: pip install longhand. Run longhand setup to ingest existing history, install hooks, and configure MCP. Then use longhand recall "natural-language query" to search. For large histories, use longhand setup --skip-analysis for a fast path, followed by longhand reanalyze for full semantic capabilities.
Key features of Longhand
- Zero API calls – fully local, offline-capable.
- Stores verbatim events – no lossy summarization.
- Natural-language recall across ~126ms for 20+ sessions.
- Deterministic replay of past file states and diffs.
- First-class support for Claude Code thinking blocks.
- Completely portable between models and model versions.
Use cases of Longhand
- Search past fixes or decisions by fuzzy description.
- Review thinking blocks to understand past reasoning.
- Reproduce exact file state at any point in a previous session.
- Preserve history before Claude Code rotates source JSONL files.
- Integrate with or replace other memory tools without losing data.
コメント