1.1 KiB
1.1 KiB
summary, read_when
| summary | read_when | ||
|---|---|---|---|
| Compaction modes and configuration |
|
Compaction
Compaction summarizes older session history so the conversation stays within the model context window. The summary is stored in the session JSONL history and combined with the most recent messages.
Modes
agents.defaults.compaction.mode controls how summaries are generated.
default(default): use the built-in compaction summarizer.safeguard: uses a chunked summarization pass to avoid context overflow for very long histories. If chunked summarization fails, Clawdbot falls back to a minimal summary plus file-operation metadata.
Configuration
{
agents: {
defaults: {
compaction: {
mode: "safeguard",
reserveTokensFloor: 20000,
memoryFlush: {
enabled: true,
softThresholdTokens: 4000
}
}
}
}
}