Browse, search, and permanently preserve your Claude Code conversation history.
Nothing lost to /compact.
curl -fsSL https://github.com/rishi-anand/claude-watch/releases/latest/download/install.sh | bash
When your context window fills up, Claude Code runs /compact — summarizing
and discarding old messages to free tokens. That transcript is gone. If you want to look
up what you actually said three sessions ago, you can't.
Sessions live in a growing pile of .jsonl files under
~/.claude/projects/…. After a compaction, the summary
replaces the original messages. There's no search, no timeline,
no way to resume a conversation from three weeks ago.
Every session is captured in real time via Claude Code hooks —
including the moment right before /compact runs.
History lands in plain .md files with an FTS5 index.
Nothing is ever lost. Search everything.
One small Go binary. No CGO, no Docker, no database server. Plain-text storage,
searchable index, and a local web UI at localhost:7823.
The PreCompact hook fires just before summarization, giving us the full transcript before it's destroyed.
SQLite FTS5. All words must match (implicit AND). Hyphens and apostrophes are treated as word separators.
Sessions stored as human-readable .md files. No proprietary format. Version-control them if you like.
Use list, export, and search straight against Claude's JSONL — no server, no index required.
Browse sessions, filter by project, read a full conversation with markdown, tool calls, and compaction markers rendered.
install-skill teaches Claude Code, Codex, and Cursor to route "what was that session where…" through claude-watch.
Auto-follows your system, and a toggle in the header remembers your preference across sessions.
Shows exactly what will be written to ~/.claude/settings.json before touching a byte.
One binary, seven subcommands. Full details are in the README.
claude-watch serveStart the local server and open the web UI at localhost:7823.claude-watch listList sessions across all projects (reads JSONL directly — no SQLite needed).claude-watch search <query>Full-text search every captured conversation. Same FTS5 index as the web UI.claude-watch export --session-id <id>Export any conversation to a clean markdown file. Add --include-tool-msg for full detail.claude-watch install-skillShip the agent skill file to Claude Code, Codex, and Cursor so they use claude-watch for history lookups.claude-watch hook <event>Process a Claude Code hook event. Wired automatically on first serve.claude-watch rebuildForce rebuild the SQLite FTS5 index from your .md session files.
Claude Code fires hook events
at key points. Each hook pipes JSON into the claude-watch binary, which syncs
the exact JSONL file it points at — no filesystem scanning, no ticker.
Records the new session and creates an empty markdown stub for it.
Incremental sync of the transcript into markdown, then updates the SQLite FTS5 index.
Fires before Claude compacts the context. We flush the full transcript to disk right here, so nothing is lost when summarization runs.
Final sync of the transcript. Session is now preserved in full for search and export.