kMessageCapDefaultMargin top-level constant
int
const kMessageCapDefaultMargin
The default margin between the live message count and the learned cap
at which the pre-emptive compaction trigger fires (open question 1 on
the card: cap − margin). 16 messages ≈ several turns of tool-call +
result growth at the observed ~7 calls/min — big enough that a burst of
turns between the trigger and the request cannot re-wedge the run,
small enough not to compact wastefully early.
Implementation
const int kMessageCapDefaultMargin = 16;