Skip to main content

Module transcript_compact

Module transcript_compact 

Source
Expand description

Transcript/conversation compaction for agent session JSONL files.

Compresses tool_result blocks in JSONL conversation transcripts (e.g. ~/.claude/projects/*.jsonl, ~/.cursor/agent-transcripts/*.jsonl) by replacing large tool outputs with compact summaries.

Analogous to ContextZip’s approach: 85.8% of transcript bytes are tool I/O.

Structs§

CompactionStats

Functions§

compact_directory
Compact all JSONL files in a directory.
compact_file
Compact a single JSONL transcript file in-place. Returns stats about what was compacted.