Compact When the Cache Is Already Cold, Not When the Transcript Gets Big

Cuts cache-read growth from quadratic toward linear on long sessions; Relace self-reports ~56% on its own traffic Advanced 5 min read

Most harnesses compact when the transcript crosses a token count, which destroys a warm prefix you already paid to write. Compact instead at the moment a message arrives after the cache TTL has expired — you have to rewrite the whole prefix at write rates anyway, so the forced write simply gets smaller.

🔒 Pro tip · Advanced

Unlock this tip — and 105 more

This is one of 106 advanced, fact-checked tactics reserved for Pro. Get the full 128-tip library, a searchable archive, and a new tip every morning. Free for 7 days, then $9/mo.

Prefer to browse? The 22 Beginner tips are free forever.