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.

Design discussion — agent-first session corpus (working notes)

Status: raw working notes captured from the 2026-06-17 design session. Not the final spec — owner will refine these into the formal docs and refresh issue #15. Preserved here so the discussion isn't lost when we move dev off the live clone. Builds on issue #15 (architecture redesign) and #4 (logging rework / chunking, already partly implemented on this branch). See also docs/mid-flight-chunking.md.

North star (unchanged from #15)

The primary consumer is Claude Code itself: a structured, searchable, replicated corpus of past sessions for recall + self-retrospective, beyond log rotation and across machines. Human browse/search is secondary.

Layered architecture — graceful degradation is a first principle

Nothing optional may break the core. Losing host-side ingestion, Meilisearch, or the fs transcript must degrade features, not the system.

Document model

Chunking

Timestamps — first-class on every doc

Standard metadata — what's actually available (from research)

The SessionStart hook payload is lean: session_id, transcript_path, cwd, source, model (+ hook_event_name). It does not include the system prompt, the skills/plugins/MCP/tools/settings manifest, the CLI version, the OS username, or permission_mode. So the standard set splits by source:

FieldSourceTier
session_id, cwd, model, source, hostname, tshook payload / in-process0 (hook-native)
token usage + per-turn/per-tool breakdowntranscript (message.usage); extends sumTranscriptTokens0
CLI versiontranscript entry version field (NOT a payload field / subprocess)0 (derivable)
gitBranch, cwd-over-timetranscript entries0 (bonus)
OS usernamewhoami / $USER1 (host-side)
full prompt ingredients, skills/plugins/MCP/tools/settings manifestdisk config + InstructionsLoaded paths1 (collector)
anything elseuser's own tooling2 (schemaless)

Events & events-of-interest

Memory-save detection

No native memory hook exists. Memory writes are tool calls → detect via PostToolUse matching Edit|Write on …/memory/ paths (and CLAUDE.md/AGENTS.md). tool_input.file_path is in the payload to filter on. (Owner wants a deeper look.)

fs transcript parser (research conclusion)

Deltas from the branch as it stands

  1. Drop the midFlightChunking + couchFullContentChunks flags → always chunk, always store pruned content; keep only logging.chunk.*.
  2. Formalize a dedicated session_start doc type with the standard metadata block (drop the false permission_mode dependency — not in payload).
  3. Capture per-entry transcript timestamps + version/gitBranch in chunks.
  4. Wire all supported hook events as marker docs + add events-of-interest views.
  5. Add the schemaless metadata endpoint (webapi) + the standard host-side collector + the standalone parser CLI — all graceful-degradation extras.
  6. Cross-session views: single timeline, durations, active-vs-idle, events-of-interest.

Open decisions

Cross-refs

#15 (redesign / Phase 2 replication), #4 (chunking — this branch), #3 (config/prompt enrichment), #5 (hooks inventory), #6 (backfill + verify), #7 (actor/machine metadata), #9 (Meilisearch), #11 (secrets/pruning).