Longhand
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
**Using Codex too?** Share one memory archive between Claude Code and Codex.
**Persistent local memory for Claude Code.** Every tool call, every file edit, every thinking block from every Claude Code session — stored verbatim on your machine. Searchable, replayable, and recallable by fuzzy natural-language questions. Zero API calls. Zero summaries. Zero decisions made by an AI about what's worth remembering.
> **Claude Code quietly rotates your session files after a few weeks.** Longhand captures them into SQLite before they're gone. Once ingested, your history stays forever — even after the source JSONL files are deleted. Install early; the past you don't capture is unrecoverable.
> **If you have 20+ Claude Code sessions in ~/.claude/projects/, Longhand can search across every fix, decision, and conversation you've had in ~29ms — without a single API call.**
> **Does it use a lot of tokens? No — the tools you'll use most are capped by design.** A full recall across 100+ sessions returns ~4K tokens. Reading one raw session JSONL costs 10–50× more. See Token budget for which tools cap output and which don't.
**Want to kick the tires first?** Run longhand demo for a 60-second walkthrough on a fake 3-session sample corpus — your real ~/.claude and ~/.longhand are not touched. The demo seeds a sandboxed store with a Stripe-webhook bug + Supabase auth migration + downstream 401 fix, then runs cross-session recall and project-status so you can see what the output looks like before committing.
**Upgrading to 1.0.0?** This is the release that closes the deprecation window 0.13 opened. Everything removed here has been warning since 0.13.0:
- Four CLI aliases are gone: patterns → recall " ", recap → status --days N, continue → status --session , reanalyze → analyze --all.
- **The reconcile MCP tool now defaults to a dry run.** If you have an agent loop that relied on the implicit heal, pass fix=true explicitly. Dry runs tell you so in the payload.
- Six retired MCP tools left the listing (19 → 13) but **still answer forever** with a migration note — retired names live in users' own CLAUDE.md files and must never hard-fail.
- New: COMPATIBILITY.md states what 1.x guarantees and what it doesn't.
Your database needs nothing. Migrations are automatic and a 0.11+ store opens on any later 1.x — that's Promise 2, and there's a real 0.11-schema fixture in the test suite proving it.
**Upgrading to 1.2.x?** No removals, just fixes worth knowing about:
- **1.2.3:** MCP get_session_timeline's tail now returns the true last N events on sessions over 5,000 events — it used to return the middle. setup's closing hint stopped suggesting recap (removed at 1.0) and now suggests status --days 7. Recall's footers and get_session_timeline's own tool description stopped naming search_in_context (retired from the tool listing at 1.0, though it still answers) and now point at search — the footers spell out the call, search(session_id=…, query=…, context_events=5).
- **1.2.2:** recall says so when its top match is much older than the alternatives instead of letting a stale fix read as current (see Recall Example). A Codex context-compaction record (compacted) no longer trips doctor's transcript-format-drift warning.
- **1.2.1:** MCP get_session_timeline had a sentinel bug that made every call return exactly one event, ignoring limit/offset, unless tail was passed explicitly — fixed. search's project auto-scoping no longer overrides an explicit session_id.
**Upgrading to 0.13.0?** Nothing breaks — that release opened the v1.0 deprecation window, so every old name kept working while pointing at its replacement:
- status is now the single resume command: bare status = recent digest (was recap), status unchanged, status --session = session tail (was continue). The old commands still run and print a pointer; they're removed at v1.0.
- Six MCP tools folded into six survivors with identical parameters (search_in_context → search + context_events, get_episode → find_episodes + episode_id, etc. — full table in the CHANGELOG). The retired names still answer, prefixed with a migration note.
- Hooks can no longer exit nonzero — failures become breadcrumbs in ~/.longhand/logs/ and two new doctor rows (Hook errors, Transcript format) keep them visible.
- "Today"/"yesterday" recall windows now follow your local calendar day instead of UTC's; rankings may shift once if you're not in UTC.
- Windows users: this release fixes a serious bug where the ingest-lock liveness check could terminate other longhand processes.