The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
docs(compression): comments that quoted the uncapped 500K trigger follow the new default
kshitijk4poor9a18c8de43cf
diff --git a/agent/context_compressor.py b/agent/context_compressor.pyindex f4f87a100c1..cfde08c9c10 100644--- a/agent/context_compressor.py+++ b/agent/context_compressor.py@@ -2314,7 +2314,8 @@ class ContextCompressor(SummaryDispatchMixin, MicroCompactionMixin, ContextEngindef preview_threshold_tokens(self, model: str, context_length: int, provider: str = "") -> int:"""The trigger ``update_model`` would install for ``model``/``context_length``, without mutating- state — the model-switch guard quotes it in its preflight-compression warning."""+ state — the model-switch guard quotes it in its preflight-compression warning. Ignores any+ auxiliary-summariser ceiling: the post-switch feasibility probe re-derives that."""config_percent = getattr(self, "_config_threshold_percent", self.threshold_percent)base_percent = resolve_model_threshold(model, self.model_thresholds, config_percent, provider)threshold_percent = self._effective_threshold_percent(context_length, base_percent)diff --git a/hermes_cli/config_defaults.py b/hermes_cli/config_defaults.pyindex 47893cdde71..62eff906dba 100644--- a/hermes_cli/config_defaults.py+++ b/hermes_cli/config_defaults.py@@ -1277,8 +1277,8 @@ DEFAULT_CONFIG = {"request_overrides": {},# compression_threshold_tokens: optional absolute cap on a subagent's compaction TRIGGER# (not the request payload), applied as the lower of this and the child's ratio threshold.- # 0 (default) = no subagent-specific cap; children compact at the same 0.50 x window as the- # parent (500K on a 1M model). A replay of a 1,393-agent run showed 200K-400K caps within+ # 0 (default) = no subagent-specific cap; children compact where the parent does — the lower+ # of 0.50 x window and compression.threshold_tokens (256K on a 1M model). A replay of a 1,393-agent run showed 200K-400K caps within# 5% of each other in cost once cache prefixes are intact, and every compaction is a# chance to lose detail, so the default stays off. A token count >= 16000 enables it;# other values (true, "200k") are config errors: warned and ignored.diff --git a/tools/delegate_tool.py b/tools/delegate_tool.pyindex 0a04dc68b15..2f512c89e37 100644--- a/tools/delegate_tool.py+++ b/tools/delegate_tool.py@@ -137,7 +137,7 @@ def _child_compression_cap_tokens(raw) -> "int | None":def _apply_child_compression_cap(child, delegation_cfg: dict) -> None:"""Optional absolute cap on the child's compaction trigger, ``delegation.compression_threshold_tokens``(lower of it and any global ``compression.threshold_tokens``). Off by default: a 1M-window child- compacts at 500K like its parent. The compressor applies the cap on first window resolution, which+ compacts where its parent does (the global cap, 256K by default). The compressor applies the cap on first window resolution, whichhappens after construction, so setting it here is exactly equivalent to config."""from agent.context_compressor import ContextCompressor