Compaction Cycle

AG2 Beta — TailWindowCompact vs SummarizeCompact, same conversation
Trigger: CompactTrigger(max_events=6)
Targets: target=4 on both strategies
Script: 6 short turns
Why the first compaction fires at 8 events, not 7: the harness checks the trigger after each whole turn finishes, and each turn appends two events (ModelRequest + ModelResponse). With max_events=6 and a strict > check, the count jumps 6 → 8 in one turn, so the first compaction lands at 8.
Tail rail (free, drops the head) Summarize rail (1 LLM call per fire) compaction trigger fired
Rail A · TailWindowCompact
TailWindowCompact(target=4)
events 0 compactions 0 llm calls in compact 0
Click Run to play the script.
Rail B · SummarizeCompact
SummarizeCompact(target=4)
events 0 compactions 0 llm calls in compact 0
Click Run to play the script.