@pennyclaw/auto-compact
v1.0.0
Published
Idle + threshold based transcript compaction with optional aggressive tool pruning.
Readme
auto-compact
Idle + threshold based transcript compaction with optional aggressive tool pruning.
Install
openclaw plugins install @pennyclaw/auto-compactUpdate
openclaw plugins update auto-compactRequires
gateway.http.endpoints.chatCompletions.enabled = true
Config
plugins: {
entries: {
"auto-compact": {
enabled: true,
config: {
idleMinutes: 15,
contextTokensThreshold: 100000,
triggerMode: "or", // "or" | "and"
keepTurns: 5,
aggressive: false, // true = prune tool_result before summary
modelOverride: null // null = default model
}
}
}
}Behavior
- Keeps the last N turns intact (user + assistant + tool calls).
- Summarizes everything before that into a single assistant message prefixed with
[context_summary]. - Uses rolling summary (previous summary is used as base).
- Chunking + fallback to avoid overflow.
- When
aggressive=true, prunes all tool_result content before summary. - Credentials are never included; only
/secretsfile paths are referenced. - Native compaction compat (no custom prefix, tree safe, rolling disabled)
