fix: remove auto-compaction turn limit (#506)

This commit is contained in:
_Kerman 2026-06-06 23:16:34 +08:00 committed by GitHub
parent 4d113949c8
commit f09ec7bbb5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View file

@ -0,0 +1,6 @@
---
"@moonshot-ai/agent-core": patch
"@moonshot-ai/kimi-code": patch
---
Remove the per-turn auto-compaction limit so long conversations can keep compacting instead of failing early.

View file

@ -17,7 +17,7 @@ export const DEFAULT_COMPACTION_CONFIG: CompactionConfig = {
triggerRatio: 0.85,
blockRatio: 0.85, // Same as triggerRatio to disable async compaction
reservedContextSize: 50_000,
maxCompactionPerTurn: 3,
maxCompactionPerTurn: Infinity,
maxRecentMessages: 4,
maxRecentUserMessages: Infinity,
maxRecentSizeRatio: 0.2,