Skip to content

The agent that grows with you

fix(compression): host idle watchdog never undercuts the aux summary request budget

joaomarcosf2bd6b44312a
diff --git a/agent/conversation_compression.py b/agent/conversation_compression.py
index c31a789ef7b..ef752bf696b 100644
--- a/agent/conversation_compression.py
+++ b/agent/conversation_compression.py
@@ -728,6 +728,17 @@ def resolve_context_compression_timeouts(compression_cfg: Optional[dict] = None)
ceiling = float(cfg["context_total_ceiling_seconds"])
if idle > 0:
ceiling = max(ceiling, idle)
+ # #114594: the aux summary attempt legitimately needs up to its own budget (floor 300s), while the
+ # host idle watchdog defaults to 120s. Clamp the idle window up to at least the effective aux
+ # compression timeout so prep/chunking work with no streamed tokens yet is not cut off. Only raises:
+ # an explicit cfg value above the aux budget is kept, and idle never exceeds the ceiling.
+ with contextlib.suppress(Exception):
+ from agent.auxiliary_client import _effective_aux_timeout
+ _aux_budget = float(_effective_aux_timeout("compression", None))
+ if _aux_budget > 0:
+ if _aux_budget > ceiling:
+ ceiling = _aux_budget
+ idle = max(idle, min(_aux_budget, ceiling))
return idle, ceiling