feat(core): compact v2 session context (#30986)

This commit is contained in:
Kit Langton
2026-06-05 13:17:23 -04:00
committed by GitHub
parent a7bd1cd0d0
commit beae7290f3
26 changed files with 571 additions and 298 deletions
+1 -2
View File
@@ -348,7 +348,7 @@ Behavior affecting long-running conversations and context management.
| ------------ | ----------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------- |
| `compaction` | Automatic compaction, pruning, and context reserve settings | redesign | Group retained verbatim history under `keep` and rename context headroom to `buffer`. |
Retain the compaction capability but redesign the less clear limits. `keep.turns` is the maximum number of recent user turns to preserve verbatim after compaction, and `keep.tokens` is the token budget for those retained turns. `buffer` is the token headroom reserved so automatic compaction triggers before the input window is exhausted.
Retain the compaction capability but redesign the less clear limits. `keep.tokens` is the token budget for recent history serialized into the textual compaction checkpoint. `buffer` is the token headroom reserved so automatic compaction triggers before the input window is exhausted.
```jsonc
{
@@ -356,7 +356,6 @@ Retain the compaction capability but redesign the less clear limits. `keep.turns
"auto": true,
"prune": true,
"keep": {
"turns": 2,
"tokens": 2000,
},
"buffer": 10000,