Going by the docs, it isn't refreshed. The summary starts at 85% of the threshold and is just held; at the threshold it's swapped in and everything since then is kept as is, so alchninja's read is right. It also falls back to a normal compaction if too much conversation arrived after the held summary, or if the model, instructions or start of the conversation changed. It's skipped under about 64k tokens and right after a model switch, the held summary lives only in memory (lost on restart), and an unused one still costs tokens. If losing detail is the worry, compaction.keep.tokens (15k by default) is the knob for keeping more recent conversation verbatim.
View all comments
Show parent comment
2
u/bezcurhq Oct 26 '26
Going by the docs, it isn't refreshed. The summary starts at 85% of the threshold and is just held; at the threshold it's swapped in and everything since then is kept as is, so alchninja's read is right. It also falls back to a normal compaction if too much conversation arrived after the held summary, or if the model, instructions or start of the conversation changed. It's skipped under about 64k tokens and right after a model switch, the held summary lives only in memory (lost on restart), and an unused one still costs tokens. If losing detail is the worry,
compaction.keep.tokens(15k by default) is the knob for keeping more recent conversation verbatim.https://opencode.ai/v2/docs/compaction/#background-compaction