keep recent turns during session compaction

This commit is contained in:
Shoubhit Dash
2026-04-10 09:34:01 +05:30
parent 91786d2fc1
commit 6f5a3d30fd
6 changed files with 587 additions and 15 deletions
+12
View File
@@ -1069,6 +1069,18 @@ export namespace Config {
.object({
auto: z.boolean().optional().describe("Enable automatic compaction when context is full (default: true)"),
prune: z.boolean().optional().describe("Enable pruning of old tool outputs (default: true)"),
tail_turns: z
.number()
.int()
.min(0)
.optional()
.describe("Number of recent real user turns to keep verbatim during compaction (default: 2)"),
tail_tokens: z
.number()
.int()
.min(0)
.optional()
.describe("Token budget for retained recent turns during compaction"),
reserved: z
.number()
.int()