Claude Transcripts docs GitHub
Work in progressUnder active development — not tested as ready for use. Breaking changes land without notice, stored data may need to be discarded between revisions, and there is no auth or security model.

Architecture

Where Claude Transcripts runs: on your machine, Claude Code, the plugin, the hook and the CLI reach the server only through the webapi; on your server, the webapi serves the webui and is the only path into CouchDB, Garage, Meilisearch and Fossil; GitHub builds and publishes the binaries, images and docs.

Claude Code keeps transcripts per machine, where they are easy to lose and hard to search across. Claude Transcripts records every session into stores you run and serves it back to people and agents. The long-term aim is for Claude Code itself to be the main reader, recalling and learning from past sessions; that is why the transcript is kept whole rather than summarised, and why documents are append-only.

Scope is Claude Code only, not agent sessions in general (ADR 0010).

Data flow

Where things run

Components

ComponentPathRoleReference
hookpackages/cli/src/hook/, plugin shim in hooks/The writerhook.md
webapipackages/webapi/Gateway; applies migrations on boot; serves the SPA, docs and CLI binary in productionwebapi.md
webuipackages/webui/Optional React SPAweb-ui.md
CLIpackages/cli/Installer, admin tool, terminal client, and the hookcli.md
sharedpackages/shared/The blueprint, migrations, cross-cutting types, sumTranscriptTokensREADME
pluginhooks/Skills, status command, statusline for Claude Codeplugin.md

The blueprint (packages/shared/src/blueprint/) is the central description of the system: services and ports, stores, hook events, actions and bindings, routes, env schema, the CLI spec. It is built from config/ and the environment, served at / and /api/blueprint, and projected into Compose files, the k8s base, the plugin's hooks.json and the CLI reference.

Storage

StoreHoldsIf removed
CouchDB (core)event, summary and chunk docs; full-content chunks carry the parsed, pruned turns (couchdb.md)Not allowed: it is the source of truth
S3, bundled as Garage (features.s3Blobs)<bucket>/<sessionId>/transcript.jsonl (byte-exact, its only home, ADR 0014) and summary.jsonNo byte-exact transcript; CouchDB keeps the pruned turns
Meilisearch (features.meilisearch)Derived search indexes over session metadata and turns, rebuildable with reindexNo search, nothing else changes
FossilVersion-controlled repositories with a web UI; read through /api/fossil, not yet written (ADR 0031)Nothing today

The webapi and CouchDB are the only required parts. The webui, CLI, S3 and Meilisearch are optional, and losing one loses only its feature. S3 is reached through Bun.S3Client, so Garage, MinIO, R2 or AWS work by changing the environment (ADR 0003). Why these technologies: database-choice.md.

Session lifecycle

  1. SessionStart resets per-session state, probes the webapi, writes an event doc, prints the banner (whether and where it is recording, the session's link, the Claude Code hook-spec check) and injects the recall primer.
  2. Each prompt, tool call and stop writes an event doc; the transcript is tailed into chunk docs every 200 entries or 15 s (mid-flight-chunking.md), so a live or crashed session can be read.
  3. SessionEnd flushes the last chunk, writes summary:<id> with counts and token usage, and uploads the transcript (through the webapi, to S3).
  4. A session that never reaches SessionEnd (killed, crashed) is finalised later: the webapi's change follower runs claude-transcripts reconcile on it, which writes the missing summary from the recorded events (tools.md).

Status is derived: ended once the summary exists (unless it was reconciled and the session has recorded activity since), otherwise running within system.sessions.liveWindowMs (2 h) of its last activity and incomplete after. Active duration excludes gaps longer than system.sessions.idleThresholdMs (5 min).

Tiers

Three tiers, each a superset of the one below and none allowed to break it (ADR 0015):

What is planned within each: roadmap.md.

Stack

Bun + TypeScript (ESM, strict) throughout, in one workspace (ADR 0004). webapi: Hono, @hono/zod-openapi, nano. webui: React 19, Vite, MUI, TanStack Router and Query. CLI: Ink. API clients are generated from the OpenAPI spec with orval (ADR 0019). Biome and lefthook. Releases on GitHub Actions to GHCR and GitHub Releases (releasing.md).