From the source
Factory describes a method for compressing conversation context in LLM-based agents by maintaining a persistent, incrementally updated summary rather than re-summarizing the entire prefix each turn.
The approach uses two thresholds to trigger compression and control the tradeoff between context preservation and cost.
The post also discusses the risks of over-compression and the importance of retaining session intent, high-level play-by-play, and artifact trails.






