iiRecord
Agentic AI Atlas · Claude Code auto-compaction (rolling summary, ~70% threshold)
compaction-policy:claude-code-autoa5c.ai
II.
CompactionPolicy overview

compaction-policy:claude-code-auto

Reference · live

Claude Code auto-compaction (rolling summary, ~70% threshold) overview

Auto-compacts when context fill crosses ~70% of the model context window (140k of 200k by default). Fires the PreCompact hook before summarizing. Reactive arm: on PROMPT_TOO_LONG_ERROR_MESSAGE the retry parses the gap via getPromptTooLongTokenGap and jumps past multiple groups in one retry; on media-size errors stripImagesFromMessages runs before resummarizing.

CompactionPolicyOutgoing · 0Incoming · 1

Attributes

displayName
Claude Code auto-compaction (rolling summary, ~70% threshold)
strategy
rolling-summary
trigger
hybrid
triggerThresholdTokens
140000
triggerThresholdFraction
0.7
preserveRecentTurns
0
preserveFileOperations
false
stripsImagesOnRetry
true
description
Auto-compacts when context fill crosses ~70% of the model context window (140k of 200k by default). Fires the PreCompact hook before summarizing. Reactive arm: on PROMPT_TOO_LONG_ERROR_MESSAGE the retry parses the gap via getPromptTooLongTokenGap and jumps past multiple groups in one retry; on media-size errors stripImagesFromMessages runs before resummarizing.

Outgoing edges

None.

Incoming edges

compaction_policy_applied_by1