From 97bbd7a6428a8ace86160d7a9e06b53faa8ba258 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Wed, 24 Dec 2025 12:44:05 +0100 Subject: [PATCH] Clarify messagesToSummarize starts after last compaction --- packages/coding-agent/docs/hooks.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/coding-agent/docs/hooks.md b/packages/coding-agent/docs/hooks.md index d777cb14..fea8d7f7 100644 --- a/packages/coding-agent/docs/hooks.md +++ b/packages/coding-agent/docs/hooks.md @@ -194,8 +194,8 @@ The `before_compact` event lets you implement custom compaction strategies. Unde |-------|-------------| | `entries` | All session entries (header, messages, model changes, previous compactions). Use this for custom schemes that need full session history. | | `cutPoint` | Where default compaction would cut. `firstKeptEntryIndex` is the entry index where kept messages start. `isSplitTurn` indicates if cutting mid-turn. | -| `messagesToSummarize` | Messages that will be summarized and discarded (before cut point). | -| `messagesToKeep` | Messages that will be kept verbatim after the summary (after cut point). | +| `messagesToSummarize` | Messages that will be summarized and discarded (from after last compaction to cut point). | +| `messagesToKeep` | Messages that will be kept verbatim after the summary (from cut point to end). | | `tokensBefore` | Current context token count (why compaction triggered). | | `model` | Model to use for summarization. | | `resolveApiKey` | Function to resolve API key for any model: `await resolveApiKey(model)` |