Skip to content

How I built Chronicle.

Open sourceClaude Code · Python 3Sep 2026

In short

Chronicle indexes the Claude Code session history already on your disk into one SQLite file and hands it back at the moments it helps: at session start, before a compaction destroys context, and when you are about to redo work you already solved. It is standard-library Python with zero dependencies and zero network calls, so nothing leaves the machine. On 500 MB of transcripts it builds the full index in 3.4 seconds and re-indexes in 0.1 seconds.

Chronicle: Local memory for Claude Code: it indexes your session history and hands past work back when it is useful.

The problem

Every Claude Code session starts from zero. The record of what was built, decided and abandoned already sits on disk in ~/.claude/projects, hundreds of megabytes of transcripts nobody reads, and the memory tools that exist send that history to a cloud service. Mine includes client code and keys, so a hosted memory layer was not an option.

What I built

  • An index of episodes, not sessions: each transcript is split into stretches of work on a four-hour idle gap, each with its own title, files, tools and cost.
  • Project attribution from the files a session actually edited, including files written through the shell, rather than the folder it was launched in.
  • Permanent ids for episodes and subagent runs, so #118 still means the same work after a full rebuild.
  • Hooks that brief a new session, save prompts verbatim before a compaction, re-index at session end, and warn before you repeat solved work.
  • A read-only MCP server with nine tools, and a local dashboard bound to 127.0.0.1.

Key decisions

  1. Standard library only, with no network calls anywhere.

    Session history holds client code, credentials and business details. A memory tool that phones home is a liability, and zero dependencies means nothing to audit or update.

  2. The repeat-work warning has to clear five statistical gates before it speaks.

    A warning that fires often gets ignored. It fired 4 times in 1,136 prompts, and each time it pointed at work that really had been done before.

  3. Every hook runs under a watchdog and never waits on input.

    A memory tool that stalls a coding session costs more than it saves, so a hook that runs long is cut off rather than allowed to block.

Want something like this?

I build for clients the way I built this, and on client work you deal with one person from brief to launch. Tell me what you need, and the brief comes straight to me.