Skip to content

Bound checkpoint transcript growth via generation rotation #190

@jcleira

Description

@jcleira

Summary

Add generation rotation to limit unbounded growth of transcript data stored in checkpoints, keeping the git object database bounded while preserving recent context.

What to implement

  • Size tracking — track cumulative transcript JSONL size per session across checkpoints
  • Generation rotation — rotate older transcript content when a configurable threshold is exceeded
  • Configuration — add max_transcript_size setting (default ~10MB) to the layered config system
  • Backward compatibility — existing large transcripts remain readable; rotation only applies to new writes

Why this matters

Long-running agent sessions produce JSONL transcripts that grow unboundedly, inflating the git object database, slowing checkpoint operations, and causing performance issues during push. Generation rotation keeps storage bounded while preserving the most valuable recent context.

Context hints

  • internal/checkpoint/ — checkpoint storage and creation
  • internal/agent/claude/parse_jsonl.go — JSONL parsing
  • internal/config/ — layered configuration system

Source

Inspired by entireio/cli changelog 0.5.2: "Generation rotation to bound transcript growth"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions