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.

Event-handling actions

An action is a single behaviour the system performs in response to a Claude Code hook event. Actions are defined independently of any specific hook; the hook types are bound to actions through a composable many-to-many mapping (ADR 0017). The same action can be driven by several events; one event can drive several actions.

Status: this catalogue formalises behaviours that today live inside the per-event handler modules. Treat entries without a ✅ as placeholders for planned actions.

Action catalogue

ActionWhat it doesReadsWrites
write-event-markerAppend a light type:"event" marker doc (event, session_id, ts, minimal payload)hook payloadCouchDB
update-countsBump per-session counters (events/prompts/errors/tools) in /tmphook payload/tmp
flush-transcript-chunkTail the live transcript and append chunk: docs (size/time batched)transcript_pathCouchDB
write-summaryAt session end, compute the rollup + token usage and write summary:<id>transcript, countsCouchDB
upload-blobsUpload summary.json + transcript.jsonl to S3transcript, summaryS3
seed-session-startReset counters + chunk offset; record start metadatahook payload/tmp, CouchDB
enrich-metadataPost additional session metadata (actor/machine, harness config) to the schemaless meta endpointhost/envCouchDB (via webapi)
extract-featureMap-reduce-friendly feature extraction (URLs, repos, PRs, /-commands, models)chunks/markersCouchDB views
detect-memory-writeFlag Edit/Write to …/memory/, CLAUDE.md, AGENTS.md as a memory savetool inputCouchDB
app-logEmit an operational log/error record for the componentruntimeapp-log DB (see app-logging.md)
index-for-searchPush derived content to the search backend (Meilisearch/vector)chunks/markerssearch index
reconcile-sessionFinalize a stale running session from chunks/S3chunks, S3CouchDB

(The last six are planned/placeholder; they line up with the Tier-2 and logging roadmap items.)

Current bindings (seed mapping)

The live dispatch.ts REGISTRY is the seed of the many-to-many table:

EventBound actions (today)
SessionStartseed-session-start, write-event-marker
UserPromptSubmitwrite-event-marker, update-counts, flush-transcript-chunk
PostToolUsewrite-event-marker, update-counts, flush-transcript-chunk
PostToolUseFailurewrite-event-marker, update-counts, flush-transcript-chunk
Stopwrite-event-marker, flush-transcript-chunk (forced)
SubagentStart / SubagentStopwrite-event-marker, update-counts
SessionEndflush-transcript-chunk (final), write-summary, upload-blobs

In the implemented hook these are still expressed as handler modules (handlers/* + the chunk-flush handler). The decoupled model reframes them as actions bound to events; the mapping becomes declarative and configurable per deployment (per the "everything configurable" goal — configuration.md).

Design notes