What
Claude Code saves each session's conversation as a transcript file on disk, and it periodically compacts that file, which means rewriting it to remove material it no longer needs. Compaction now works out up front how many bytes it would reclaim.
lowYieldCompactSkipEnabled: a new field on the session store, which is initialised to true. When it is set and the expected saving is low, Claude Code skips the rewrite instead of doing it.recordCompactYield: the step that raises the size threshold for the next compaction now lives in this shared helper. It doubles the threshold after a compaction that freed little. Before, the threshold was only raised after a compaction had actually run.
Why
Large session files are no longer rewritten when the rewrite would barely shrink them. In practice this can change when compaction runs on long sessions.