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. These docs describe the intended design as much as the current state.

Notes — mid-flight transcript chunking (issue #4, P1)

Status: implemented (metadata chunks). The shared byte-faithful slicer (@claude-transcripts/shared sliceIntoChunks — one copy, imported directly since the CLI became the hook) is live: backfill reconstructs chunk docs, and the hook's flush-transcript-chunk tails the transcript incrementally (byte-offset + lock state in /tmp, gated behind features.midFlightChunking). Both produce identical byte boundaries. Still deferred: embedding the pruned entries[] when couchFullContentChunks is on (chunks are metadata-only for now), and the time-based flush's content-view fast-follow.

Working notes for the logging rework. In place of an ADR for now (owner deferred the ADR — see issue #4 thread). When the dust settles this should be promoted to an ADR superseding 0014 ("transcripts live in S3 only"), because it deliberately changes that: CouchDB now also carries transcript content (chunked), while S3 remains the byte-faithful escrow.

What changed

Until now everything durable happened at SessionEnd: the summary doc + the S3 transcript upload. If a session crashed / was killed / the machine rebooted before SessionEnd, the content was lost and the session was stuck running forever.

Now the hook tails the live transcript file mid-session and writes append-only chunk: docs to CouchDB as the session runs. The full byte-faithful transcript is still uploaded to S3 at SessionEnd (unchanged). Couch chunks make the content queryable by map-reduce views and give crash resilience (worst case = lose the last un-flushed delta, not the whole session).

Key enabling facts

Design (as built)

Feature flags (in claude-transcripts.config.json, both default false)

To enable in a deployment, set both true in the runtime config and re-run claude-transcripts setup / install (they write the hook's runtime config).

Views (added through a migration — packages/shared/src/migrations/)

Dedup of the streaming/duplicate assistant messages is left to read/view time (mirror sumTranscriptTokens' heaviest-usage-per-message-id rule) — chunks stay byte-faithful to their slice, which keeps them append-only and replication-safe.

Done in this pass

Not done yet (follow-ups)