Auto-compact should defer to end of response/turn, not trigger mid-response
Preflight: Related to #9971 (closed as not planned, now locked), which addressed auto-compact triggering mid-command-execution. This request is specifically about auto-compact triggering mid-response (partway through the model's answer), which is still an open problem and wasn't the exact scope of #9971. Also somewhat related to #90212 (compact-on-idle for multi-session fleets), but this issue is about the single-session interactive case.
Problem:
When conversation context approaches the auto-compact threshold, compaction can trigger while a response is still being generated, causing a long visible pause in the middle of an answer.
Suggested behavior:
Check context usage when a response/turn completes. If it's near the threshold, run compaction then — right after the turn finishes and before the next one starts — instead of interrupting generation mid-answer.
Why this matters:
This makes compaction pauses land at a natural breakpoint (between turns) instead of splitting a single answer in half, which is confusing and feels like a hang.