From e2211b2683d0dacbdb39af9bc5a2b712a742597d Mon Sep 17 00:00:00 2001 From: nftpoetrist Date: Sat, 25 Apr 2026 10:52:17 +0300 Subject: [PATCH] fix(compressor): reset _summary_failure_cooldown_until in on_session_reset() on_session_reset() cleared _previous_summary, _last_summary_error, and _ineffective_compression_count but left _summary_failure_cooldown_until intact. When a transient summary error sets a 60 s cooldown (or 600 s for a missing-provider RuntimeError) and the user immediately runs /reset or /new, the cooldown carries into the new session. If the new session reaches the compression threshold before the cooldown expires, _generate_summary() returns None early, middle turns are silently dropped without a summary, and the agent continues with no indication that compaction was skipped. Fix: set _summary_failure_cooldown_until = 0.0 in on_session_reset(), matching the value assigned in __init__ and symmetric with the other per-session fields already cleared there. Fixes #15547 --- agent/context_compressor.py | 1 + 1 file changed, 1 insertion(+) diff --git a/agent/context_compressor.py b/agent/context_compressor.py index 45c26b11b0..6c177b9099 100644 --- a/agent/context_compressor.py +++ b/agent/context_compressor.py @@ -344,6 +344,7 @@ class ContextCompressor(ContextEngine): self._last_aux_model_failure_model = None self._last_compression_savings_pct = 100.0 self._ineffective_compression_count = 0 + self._summary_failure_cooldown_until = 0.0 # transient errors must not block a fresh session def update_model( self,