475dd97263
The salvaged max-output/pressure fix set conversation_history=None after the new pre-API compaction. That is only correct for legacy session- rotation. Under the default in-place compaction (compression.in_place: True), archive_and_compact inserts the compacted rows into the session DB directly without stamping them with the intrinsic persisted-marker, so a subsequent flush with conversation_history=None re-appends them — doubling the active context and retriggering compression (the early-persist duplicate-row trap). Use conversation_history_after_compression(agent, messages), matching the two existing compaction sites (post-response should_compress and the turn-prologue preflight), which returns None for rotation and list(messages) for in-place so the compacted dicts are skipped by identity. Adds a regression test with a real SessionDB + real archive_and_compact that asserts the compacted summary row is persisted exactly once (fails with 2 copies on the None variant).