wangzhigang1999 commented on code in PR #7417:
URL: https://github.com/apache/kyuubi/pull/7417#discussion_r3159890323


##########
kyuubi-common/src/main/scala/org/apache/kyuubi/config/KyuubiConf.scala:
##########
@@ -3848,6 +3848,21 @@ object KyuubiConf {
       .checkValue(_ > 0, "must be positive number")
       .createWithDefault(100)
 
+  val ENGINE_DATA_AGENT_COMPACTION_TRIGGER_TOKENS: ConfigEntry[Long] =
+    buildConf("kyuubi.engine.data.agent.compaction.trigger.tokens")

Review Comment:
   Honestly, in practice almost every mature agent collapses to a **token-based 
signal**, just in different units:
   
   - absolute tokens (what we use here, also Codex CLI's 
`model_auto_compact_token_limit`)
   - % of context window (Claude Code ~83.5%, Copilot CLI ~80%, Gemini CLI 20%, 
Cline's `autoCondenseContextPercent`)
   - single-step token delta — one oversized tool output blowing past the 
budget; we handle that separately via `ToolResultOffloadMiddleware` so it never 
reaches the compaction path.
   
   The only genuinely non-token triggers I've seen are turn/message count 
(rare, usually just layered on top of tokens) and explicit/manual triggers 
(orthogonal — a trigger *source*, not a *signal*). Token threshold is really 
the one that matters in practice, so that's all this PR wires up.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to