Documentation
¶
Overview ¶
cg-transcript-replay runs the shipped pipeline over request sequences rebuilt from Claude Code transcripts (scripts/analysis/cc_transcript_requests.py) and writes, per call, what the pipeline changed. It makes no network call: it is the offline half of "what would Context Guru save here".
Every call k of a round is sent as messages[:n_k], in order, through apply.BodyOpts with a Tracker, a per-round store and the call's own timestamp — the same inputs the proxy gives it — so the cached-prefix boundary, the cold-cache verdict and sticky offloads all behave as they would live.
Per call it records the token count of the original and the forwarded messages, how much of the forwarded body is an unchanged prefix of the previous forwarded body (anything less is a cache rewrite), the per-component saving, and the per-tool_use_id saving. Pricing is left to the caller.