From 0b8366bfd0fbeab3f83b12c6807d52126af81f5f Mon Sep 17 00:00:00 2001 From: viettranx Date: Fri, 27 Mar 2026 22:55:59 +0700 Subject: [PATCH] fix(agent): raise default compaction threshold from 75% to 85% Compaction was triggering too early because prompt tokens include system prompt + context files + tools, not just history. Raising the threshold reduces unnecessary compaction cycles. --- internal/config/defaults.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/config/defaults.go b/internal/config/defaults.go index d9651f60..ee1a4f6b 100644 --- a/internal/config/defaults.go +++ b/internal/config/defaults.go @@ -9,5 +9,5 @@ const ( DefaultMaxMessageChars = 32000 DefaultMaxIterations = 30 DefaultTemperature = 0.7 - DefaultHistoryShare = 0.75 + DefaultHistoryShare = 0.85 )